1. Get rid of CSI2 / CCP2 power settings, as they are controlled in the receivers code anyways. 2. Avoid code duplication. Signed-off-by: Sergio Aguirre <saaguirre@xxxxxx> --- drivers/media/video/isp/isp.c | 49 ++++++----------------------------------- 1 files changed, 7 insertions(+), 42 deletions(-) diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c index de9352b..30bdc48 100644 --- a/drivers/media/video/isp/isp.c +++ b/drivers/media/video/isp/isp.c @@ -254,48 +254,13 @@ EXPORT_SYMBOL(isp_set_xclk); */ static void isp_power_settings(struct isp_device *isp, int idle) { - if (idle) { - isp_reg_writel(isp, - (ISP_SYSCONFIG_MIDLEMODE_SMARTSTANDBY << - ISP_SYSCONFIG_MIDLEMODE_SHIFT), - OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG); - if (omap_rev() == OMAP3430_REV_ES1_0) { - isp_reg_writel(isp, ISPCSI1_AUTOIDLE | - (ISPCSI1_MIDLEMODE_SMARTSTANDBY << - ISPCSI1_MIDLEMODE_SHIFT), - OMAP3_ISP_IOMEM_CSI2A_REGS1, - ISPCSI2_SYSCONFIG); - isp_reg_writel(isp, ISPCSI1_AUTOIDLE | - (ISPCSI1_MIDLEMODE_SMARTSTANDBY << - ISPCSI1_MIDLEMODE_SHIFT), - OMAP3_ISP_IOMEM_CCP2, - ISPCCP2_SYSCONFIG); - } - isp_reg_writel(isp, ISPCTRL_SBL_AUTOIDLE, OMAP3_ISP_IOMEM_MAIN, - ISP_CTRL); - - } else { - isp_reg_writel(isp, - (ISP_SYSCONFIG_MIDLEMODE_FORCESTANDBY << - ISP_SYSCONFIG_MIDLEMODE_SHIFT), - OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG); - if (omap_rev() == OMAP3430_REV_ES1_0) { - isp_reg_writel(isp, ISPCSI1_AUTOIDLE | - (ISPCSI1_MIDLEMODE_FORCESTANDBY << - ISPCSI1_MIDLEMODE_SHIFT), - OMAP3_ISP_IOMEM_CSI2A_REGS1, - ISPCSI2_SYSCONFIG); - - isp_reg_writel(isp, ISPCSI1_AUTOIDLE | - (ISPCSI1_MIDLEMODE_FORCESTANDBY << - ISPCSI1_MIDLEMODE_SHIFT), - OMAP3_ISP_IOMEM_CCP2, - ISPCCP2_SYSCONFIG); - } - - isp_reg_writel(isp, ISPCTRL_SBL_AUTOIDLE, OMAP3_ISP_IOMEM_MAIN, - ISP_CTRL); - } + isp_reg_writel(isp, + ((idle ? ISP_SYSCONFIG_MIDLEMODE_SMARTSTANDBY : + ISP_SYSCONFIG_MIDLEMODE_FORCESTANDBY) << + ISP_SYSCONFIG_MIDLEMODE_SHIFT), + OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG); + isp_reg_writel(isp, ISPCTRL_SBL_AUTOIDLE, OMAP3_ISP_IOMEM_MAIN, + ISP_CTRL); } /* -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html