From patchwork Mon Nov 15 14:29:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aguirre Rodriguez, Sergio Alberto" X-Patchwork-Id: 325082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAFEUS84005029 for ; Mon, 15 Nov 2010 14:30:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932332Ab0KOOaQ (ORCPT ); Mon, 15 Nov 2010 09:30:16 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:54879 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757347Ab0KOOaD (ORCPT ); Mon, 15 Nov 2010 09:30:03 -0500 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id oAFEU05N026329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 08:30:00 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id oAFEU0v8001993; Mon, 15 Nov 2010 08:30:00 -0600 (CST) Received: from localhost (dtx0091359-ubuntu-1.am.dhcp.ti.com [128.247.79.64]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oAFETxf09580; Mon, 15 Nov 2010 08:29:59 -0600 (CST) From: Sergio Aguirre To: Laurent Pinchart Cc: linux-media@vger.kernel.org, Sergio Aguirre Subject: [omap3isp][PATCH v2 7/9] omap3isp: Cleanup isp_power_settings Date: Mon, 15 Nov 2010 08:29:59 -0600 Message-Id: <1289831401-593-8-git-send-email-saaguirre@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1289831401-593-1-git-send-email-saaguirre@ti.com> References: <1289831401-593-1-git-send-email-saaguirre@ti.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 15 Nov 2010 14:30:28 +0000 (UTC) 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); } /*