From patchwork Tue Jun 7 02:16:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 855112 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 p572FeQR025132 for ; Tue, 7 Jun 2011 02:18:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756738Ab1FGCQY (ORCPT ); Mon, 6 Jun 2011 22:16:24 -0400 Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]:33614 "EHLO na3sys009aog101.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754812Ab1FGCQY (ORCPT ); Mon, 6 Jun 2011 22:16:24 -0400 Received: from mail-yi0-f47.google.com ([209.85.218.47]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKTe2J90vztzTRHE6YAWaRc8b9fPAL72m+@postini.com; Mon, 06 Jun 2011 19:16:23 PDT Received: by yia28 with SMTP id 28so1954114yia.34 for ; Mon, 06 Jun 2011 19:16:22 -0700 (PDT) Received: by 10.90.59.31 with SMTP id h31mr4994160aga.208.1307412982676; Mon, 06 Jun 2011 19:16:22 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id x12sm3726484anf.9.2011.06.06.19.16.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2011 19:16:21 -0700 (PDT) From: Nishanth Menon To: linux-omap Cc: kevin , Nishanth Menon Subject: [pm-wip/voltdm_nm][PATCH 03/10] OMAP4: PM: VC: allow channels to use cmdra reg Date: Mon, 6 Jun 2011 21:16:06 -0500 Message-Id: <1307412972-25854-4-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1307412972-25854-1-git-send-email-nm@ti.com> References: <1307412972-25854-1-git-send-email-nm@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]); Tue, 07 Jun 2011 02:18:34 +0000 (UTC) if volt_reg and cmd_reg are the same from PMIC configuration, we can use the cmd reg by using racen - this is valid for voltage commands, however, in most cases, we'd like to retain voltage reg configuration as well for vfsm commands going thru from h/w. Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/vc.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 0c0e416..6017c70 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c @@ -337,9 +337,13 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) voltdm->rmw(vc->smps_cmdra_mask, vc->cmd_reg_addr << __ffs(vc->smps_cmdra_mask), vc->common->smps_cmdra_reg); - vc->cfg_channel |= vc_cfg_bits->rac | vc_cfg_bits->racen; + vc->cfg_channel |= vc_cfg_bits->rac; } + /* If voltage and cmd regs are same, we can use cmdra register */ + if (vc->volt_reg_addr == vc->cmd_reg_addr) + vc->cfg_channel |= vc_cfg_bits->racen; + /* Set up the on, inactive, retention and off voltage */ on_vsel = voltdm->pmic->uv_to_vsel(voltdm->pmic->on_volt); onlp_vsel = voltdm->pmic->uv_to_vsel(voltdm->pmic->onlp_volt);