Re: [RFC 10/18] omap3isp: Move the syscon register out of the ISP register maps
Hi Tony, Thanks for the comments!! On Mon, Mar 09, 2015 at 08:20:38AM -0700, Tony Lindgren wrote: * Sakari Ailus sakari.ai...@iki.fi [150307 15:44]: Hi Laurent, On Sun, Mar 08, 2015 at 01:34:17AM +0200, Laurent Pinchart wrote: Hi Sakari, Thank you for the patch. (CC'ing linux-omap and Tony) Thanks. On Saturday 07 March 2015 23:41:07 Sakari Ailus wrote: The syscon register isn't part of the ISP, use it through the syscom driver regmap instead. The syscom block is considered to be from 343x on ISP revision 2.0 whereas 15.0 is assumed to have 3630 syscon. Signed-off-by: Sakari Ailus sakari.ai...@iki.fi --- arch/arm/boot/dts/omap3.dtsi|2 +- arch/arm/mach-omap2/devices.c | 10 -- drivers/media/platform/omap3isp/isp.c | 19 +++ drivers/media/platform/omap3isp/isp.h | 19 +-- drivers/media/platform/omap3isp/ispcsiphy.c | 20 +--- You might be asked to split the patch into two, let's see what Tony says. 5 files changed, 42 insertions(+), 28 deletions(-) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 01b7111..fe0b293 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -183,7 +183,7 @@ omap3_scm_general: tisyscon@48002270 { compatible = syscon; - reg = 0x48002270 0x2f0; + reg = 0x48002270 0x2f4; }; pbias_regulator: pbias_regulator { Can you please send the above dts change separately as a fix describing what goes wrong? Let's get that out of the way for the -rc, otherwise we're going to probably get conflicts with Tero's dts changes. Sure. There's one register that didn't used to be mapped to syscon. diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 1afb50d..e945957 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -143,16 +143,6 @@ static struct resource omap3isp_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE, - .end= OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE + 3, - .flags = IORESOURCE_MEM, - }, - { - .start = OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL, - .end= OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL + 3, - .flags = IORESOURCE_MEM, - }, - { .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } Looks good to me, teel free to merge this part along with the other isp changes: Acked-by: Tony Lindgren t...@atomide.com Thanks! -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC 10/18] omap3isp: Move the syscon register out of the ISP register maps
* Sakari Ailus sakari.ai...@iki.fi [150307 15:44]: Hi Laurent, On Sun, Mar 08, 2015 at 01:34:17AM +0200, Laurent Pinchart wrote: Hi Sakari, Thank you for the patch. (CC'ing linux-omap and Tony) Thanks. On Saturday 07 March 2015 23:41:07 Sakari Ailus wrote: The syscon register isn't part of the ISP, use it through the syscom driver regmap instead. The syscom block is considered to be from 343x on ISP revision 2.0 whereas 15.0 is assumed to have 3630 syscon. Signed-off-by: Sakari Ailus sakari.ai...@iki.fi --- arch/arm/boot/dts/omap3.dtsi|2 +- arch/arm/mach-omap2/devices.c | 10 -- drivers/media/platform/omap3isp/isp.c | 19 +++ drivers/media/platform/omap3isp/isp.h | 19 +-- drivers/media/platform/omap3isp/ispcsiphy.c | 20 +--- You might be asked to split the patch into two, let's see what Tony says. 5 files changed, 42 insertions(+), 28 deletions(-) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 01b7111..fe0b293 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -183,7 +183,7 @@ omap3_scm_general: tisyscon@48002270 { compatible = syscon; - reg = 0x48002270 0x2f0; + reg = 0x48002270 0x2f4; }; pbias_regulator: pbias_regulator { Can you please send the above dts change separately as a fix describing what goes wrong? Let's get that out of the way for the -rc, otherwise we're going to probably get conflicts with Tero's dts changes. diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 1afb50d..e945957 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -143,16 +143,6 @@ static struct resource omap3isp_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE, - .end= OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE + 3, - .flags = IORESOURCE_MEM, - }, - { - .start = OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL, - .end= OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL + 3, - .flags = IORESOURCE_MEM, - }, - { .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } Looks good to me, teel free to merge this part along with the other isp changes: Acked-by: Tony Lindgren t...@atomide.com diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 68d7edfc..4ff4bbd 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -51,6 +51,7 @@ #include linux/dma-mapping.h #include linux/i2c.h #include linux/interrupt.h +#include linux/mfd/syscon.h #include linux/module.h #include linux/omap-iommu.h #include linux/platform_device.h @@ -94,8 +95,9 @@ static const struct isp_res_mapping isp_res_maps[] = { 1 OMAP3_ISP_IOMEM_RESZ | 1 OMAP3_ISP_IOMEM_SBL | 1 OMAP3_ISP_IOMEM_CSI2A_REGS1 | -1 OMAP3_ISP_IOMEM_CSIPHY2 | -1 OMAP3_ISP_IOMEM_343X_CONTROL_CSIRXFE, +1 OMAP3_ISP_IOMEM_CSIPHY2, + .syscon_offset = 0xdc, + .phy_type = ISP_PHY_TYPE_3430, }, { .isp_rev = ISP_REVISION_15_0, @@ -112,8 +114,9 @@ static const struct isp_res_mapping isp_res_maps[] = { 1 OMAP3_ISP_IOMEM_CSI2A_REGS2 | 1 OMAP3_ISP_IOMEM_CSI2C_REGS1 | 1 OMAP3_ISP_IOMEM_CSIPHY1 | -1 OMAP3_ISP_IOMEM_CSI2C_REGS2 | -1 OMAP3_ISP_IOMEM_3630_CONTROL_CAMERA_PHY_CTRL, +1 OMAP3_ISP_IOMEM_CSI2C_REGS2, + .syscon_offset = 0x2f0, + .phy_type = ISP_PHY_TYPE_3630, }, }; @@ -2352,6 +2355,14 @@ static int isp_probe(struct platform_device *pdev) } } + isp-syscon = syscon_regmap_lookup_by_pdevname(syscon.0); + isp-syscon_offset = isp_res_maps[m].syscon_offset; + isp-phy_type = isp_res_maps[m].phy_type; You could move those two lines after the error check to keep the check closer to the source of error. Ack. Apart from that, Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Thanks for the acks! -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at
Re: [RFC 10/18] omap3isp: Move the syscon register out of the ISP register maps
Hi Sakari, Thank you for the patch. (CC'ing linux-omap and Tony) On Saturday 07 March 2015 23:41:07 Sakari Ailus wrote: The syscon register isn't part of the ISP, use it through the syscom driver regmap instead. The syscom block is considered to be from 343x on ISP revision 2.0 whereas 15.0 is assumed to have 3630 syscon. Signed-off-by: Sakari Ailus sakari.ai...@iki.fi --- arch/arm/boot/dts/omap3.dtsi|2 +- arch/arm/mach-omap2/devices.c | 10 -- drivers/media/platform/omap3isp/isp.c | 19 +++ drivers/media/platform/omap3isp/isp.h | 19 +-- drivers/media/platform/omap3isp/ispcsiphy.c | 20 +--- You might be asked to split the patch into two, let's see what Tony says. 5 files changed, 42 insertions(+), 28 deletions(-) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 01b7111..fe0b293 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -183,7 +183,7 @@ omap3_scm_general: tisyscon@48002270 { compatible = syscon; - reg = 0x48002270 0x2f0; + reg = 0x48002270 0x2f4; }; pbias_regulator: pbias_regulator { diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 1afb50d..e945957 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -143,16 +143,6 @@ static struct resource omap3isp_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE, - .end= OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE + 3, - .flags = IORESOURCE_MEM, - }, - { - .start = OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL, - .end= OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL + 3, - .flags = IORESOURCE_MEM, - }, - { .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 68d7edfc..4ff4bbd 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -51,6 +51,7 @@ #include linux/dma-mapping.h #include linux/i2c.h #include linux/interrupt.h +#include linux/mfd/syscon.h #include linux/module.h #include linux/omap-iommu.h #include linux/platform_device.h @@ -94,8 +95,9 @@ static const struct isp_res_mapping isp_res_maps[] = { 1 OMAP3_ISP_IOMEM_RESZ | 1 OMAP3_ISP_IOMEM_SBL | 1 OMAP3_ISP_IOMEM_CSI2A_REGS1 | -1 OMAP3_ISP_IOMEM_CSIPHY2 | -1 OMAP3_ISP_IOMEM_343X_CONTROL_CSIRXFE, +1 OMAP3_ISP_IOMEM_CSIPHY2, + .syscon_offset = 0xdc, + .phy_type = ISP_PHY_TYPE_3430, }, { .isp_rev = ISP_REVISION_15_0, @@ -112,8 +114,9 @@ static const struct isp_res_mapping isp_res_maps[] = { 1 OMAP3_ISP_IOMEM_CSI2A_REGS2 | 1 OMAP3_ISP_IOMEM_CSI2C_REGS1 | 1 OMAP3_ISP_IOMEM_CSIPHY1 | -1 OMAP3_ISP_IOMEM_CSI2C_REGS2 | -1 OMAP3_ISP_IOMEM_3630_CONTROL_CAMERA_PHY_CTRL, +1 OMAP3_ISP_IOMEM_CSI2C_REGS2, + .syscon_offset = 0x2f0, + .phy_type = ISP_PHY_TYPE_3630, }, }; @@ -2352,6 +2355,14 @@ static int isp_probe(struct platform_device *pdev) } } + isp-syscon = syscon_regmap_lookup_by_pdevname(syscon.0); + isp-syscon_offset = isp_res_maps[m].syscon_offset; + isp-phy_type = isp_res_maps[m].phy_type; You could move those two lines after the error check to keep the check closer to the source of error. Apart from that, Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com + if (IS_ERR(isp-syscon)) { + ret = PTR_ERR(isp-syscon); + goto error_isp; + } + /* IOMMU */ ret = isp_attach_iommu(isp); if (ret 0) { diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h index 9535524..03d2129 100644 --- a/drivers/media/platform/omap3isp/isp.h +++ b/drivers/media/platform/omap3isp/isp.h @@ -59,8 +59,6 @@ enum isp_mem_resources { OMAP3_ISP_IOMEM_CSI2C_REGS1, OMAP3_ISP_IOMEM_CSIPHY1, OMAP3_ISP_IOMEM_CSI2C_REGS2, - OMAP3_ISP_IOMEM_343X_CONTROL_CSIRXFE, - OMAP3_ISP_IOMEM_3630_CONTROL_CAMERA_PHY_CTRL, OMAP3_ISP_IOMEM_LAST }; @@ -93,14 +91,25 @@ enum isp_subclk_resource { /* ISP2P: OMAP 36xx */ #define ISP_REVISION_15_00xF0
Re: [RFC 10/18] omap3isp: Move the syscon register out of the ISP register maps
Hi Laurent, On Sun, Mar 08, 2015 at 01:34:17AM +0200, Laurent Pinchart wrote: Hi Sakari, Thank you for the patch. (CC'ing linux-omap and Tony) Thanks. On Saturday 07 March 2015 23:41:07 Sakari Ailus wrote: The syscon register isn't part of the ISP, use it through the syscom driver regmap instead. The syscom block is considered to be from 343x on ISP revision 2.0 whereas 15.0 is assumed to have 3630 syscon. Signed-off-by: Sakari Ailus sakari.ai...@iki.fi --- arch/arm/boot/dts/omap3.dtsi|2 +- arch/arm/mach-omap2/devices.c | 10 -- drivers/media/platform/omap3isp/isp.c | 19 +++ drivers/media/platform/omap3isp/isp.h | 19 +-- drivers/media/platform/omap3isp/ispcsiphy.c | 20 +--- You might be asked to split the patch into two, let's see what Tony says. 5 files changed, 42 insertions(+), 28 deletions(-) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 01b7111..fe0b293 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -183,7 +183,7 @@ omap3_scm_general: tisyscon@48002270 { compatible = syscon; - reg = 0x48002270 0x2f0; + reg = 0x48002270 0x2f4; }; pbias_regulator: pbias_regulator { diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 1afb50d..e945957 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -143,16 +143,6 @@ static struct resource omap3isp_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE, - .end= OMAP343X_CTRL_BASE + OMAP343X_CONTROL_CSIRXFE + 3, - .flags = IORESOURCE_MEM, - }, - { - .start = OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL, - .end= OMAP343X_CTRL_BASE + OMAP3630_CONTROL_CAMERA_PHY_CTRL + 3, - .flags = IORESOURCE_MEM, - }, - { .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 68d7edfc..4ff4bbd 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -51,6 +51,7 @@ #include linux/dma-mapping.h #include linux/i2c.h #include linux/interrupt.h +#include linux/mfd/syscon.h #include linux/module.h #include linux/omap-iommu.h #include linux/platform_device.h @@ -94,8 +95,9 @@ static const struct isp_res_mapping isp_res_maps[] = { 1 OMAP3_ISP_IOMEM_RESZ | 1 OMAP3_ISP_IOMEM_SBL | 1 OMAP3_ISP_IOMEM_CSI2A_REGS1 | - 1 OMAP3_ISP_IOMEM_CSIPHY2 | - 1 OMAP3_ISP_IOMEM_343X_CONTROL_CSIRXFE, + 1 OMAP3_ISP_IOMEM_CSIPHY2, + .syscon_offset = 0xdc, + .phy_type = ISP_PHY_TYPE_3430, }, { .isp_rev = ISP_REVISION_15_0, @@ -112,8 +114,9 @@ static const struct isp_res_mapping isp_res_maps[] = { 1 OMAP3_ISP_IOMEM_CSI2A_REGS2 | 1 OMAP3_ISP_IOMEM_CSI2C_REGS1 | 1 OMAP3_ISP_IOMEM_CSIPHY1 | - 1 OMAP3_ISP_IOMEM_CSI2C_REGS2 | - 1 OMAP3_ISP_IOMEM_3630_CONTROL_CAMERA_PHY_CTRL, + 1 OMAP3_ISP_IOMEM_CSI2C_REGS2, + .syscon_offset = 0x2f0, + .phy_type = ISP_PHY_TYPE_3630, }, }; @@ -2352,6 +2355,14 @@ static int isp_probe(struct platform_device *pdev) } } + isp-syscon = syscon_regmap_lookup_by_pdevname(syscon.0); + isp-syscon_offset = isp_res_maps[m].syscon_offset; + isp-phy_type = isp_res_maps[m].phy_type; You could move those two lines after the error check to keep the check closer to the source of error. Ack. Apart from that, Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Thanks for the acks! -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html