From patchwork Tue Jun 13 09:46:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 9783511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25BFE60325 for ; Tue, 13 Jun 2017 09:48:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16F972864B for ; Tue, 13 Jun 2017 09:48:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0ADC928650; Tue, 13 Jun 2017 09:48:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 976302864B for ; Tue, 13 Jun 2017 09:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=aU45biBap4hIdXggYp9bKuJR8J8OExXpiRuCtdy8XA4=; b=rHVhnC7tpTwUpFWwLg8BdHXO63 F52R7kDmnX09iiPPnwak3TLsl7aQizb40MuP6WllduR45GiUYuaCmH/l6dAhPkfLqcCUblD7BNIHQ QTne8BlP4HMrKwImjeS8Fr8k8sXNLPLPYUETZgssP1WT1CTpAbreajHk/psQMJeH90bS1dSbPekqC jIeN0ddUmKErXrUVq1lhvGynB65eymk+UMxFurkD+hNyZIRZe0R4cVFLBqJW78ilteeEGYMjIah46 2Ihj6KG5k6dtFVgyxNfOpk4sPwCdXgzLaPz9sLSaSSLf8G1SSVrzpG6QAEjJhD2sPmB0PGugEu9tv v1zu231w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKiR1-0007ux-Hx; Tue, 13 Jun 2017 09:48:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKiPV-0007WG-Tg for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2017 09:46:55 +0000 Received: from mail.kernel.org (host-091-097-026-085.ewe-ip-backbone.de [91.97.26.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9036D2133F; Tue, 13 Jun 2017 09:46:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9036D2133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sre@kernel.org From: Sebastian Reichel To: Sebastian Reichel , Tony Lindgren , Kevin Hilman Subject: [PATCHv2] ARM: OMAP: PM: stop early on systems without twl Date: Tue, 13 Jun 2017 11:46:17 +0200 Message-Id: <20170613094617.29166-1-sre@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170612102527.GX3730@atomide.com> References: <20170612102527.GX3730@atomide.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170613_024653_984525_D97A7538 X-CRM114-Status: GOOD ( 11.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sebastian Reichel , linux-omap@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sebastian Reichel Motorola Droid 4 has an OMAP4, but no TWL6030. It currently complains verbosely about this during boot: twl: not initialized twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1410000 Vs max 1316660 omap2_set_init_voltage: unable to find boot up OPP for vdd_core omap2_set_init_voltage: unable to set vdd_core omap2_set_init_voltage: unable to find boot up OPP for vdd_iva omap2_set_init_voltage: unable to set vdd_iva While proper support for CPCAP should be added at some point, let's exit early in omap2_common_pm_late_init() until that has been implemented to avoid the above errors. There is still a reminder about missing PM in dmesg: Missing OMAP4 PM for this platform! Signed-off-by: Sebastian Reichel --- Changes since PATCHv1: * actually add the message about missing PM support * check if TWL is enabled at all --- arch/arm/mach-omap2/pm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 63027e60cc20..92e335decc61 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -240,6 +240,10 @@ omap_postcore_initcall(omap2_common_pm_init); int __init omap2_common_pm_late_init(void) { +#if IS_BUILTIN(CONFIG_TWL6040_CORE) || IS_BUILTIN(CONFIG_TWL4030_CORE) + if (!twl_rev()) + goto no_twl; + /* Init the voltage layer */ omap3_twl_init(); omap4_twl_init(); @@ -253,4 +257,9 @@ int __init omap2_common_pm_late_init(void) omap_devinit_smartreflex(); return 0; + +no_twl: +#endif + pr_err("OMAP4 PM not supported!\n"); + return -ENODEV; }