Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1340465ima; Fri, 1 Feb 2019 22:02:43 -0800 (PST) X-Google-Smtp-Source: AHgI3Iaqjhd4/PXjUTk/WAVHmLcnFQIyZgLRxxb7y4yfo7Pt7nT+uz2wSwtpQ18XGwYGv8MaBtgo X-Received: by 2002:a62:e0c5:: with SMTP id d66mr1705789pfm.237.1549087363914; Fri, 01 Feb 2019 22:02:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549087363; cv=none; d=google.com; s=arc-20160816; b=ACD+zd20sOjzA66z5M99abQYBPky4JzlHVC9PkOHep4DCFpCywAzwx87KHD9nVbHmF x9h+ME7S8VakPNkwl6g88RYAFqVlhIlDed3FaLMe1meFNI6tyamMJIq59T0rGIE2Fqq4 XcKjJOEZh2hmnnLCbiA5oY6F1XqRpFxboTl75u+c+/RhgG/S0eovnEK9YShzf9LXO1bL 9aI9G+lFWVj17yGZu1Waq1NgtIogIrYu12hWvfSfIO8NRtDDbMJDxWHWiKm5R/r4hoUl 8gDIrB+31Mbo/vQ/4nWqVF7L2uK4UQ0sbNO3xnyZ6RZ4kvYyneNfmCN7U63Bv513nLaM RFgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=mjnVo9RxzXKkHISKFxWB5mdXJD6N2moKgDMpsvDssZk=; b=LsnlMPNp6/8PXoRG4RLqLhZp0+72zpga/5gOXNfBKvHebGgn9vsymWidvJorWWfvLX 7hgatATt3ChmL9yQpkYq4RdgmOukMXxzbfOWX9GfQ4JCAUFbq854E27Yuo5HBZ/ejSeq ON1++H6w0NuaLQXkmsp39Z4VDvLVSsPfGIz27HZl0SM7sNjd2jDDQkYdTsLVB4KxcZRP gw1q+Zm7fy2qhr041pTxoaggwJ120sXPBIAzNz+h7pnwWljaYl81FmP7crwQKwSl2e2Y UiA2nCrSwwajIeB5/AgI8sY2qKoaV9+58Gatcww3XxjVtsBgkkuYqe4lUQW1kU91ZIHT dx4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=myxFxPMm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb2si4055704plb.298.2019.02.01.22.01.41; Fri, 01 Feb 2019 22:02:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=myxFxPMm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfBBGBe (ORCPT + 99 others); Sat, 2 Feb 2019 01:01:34 -0500 Received: from mail.andi.de1.cc ([85.214.239.24]:47502 "EHLO h2641619.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725907AbfBBGBe (ORCPT ); Sat, 2 Feb 2019 01:01:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Message-Id:Date:Subject:Cc:To:From:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mjnVo9RxzXKkHISKFxWB5mdXJD6N2moKgDMpsvDssZk=; b=myxFxPMmQ3nxx11aOg4IlahlmL EcUIV4PBesDYjiyMQcvg65h6prAwGZKmgjDdBOVo4KIyt9G7iWYVfVkRNTsDiO+dcEjNBLZPDtpMk LIBVEIj+y3GngxMmeOcuYcIJQdYyG1/sdPtqrHRioMVnlrZeFPwlS6vHXKKxwfMUaIKg=; Received: from x2f7f150.dyn.telefonica.de ([2.247.241.80] helo=localhost) by h2641619.stratoserver.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gpoMh-0004F3-GR; Sat, 02 Feb 2019 07:01:19 +0100 Received: from andi by localhost with local (Exim 4.89) (envelope-from ) id 1gpoJy-0003Nx-2a; Sat, 02 Feb 2019 06:58:30 +0100 From: Andreas Kemnade To: tony@atomide.com, linux@armlinux.org.uk, khilman@kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org Cc: Andreas Kemnade Subject: [PATCH] omap3: give off mode enable a more prominent place Date: Sat, 2 Feb 2019 06:58:27 +0100 Message-Id: <20190202055827.12956-1-andreas@kemnade.info> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enabling off mode was only reachable deeply hidden in the debugfs. As powersaving is an important feature, move the option out of its shady place. The debugfs file can still be used to override the default. Signed-off-by: Andreas Kemnade --- arch/arm/mach-omap2/Kconfig | 8 ++++++++ arch/arm/mach-omap2/pm-debug.c | 4 ++++ arch/arm/mach-omap2/pm.h | 4 ++++ arch/arm/mach-omap2/pm34xx.c | 7 ++++++- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 5e33d1a90664..8305b94c0e57 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -231,6 +231,14 @@ config OMAP3_SDRC_AC_TIMING wish to say no. Selecting yes without understanding what is going on could result in system crashes; +config OMAP3_PM_OFFMODE + bool "Enable Off-Mode" + depends on ARCH_OMAP3 + help + Enables deeper power-saving states of the SOC, so that hwmods + do not only go to RET state but to OFF state. This option + is overridable via debugfs. + endmenu endif diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 5a8839203958..3474027112c2 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -37,7 +37,11 @@ #include "prm2xxx_3xxx.h" #include "pm.h" +#ifdef CONFIG_OMAP3_PM_OFFMODE +u32 enable_off_mode = 1; +#else u32 enable_off_mode; +#endif #ifdef CONFIG_DEBUG_FS #include diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index c73776b82348..cd5f98f4d28b 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -55,8 +55,12 @@ extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); #ifdef CONFIG_PM_DEBUG extern u32 enable_off_mode; #else +#ifdef CONFIG_OMAP3_PM_OFFMODE +#define enable_off_mode 1 +#else #define enable_off_mode 0 #endif +#endif #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 1a90050361f1..d7d83a09013f 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -416,7 +416,12 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) if (!pwrst) return -ENOMEM; pwrst->pwrdm = pwrdm; - pwrst->next_state = PWRDM_POWER_RET; + + if (IS_ENABLED(CONFIG_OMAP3_PM_OFFMODE)) + pwrst->next_state = PWRDM_POWER_OFF; + else + pwrst->next_state = PWRDM_POWER_RET; + list_add(&pwrst->node, &pwrst_list); if (pwrdm_has_hdwr_sar(pwrdm)) -- 2.11.0