aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-10-09 18:28:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-09 18:28:00 -0400
commitd6d022e7382343b57184c83f5fea0532be240b98 (patch)
tree3141512d6438cb20d3494f3b14b1ce93d70d45a7 /drivers/media/platform/omap3isp
parent33eebec55c94c755f5f4785e46a72af9238999e2 (diff)
Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
Reverted, as requested by Laurent: I don't consider it as being ready yet, as Sakari pointed out we need to investigate whether the right fix shouldn't be at the OMAP3 clocks level instead. This reverts commit 947c48086623d9ca2207dd0434bd58458af4ba86. Requested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/omap3isp')
-rw-r--r--drivers/media/platform/omap3isp/isp.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 6034dca63404..d7aa513dcc8d 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -1345,7 +1345,10 @@ static int isp_enable_clocks(struct isp_device *isp)
1345 * has to be twice of what is set on OMAP3430 to get 1345 * has to be twice of what is set on OMAP3430 to get
1346 * the required value for cam_mclk 1346 * the required value for cam_mclk
1347 */ 1347 */
1348 divisor = isp->revision == ISP_REVISION_15_0 ? 1 : 2; 1348 if (cpu_is_omap3630())
1349 divisor = 1;
1350 else
1351 divisor = 2;
1349 1352
1350 r = clk_enable(isp->clock[ISP_CLK_CAM_ICK]); 1353 r = clk_enable(isp->clock[ISP_CLK_CAM_ICK]);
1351 if (r) { 1354 if (r) {
@@ -2090,11 +2093,7 @@ static int __devinit isp_probe(struct platform_device *pdev)
2090 isp->isp_csiphy1.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY1"); 2093 isp->isp_csiphy1.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY1");
2091 isp->isp_csiphy2.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY2"); 2094 isp->isp_csiphy2.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY2");
2092 2095
2093 /* Clocks 2096 /* Clocks */
2094 *
2095 * The ISP clock tree is revision-dependent. We thus need to enable ICLK
2096 * manually to read the revision before calling __omap3isp_get().
2097 */
2098 ret = isp_map_mem_resource(pdev, isp, OMAP3_ISP_IOMEM_MAIN); 2097 ret = isp_map_mem_resource(pdev, isp, OMAP3_ISP_IOMEM_MAIN);
2099 if (ret < 0) 2098 if (ret < 0)
2100 goto error; 2099 goto error;
@@ -2103,16 +2102,6 @@ static int __devinit isp_probe(struct platform_device *pdev)
2103 if (ret < 0) 2102 if (ret < 0)
2104 goto error; 2103 goto error;
2105 2104
2106 ret = clk_enable(isp->clock[ISP_CLK_CAM_ICK]);
2107 if (ret < 0)
2108 goto error;
2109
2110 isp->revision = isp_reg_readl(isp, OMAP3_ISP_IOMEM_MAIN, ISP_REVISION);
2111 dev_info(isp->dev, "Revision %d.%d found\n",
2112 (isp->revision & 0xf0) >> 4, isp->revision & 0x0f);
2113
2114 clk_disable(isp->clock[ISP_CLK_CAM_ICK]);
2115
2116 if (__omap3isp_get(isp, false) == NULL) { 2105 if (__omap3isp_get(isp, false) == NULL) {
2117 ret = -ENODEV; 2106 ret = -ENODEV;
2118 goto error; 2107 goto error;
@@ -2123,6 +2112,10 @@ static int __devinit isp_probe(struct platform_device *pdev)
2123 goto error_isp; 2112 goto error_isp;
2124 2113
2125 /* Memory resources */ 2114 /* Memory resources */
2115 isp->revision = isp_reg_readl(isp, OMAP3_ISP_IOMEM_MAIN, ISP_REVISION);
2116 dev_info(isp->dev, "Revision %d.%d found\n",
2117 (isp->revision & 0xf0) >> 4, isp->revision & 0x0f);
2118
2126 for (m = 0; m < ARRAY_SIZE(isp_res_maps); m++) 2119 for (m = 0; m < ARRAY_SIZE(isp_res_maps); m++)
2127 if (isp->revision == isp_res_maps[m].isp_rev) 2120 if (isp->revision == isp_res_maps[m].isp_rev)
2128 break; 2121 break;