From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752929AbbDBLSR (ORCPT ); Thu, 2 Apr 2015 07:18:17 -0400 Received: from mail-bl2on0138.outbound.protection.outlook.com ([65.55.169.138]:39744 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751391AbbDBLSP convert rfc822-to-8bit (ORCPT ); Thu, 2 Apr 2015 07:18:15 -0400 From: "chenhui.zhao@freescale.com" To: Scott Wood CC: "linuxppc-dev@lists.ozlabs.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Jason.Jin@freescale.com" Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Thread-Topic: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Thread-Index: AQHQa1tSK6K/rzQ6Hkekl4cjS0ivCZ05llKI Date: Thu, 2 Apr 2015 11:18:11 +0000 Message-ID: <1427973492199.86521@freescale.com> References: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com>,<20150331023507.GD5667@home.buserror.net> In-Reply-To: <20150331023507.GD5667@home.buserror.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.59.231.64] authentication-results: lists.ozlabs.org; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1481; x-microsoft-antispam-prvs: x-forefront-antispam-report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(6029001)(51704005)(24454002)(19580395003)(19580405001)(40100003)(99286002)(122556002)(92566002)(54356999)(110136001)(62966003)(77156002)(50986999)(76176999)(86362001)(77096005)(102836002)(66066001)(106116001)(2900100001)(46102003)(36756003)(2950100001)(2656002)(87936001)(117636001)(586874001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1481;H:BY2PR03MB396.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:BY1PR03MB1481;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1481; x-forefront-prvs: 0534947130 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2015 11:18:11.6163 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1481 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ________________________________________ From: Wood Scott-B07421 Sent: Tuesday, March 31, 2015 10:35 To: Zhao Chenhui-B35336 Cc: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Jin Zhengxiong-R64188 Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM On Thu, Mar 26, 2015 at 06:18:15PM +0800, chenhui zhao wrote: > In sleep mode, the clocks of e500 cores and unused IP blocks is > turned off. The IP blocks which are allowed to wake up the processor > are still running. > > The sleep mode is equal to the Standby state in Linux. Use the > command to enter sleep mode: > echo standby > /sys/power/state > > Signed-off-by: Chenhui Zhao > --- > arch/powerpc/Kconfig | 3 +- > arch/powerpc/platforms/85xx/Kconfig | 5 +++ > arch/powerpc/platforms/85xx/Makefile | 1 + > arch/powerpc/platforms/85xx/qoriq_pm.c | 59 ++++++++++++++++++++++++++++++++++ > arch/powerpc/platforms/86xx/Kconfig | 1 + > 5 files changed, 67 insertions(+), 2 deletions(-) > create mode 100644 arch/powerpc/platforms/85xx/qoriq_pm.c > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 9846c83..162eb53 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -233,7 +233,7 @@ config ARCH_HIBERNATION_POSSIBLE > config ARCH_SUSPEND_POSSIBLE > def_bool y > depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ > - (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \ > + FSL_SOC_BOOKE || PPC_86xx || PPC_PSERIES \ > || 44x || 40x > > config PPC_DCR_NATIVE > @@ -747,7 +747,6 @@ config FSL_PCI > > config FSL_PMC > bool > - default y > depends on SUSPEND && (PPC_85xx || PPC_86xx) Get rid of this depends line if you're going to use select instead. > +static int qoriq_suspend_valid(suspend_state_t state) > +{ > + unsigned int pm_modes; > + > + pm_modes = qoriq_pm_ops->get_pm_modes(); > + > + if ((state == PM_SUSPEND_STANDBY) && (pm_modes & FSL_PM_SLEEP)) > + return 1; Unnecessary parentheses around == -Scott [chenhui] OK From mboxrd@z Thu Jan 1 00:00:00 1970 From: "chenhui.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org" Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Date: Thu, 2 Apr 2015 11:18:11 +0000 Message-ID: <1427973492199.86521@freescale.com> References: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com>,<20150331023507.GD5667@home.buserror.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <20150331023507.GD5667-vONcSABrMOVpTrP2zolEsF6hYfS7NtTn@public.gmane.org> Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Scott Wood Cc: "linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "Jason.Jin-KZfg59tc24xl57MIdRCFDg@public.gmane.org" List-Id: devicetree@vger.kernel.org ________________________________________ From: Wood Scott-B07421 Sent: Tuesday, March 31, 2015 10:35 To: Zhao Chenhui-B35336 Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Jin Zhengxiong-R64188 Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM On Thu, Mar 26, 2015 at 06:18:15PM +0800, chenhui zhao wrote: > In sleep mode, the clocks of e500 cores and unused IP blocks is > turned off. The IP blocks which are allowed to wake up the processor > are still running. > > The sleep mode is equal to the Standby state in Linux. Use the > command to enter sleep mode: > echo standby > /sys/power/state > > Signed-off-by: Chenhui Zhao > --- > arch/powerpc/Kconfig | 3 +- > arch/powerpc/platforms/85xx/Kconfig | 5 +++ > arch/powerpc/platforms/85xx/Makefile | 1 + > arch/powerpc/platforms/85xx/qoriq_pm.c | 59 ++++++++++++++++++++++++++++++++++ > arch/powerpc/platforms/86xx/Kconfig | 1 + > 5 files changed, 67 insertions(+), 2 deletions(-) > create mode 100644 arch/powerpc/platforms/85xx/qoriq_pm.c > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 9846c83..162eb53 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -233,7 +233,7 @@ config ARCH_HIBERNATION_POSSIBLE > config ARCH_SUSPEND_POSSIBLE > def_bool y > depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ > - (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \ > + FSL_SOC_BOOKE || PPC_86xx || PPC_PSERIES \ > || 44x || 40x > > config PPC_DCR_NATIVE > @@ -747,7 +747,6 @@ config FSL_PCI > > config FSL_PMC > bool > - default y > depends on SUSPEND && (PPC_85xx || PPC_86xx) Get rid of this depends line if you're going to use select instead. > +static int qoriq_suspend_valid(suspend_state_t state) > +{ > + unsigned int pm_modes; > + > + pm_modes = qoriq_pm_ops->get_pm_modes(); > + > + if ((state == PM_SUSPEND_STANDBY) && (pm_modes & FSL_PM_SLEEP)) > + return 1; Unnecessary parentheses around == -Scott [chenhui] OK-- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0147.outbound.protection.outlook.com [157.56.110.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 8071F1A0895 for ; Thu, 2 Apr 2015 22:33:43 +1100 (AEDT) From: "chenhui.zhao@freescale.com" To: Scott Wood Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Date: Thu, 2 Apr 2015 11:18:11 +0000 Message-ID: <1427973492199.86521@freescale.com> References: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com>, <20150331023507.GD5667@home.buserror.net> In-Reply-To: <20150331023507.GD5667@home.buserror.net> Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Cc: "devicetree@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "Jason.Jin@freescale.com" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ________________________________________ From: Wood Scott-B07421 Sent: Tuesday, March 31, 2015 10:35 To: Zhao Chenhui-B35336 Cc: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; linux-kernel= @vger.kernel.org; Jin Zhengxiong-R64188 Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with R= CPM On Thu, Mar 26, 2015 at 06:18:15PM +0800, chenhui zhao wrote: > In sleep mode, the clocks of e500 cores and unused IP blocks is > turned off. The IP blocks which are allowed to wake up the processor > are still running. > > The sleep mode is equal to the Standby state in Linux. Use the > command to enter sleep mode: > echo standby > /sys/power/state > > Signed-off-by: Chenhui Zhao > --- > arch/powerpc/Kconfig | 3 +- > arch/powerpc/platforms/85xx/Kconfig | 5 +++ > arch/powerpc/platforms/85xx/Makefile | 1 + > arch/powerpc/platforms/85xx/qoriq_pm.c | 59 ++++++++++++++++++++++++++++= ++++++ > arch/powerpc/platforms/86xx/Kconfig | 1 + > 5 files changed, 67 insertions(+), 2 deletions(-) > create mode 100644 arch/powerpc/platforms/85xx/qoriq_pm.c > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 9846c83..162eb53 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -233,7 +233,7 @@ config ARCH_HIBERNATION_POSSIBLE > config ARCH_SUSPEND_POSSIBLE > def_bool y > depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ > - (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \ > + FSL_SOC_BOOKE || PPC_86xx || PPC_PSERIES \ > || 44x || 40x > > config PPC_DCR_NATIVE > @@ -747,7 +747,6 @@ config FSL_PCI > > config FSL_PMC > bool > - default y > depends on SUSPEND && (PPC_85xx || PPC_86xx) Get rid of this depends line if you're going to use select instead. > +static int qoriq_suspend_valid(suspend_state_t state) > +{ > + unsigned int pm_modes; > + > + pm_modes =3D qoriq_pm_ops->get_pm_modes(); > + > + if ((state =3D=3D PM_SUSPEND_STANDBY) && (pm_modes & FSL_PM_SLEEP)) > + return 1; Unnecessary parentheses around =3D=3D -Scott [chenhui] OK=