From patchwork Fri Apr 1 23:41:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 682661 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 p31Nebc8005732 for ; Fri, 1 Apr 2011 23:40:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641Ab1DAXkg (ORCPT ); Fri, 1 Apr 2011 19:40:36 -0400 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:49568 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823Ab1DAXkg (ORCPT ); Fri, 1 Apr 2011 19:40:36 -0400 Received: from source ([209.85.210.176]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKTZZic8UrSSAs5RRioukba5ZKkyQziPVn@postini.com; Fri, 01 Apr 2011 16:40:35 PDT Received: by mail-iy0-f176.google.com with SMTP id 1so4758564iym.7 for ; Fri, 01 Apr 2011 16:40:35 -0700 (PDT) Received: by 10.42.164.138 with SMTP id g10mr3176884icy.306.1301701235216; Fri, 01 Apr 2011 16:40:35 -0700 (PDT) Received: from localhost (c-24-18-179-55.hsd1.wa.comcast.net [24.18.179.55]) by mx.google.com with ESMTPS id 13sm1759725ibo.42.2011.04.01.16.40.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Apr 2011 16:40:34 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Subject: [PATCH/RFC 02/13] OMAP3+ VP: replace transaction done check/clear with VP ops Date: Fri, 1 Apr 2011 16:41:00 -0700 Message-Id: <1301701271-22096-3-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1301701271-22096-1-git-send-email-khilman@ti.com> References: <1301701271-22096-1-git-send-email-khilman@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Apr 2011 23:40:37 +0000 (UTC) diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index 65c5b81..a3e7d73 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h @@ -147,8 +147,6 @@ struct omap_vdd_info { u32 curr_volt; bool vp_enabled; - s16 prm_irqst_mod; - u8 prm_irqst_reg; u32 (*read_reg) (u16 mod, u8 offset); void (*write_reg) (u32 val, u16 mod, u8 offset); int (*volt_scale) (struct voltagedomain *voltdm, diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 7cb27ec..ad8f05b 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -38,8 +38,6 @@ static const struct omap_vfsm_instance_data omap3_vdd1_vfsm_data = { }; static struct omap_vdd_info omap3_vdd1_info = { - .prm_irqst_mod = OCP_MOD, - .prm_irqst_reg = OMAP3_PRM_IRQSTATUS_MPU_OFFSET, .vp_data = &omap3_vp1_data, .vfsm = &omap3_vdd1_vfsm_data, }; @@ -51,8 +49,6 @@ static const struct omap_vfsm_instance_data omap3_vdd2_vfsm_data = { }; static struct omap_vdd_info omap3_vdd2_info = { - .prm_irqst_mod = OCP_MOD, - .prm_irqst_reg = OMAP3_PRM_IRQSTATUS_MPU_OFFSET, .vp_data = &omap3_vp2_data, .vfsm = &omap3_vdd2_vfsm_data, }; diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c index a05d90a..43e1d38 100644 --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c @@ -37,8 +37,6 @@ static const struct omap_vfsm_instance_data omap4_vdd_mpu_vfsm_data = { }; static struct omap_vdd_info omap4_vdd_mpu_info = { - .prm_irqst_mod = OMAP4430_PRM_OCP_SOCKET_INST, - .prm_irqst_reg = OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET, .vp_data = &omap4_vp_mpu_data, .vfsm = &omap4_vdd_mpu_vfsm_data, }; @@ -48,8 +46,6 @@ static const struct omap_vfsm_instance_data omap4_vdd_iva_vfsm_data = { }; static struct omap_vdd_info omap4_vdd_iva_info = { - .prm_irqst_mod = OMAP4430_PRM_OCP_SOCKET_INST, - .prm_irqst_reg = OMAP4_PRM_IRQSTATUS_MPU_OFFSET, .vp_data = &omap4_vp_iva_data, .vfsm = &omap4_vdd_iva_vfsm_data, }; @@ -59,8 +55,6 @@ static const struct omap_vfsm_instance_data omap4_vdd_core_vfsm_data = { }; static struct omap_vdd_info omap4_vdd_core_info = { - .prm_irqst_mod = OMAP4430_PRM_OCP_SOCKET_INST, - .prm_irqst_reg = OMAP4_PRM_IRQSTATUS_MPU_OFFSET, .vp_data = &omap4_vp_core_data, .vfsm = &omap4_vdd_core_vfsm_data, }; diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index f3503de..113c839 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c @@ -111,10 +111,8 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm, * is <3us */ while (timeout++ < VP_TRANXDONE_TIMEOUT) { - vdd->write_reg(vp->prm_irqst_data->tranxdone_status, - vdd->prm_irqst_mod, vdd->prm_irqst_reg); - if (!(vdd->read_reg(vdd->prm_irqst_mod, vdd->prm_irqst_reg) & - vp->prm_irqst_data->tranxdone_status)) + vp->vp_common->ops->clear_txdone(vp->id); + if (!vp->vp_common->ops->check_txdone(vp->id)) break; udelay(1); } @@ -146,9 +144,7 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm, * Depends on SMPSWAITTIMEMIN/MAX and voltage change */ timeout = 0; - omap_test_timeout((vdd->read_reg(vdd->prm_irqst_mod, - vdd->prm_irqst_reg) & - vp->prm_irqst_data->tranxdone_status), + omap_test_timeout(vp->vp_common->ops->check_txdone(vp->id), VP_TRANXDONE_TIMEOUT, timeout); if (timeout >= VP_TRANXDONE_TIMEOUT) pr_err("%s: vdd_%s TRANXDONE timeout exceeded." @@ -163,10 +159,8 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm, */ timeout = 0; while (timeout++ < VP_TRANXDONE_TIMEOUT) { - vdd->write_reg(vp->prm_irqst_data->tranxdone_status, - vdd->prm_irqst_mod, vdd->prm_irqst_reg); - if (!(vdd->read_reg(vdd->prm_irqst_mod, vdd->prm_irqst_reg) & - vp->prm_irqst_data->tranxdone_status)) + vp->vp_common->ops->clear_txdone(vp->id); + if (!vp->vp_common->ops->check_txdone(vp->id)) break; udelay(1); }