From patchwork Wed Feb 6 23:44:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 2109011 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 1DC523FCFC for ; Wed, 6 Feb 2013 23:47:25 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U3EfQ-0005XQ-3f; Wed, 06 Feb 2013 23:44:40 +0000 Received: from utopia.booyaka.com ([74.50.51.50]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U3EfM-0005WD-DW for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 23:44:37 +0000 Received: (qmail 8271 invoked by uid 1019); 6 Feb 2013 23:44:34 -0000 Date: Wed, 6 Feb 2013 23:44:34 +0000 (UTC) From: Paul Walmsley To: Rajendra Nayak Subject: Re: [PATCH] ARM: OMAP4: PM: Warn users about usage of older bootloaders In-Reply-To: <1359980683-12079-1-git-send-email-rnayak@ti.com> Message-ID: References: <1359980683-12079-1-git-send-email-rnayak@ti.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130206_184436_534710_C4306D0B X-CRM114-Status: GOOD ( 22.37 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: khilman@deeprootsystems.com, Tero Kristo , R Sricharan , Santosh Shilimkar , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 On Mon, 4 Feb 2013, Rajendra Nayak wrote: > OMAP4 CHIP level PM works only with newer bootloaders. The > dependency on the bootloader comes from the fact that the > kernel is missing reset and initialization code for some > devices. > > While the right thing to do is to add reset and init code in > the kernel, for some co-processor IP blocks like DSP and IVA > it means downloading firmware into each one of them to execute > idle instructions. > > While a feasible solution is worked upon on how such IP blocks > can be better handled in the kernel, in the interim, to avoid > any further frustration to users testing PM on OMAP4 and finding > it broken, warn them about the bootloader being a possible > cause. > > Signed-off-by: Rajendra Nayak > Cc: Tero Kristo > Cc: Santosh Shilimkar > Cc: R Sricharan Thanks Rajendra, I appreciate the patch. I've tweaked it slightly and the following is what's queued here; hopefully it can go in for v3.9. - Paul From: Rajendra Nayak Date: Mon, 4 Feb 2013 17:54:43 +0530 Subject: [PATCH] ARM: OMAP4: PM: Warn users about usage of older bootloaders OMAP4 CHIP level PM works only with newer bootloaders. The dependency on the bootloader comes from the fact that the kernel is missing reset and initialization code for some devices. While the right thing to do is to add reset and init code in the kernel, for some co-processor IP blocks like DSP and IVA it means downloading firmware into each one of them to execute idle instructions. While a feasible solution is worked upon on how such IP blocks can be better handled in the kernel, in the interim, to avoid any further frustration to users testing PM on OMAP4 and finding it broken, warn them about the bootloader being a possible cause. Signed-off-by: Rajendra Nayak Cc: Tero Kristo Cc: Santosh Shilimkar Cc: R Sricharan [paul@pwsan.com: tweaked warning messages and comments slightly] Signed-off-by: Paul Walmsley Acked-by: Kevin Hilman --- arch/arm/mach-omap2/pm44xx.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index aa6fd98..502ed9b 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -77,8 +77,18 @@ static int omap4_pm_suspend(void) omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->saved_logic_state); } - if (ret) + if (ret) { pr_crit("Could not enter target state in pm_suspend\n"); + /* + * OMAP4 chip PM currently works only with certain (newer) + * versions of bootloaders. This is due to missing code in the + * kernel to properly reset and initialize some devices. + * Warn the user about the bootloader version being one of the + * possible causes. + * http://www.spinics.net/lists/arm-kernel/msg218641.html + */ + pr_warn("A possible cause could be an old bootloader - try u-boot >= v2012.07\n"); + } else pr_info("Successfully put all powerdomains to target state\n"); @@ -146,6 +156,13 @@ int __init omap4_pm_init(void) } pr_err("Power Management for TI OMAP4.\n"); + /* + * OMAP4 chip PM currently works only with certain (newer) + * versions of bootloaders. This is due to missing code in the + * kernel to properly reset and initialize some devices. + * http://www.spinics.net/lists/arm-kernel/msg218641.html + */ + pr_warn("u-boot >= v2012.07 is required for full PM support\n"); ret = pwrdm_for_each(pwrdms_setup, NULL); if (ret) {