diff mbox

[omap3isp,v2,7/9] omap3isp: Cleanup isp_power_settings

Message ID 1289831401-593-8-git-send-email-saaguirre@ti.com (mailing list archive)
State RFC
Headers show

Commit Message

Aguirre Rodriguez, Sergio Alberto Nov. 15, 2010, 2:29 p.m. UTC
None
diff mbox

Patch

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);
 }
 
 /*