Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333853
b: refs/heads/master
c: d6d022e
h: refs/heads/master
i:
  333851: 917aefc
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 9, 2012
1 parent 56499ff commit e965212
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33eebec55c94c755f5f4785e46a72af9238999e2
refs/heads/master: d6d022e7382343b57184c83f5fea0532be240b98
25 changes: 9 additions & 16 deletions trunk/drivers/media/platform/omap3isp/isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,10 @@ static int isp_enable_clocks(struct isp_device *isp)
* has to be twice of what is set on OMAP3430 to get
* the required value for cam_mclk
*/
divisor = isp->revision == ISP_REVISION_15_0 ? 1 : 2;
if (cpu_is_omap3630())
divisor = 1;
else
divisor = 2;

r = clk_enable(isp->clock[ISP_CLK_CAM_ICK]);
if (r) {
Expand Down Expand Up @@ -2090,11 +2093,7 @@ static int __devinit isp_probe(struct platform_device *pdev)
isp->isp_csiphy1.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY1");
isp->isp_csiphy2.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY2");

/* Clocks
*
* The ISP clock tree is revision-dependent. We thus need to enable ICLK
* manually to read the revision before calling __omap3isp_get().
*/
/* Clocks */
ret = isp_map_mem_resource(pdev, isp, OMAP3_ISP_IOMEM_MAIN);
if (ret < 0)
goto error;
Expand All @@ -2103,16 +2102,6 @@ static int __devinit isp_probe(struct platform_device *pdev)
if (ret < 0)
goto error;

ret = clk_enable(isp->clock[ISP_CLK_CAM_ICK]);
if (ret < 0)
goto error;

isp->revision = isp_reg_readl(isp, OMAP3_ISP_IOMEM_MAIN, ISP_REVISION);
dev_info(isp->dev, "Revision %d.%d found\n",
(isp->revision & 0xf0) >> 4, isp->revision & 0x0f);

clk_disable(isp->clock[ISP_CLK_CAM_ICK]);

if (__omap3isp_get(isp, false) == NULL) {
ret = -ENODEV;
goto error;
Expand All @@ -2123,6 +2112,10 @@ static int __devinit isp_probe(struct platform_device *pdev)
goto error_isp;

/* Memory resources */
isp->revision = isp_reg_readl(isp, OMAP3_ISP_IOMEM_MAIN, ISP_REVISION);
dev_info(isp->dev, "Revision %d.%d found\n",
(isp->revision & 0xf0) >> 4, isp->revision & 0x0f);

for (m = 0; m < ARRAY_SIZE(isp_res_maps); m++)
if (isp->revision == isp_res_maps[m].isp_rev)
break;
Expand Down

0 comments on commit e965212

Please sign in to comment.