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>
* has to be twice of what is set on OMAP3430 to get
* the required value for cam_mclk
*/
* 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) {
r = clk_enable(isp->clock[ISP_CLK_CAM_ICK]);
if (r) {
isp->isp_csiphy1.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY1");
isp->isp_csiphy2.vdd = regulator_get(&pdev->dev, "VDD_CSIPHY2");
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().
- */
ret = isp_map_mem_resource(pdev, isp, OMAP3_ISP_IOMEM_MAIN);
if (ret < 0)
goto error;
ret = isp_map_mem_resource(pdev, isp, OMAP3_ISP_IOMEM_MAIN);
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;
if (__omap3isp_get(isp, false) == NULL) {
ret = -ENODEV;
goto error;
goto error_isp;
/* Memory resources */
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;
for (m = 0; m < ARRAY_SIZE(isp_res_maps); m++)
if (isp->revision == isp_res_maps[m].isp_rev)
break;