From patchwork Mon Feb 4 12:24:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 2091461 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B025740106 for ; Mon, 4 Feb 2013 12:24:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445Ab3BDMY6 (ORCPT ); Mon, 4 Feb 2013 07:24:58 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:59256 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751321Ab3BDMY6 (ORCPT ); Mon, 4 Feb 2013 07:24:58 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r14COs4q004414; Mon, 4 Feb 2013 06:24:54 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r14COpjP023707; Mon, 4 Feb 2013 17:54:51 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Mon, 4 Feb 2013 17:54:50 +0530 Received: from ula0131687.itg.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id r14COkpt003180; Mon, 4 Feb 2013 17:54:47 +0530 From: Rajendra Nayak To: CC: , , , Rajendra Nayak , Tero Kristo , Santosh Shilimkar , R Sricharan Subject: [PATCH] ARM: OMAP4: PM: Warn users about usage of older bootloaders Date: Mon, 4 Feb 2013 17:54:43 +0530 Message-ID: <1359980683-12079-1-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- arch/arm/mach-omap2/pm44xx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index aa6fd98..45ca053 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. + */ + pr_warn("One of the possible cause could be an old bootloder\n" + "Use version v2012.07 (or later)\n"); + } else pr_info("Successfully put all powerdomains to target state\n"); @@ -146,6 +156,12 @@ 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. + */ + pr_warn("Use Bootloader version v2012.07 (or later) for full PM support\n"); ret = pwrdm_for_each(pwrdms_setup, NULL); if (ret) {