From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0144.outbound.protection.outlook.com [157.56.110.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B40521A0895 for ; Tue, 31 Mar 2015 13:35:22 +1100 (AEDT) Date: Mon, 30 Mar 2015 21:35:07 -0500 From: Scott Wood To: chenhui zhao Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Message-ID: <20150331023507.GD5667@home.buserror.net> References: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" In-Reply-To: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com> 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: , 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Date: Mon, 30 Mar 2015 21:35:07 -0500 Message-ID: <20150331023507.GD5667@home.buserror.net> References: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com> Sender: linux-kernel-owner@vger.kernel.org To: chenhui zhao Cc: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jason.Jin@freescale.com List-Id: devicetree@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073AbbCaCfT (ORCPT ); Mon, 30 Mar 2015 22:35:19 -0400 Received: from mail-bn1bn0107.outbound.protection.outlook.com ([157.56.110.107]:33772 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753953AbbCaCfQ (ORCPT ); Mon, 30 Mar 2015 22:35:16 -0400 Date: Mon, 30 Mar 2015 21:35:07 -0500 From: Scott Wood To: chenhui zhao CC: , , , Subject: Re: [4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Message-ID: <20150331023507.GD5667@home.buserror.net> References: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1427365095-26396-4-git-send-email-chenhui.zhao@freescale.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: BLUPR01CA046.prod.exchangelabs.com (25.160.23.36) To BN3PR03MB1477.namprd03.prod.outlook.com (25.163.35.140) Authentication-Results: freescale.com; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1477; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(6029001)(51704005)(24454002)(47776003)(97756001)(46406003)(122386002)(92566002)(77156002)(50466002)(53416004)(2950100001)(86362001)(62966003)(76176999)(87976001)(50986999)(110136001)(19580395003)(19580405001)(33656002)(42186005)(54356999)(40100003)(23726002)(46102003)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1477;H:home.buserror.net;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BN3PR03MB1477;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1477; X-Forefront-PRVS: 0532BF6DC2 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2015 02:35:13.1257 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1477 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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