From patchwork Thu Oct 4 01:26:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 1544371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id D52523FD9C for ; Thu, 4 Oct 2012 01:29:27 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TJaE2-0006ZG-UL; Thu, 04 Oct 2012 01:27:43 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TJaD0-0006GN-BX for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 01:26:44 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q941QaJn002278; Wed, 3 Oct 2012 20:26:36 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q941Qaqi024951; Wed, 3 Oct 2012 20:26:36 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Wed, 3 Oct 2012 20:26:36 -0500 Received: from nucleus.nsc.com (nucleus.nsc.com [10.188.36.112]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id q941QWfa015948; Wed, 3 Oct 2012 20:26:36 -0500 From: Mike Turquette To: , Subject: [PATCH 7/7] ARM: omap: voltage: add ABB to voltage scaling Date: Wed, 3 Oct 2012 18:26:14 -0700 Message-ID: <1349313974-5473-8-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349313974-5473-1-git-send-email-mturquette@ti.com> References: <1349313974-5473-1-git-send-email-mturquette@ti.com> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -9.0 (---------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-9.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.153 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -2.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-omap@vger.kernel.org, Mike Turquette , linux-arm-kernel@lists.infradead.org, Mike Turquette X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adaptive Body-Bias ldo state should be transitioned (if necessary) during any voltage scaling operation. This patch initializes ABB LDO's as a part of the greater voltage domain initialization sequence and adds the ABB transition callbacks to the primary voltage domain scaling function, voltdm_scale(). Signed-off-by: Mike Turquette Signed-off-by: Mike Turquette --- arch/arm/mach-omap2/voltage.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index f45716c..9cac9fe 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -41,6 +41,7 @@ #include "vc.h" #include "vp.h" +#include "abb.h" static LIST_HEAD(voltdm_list); @@ -101,10 +102,30 @@ int voltdm_scale(struct voltagedomain *voltdm, return -EINVAL; } + ret = omap_abb_pre_scale(voltdm, volt); + if (ret) { + pr_err("%s: abb prescale failed for vdd%s: %d\n", + __func__, voltdm->name, ret); + goto out; + } + ret = voltdm->scale(voltdm, volt); - if (!ret) - voltdm->nominal_volt = volt; + if (ret) { + pr_err("%s: vdd_%s failed to scale: %d\n", + __func__, voltdm->name, ret); + goto out; + } + + voltdm->nominal_volt = volt; + ret = omap_abb_post_scale(voltdm, volt); + if (ret) { + pr_err("%s: abb postscale failed for vdd%s: %d\n", + __func__, voltdm->name, ret); + goto out; + } + +out: return ret; } @@ -300,6 +321,9 @@ int __init omap_voltage_late_init(void) omap_vp_init(voltdm); } + if (voltdm->abb) + omap_abb_init(voltdm); + /* * XXX If voltdm->nominal_volt is zero after calling * voltdm->get_voltage then we are likely running this