diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/media/platform/omap3isp/isp.c | 25 |
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; |
