From patchwork Mon Jul 21 07:45:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 4593571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 730E89F462 for ; Mon, 21 Jul 2014 07:49:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95880200EC for ; Mon, 21 Jul 2014 07:49:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4BB22010B for ; Mon, 21 Jul 2014 07:49:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X98JE-0003tA-9S; Mon, 21 Jul 2014 07:46:56 +0000 Received: from mail-bn1blp0187.outbound.protection.outlook.com ([207.46.163.187] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X98JB-0003pm-Q5 for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 07:46:54 +0000 Received: from BN3PR0301CA0052.namprd03.prod.outlook.com (25.160.152.148) by BLUPR03MB342.namprd03.prod.outlook.com (10.141.48.13) with Microsoft SMTP Server (TLS) id 15.0.990.7; Mon, 21 Jul 2014 07:46:30 +0000 Received: from BN1AFFO11FD047.protection.gbl (2a01:111:f400:7c10::185) by BN3PR0301CA0052.outlook.office365.com (2a01:111:e400:401e::20) with Microsoft SMTP Server (TLS) id 15.0.990.7 via Frontend Transport; Mon, 21 Jul 2014 07:46:30 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD047.mail.protection.outlook.com (10.58.53.62) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Mon, 21 Jul 2014 07:46:30 +0000 Received: from dragon.ap.freescale.net ([10.192.185.189]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s6L7kIuo008632; Mon, 21 Jul 2014 00:46:26 -0700 From: Shawn Guo To: Subject: [PATCH 2/3] ARM: smp_scu: enable SCU standby support Date: Mon, 21 Jul 2014 15:45:54 +0800 Message-ID: <1405928755-19413-3-git-send-email-shawn.guo@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405928755-19413-1-git-send-email-shawn.guo@freescale.com> References: <1405928755-19413-1-git-send-email-shawn.guo@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(46102001)(76482001)(62966002)(110136001)(31966008)(68736004)(92566001)(229853001)(87286001)(81542001)(50466002)(69596002)(86362001)(84676001)(106466001)(92726001)(83322001)(50986999)(102836001)(85306003)(97736001)(81342001)(76176999)(575784001)(19580395003)(87936001)(48376002)(2351001)(79102001)(6806004)(47776003)(77982001)(85852003)(36756003)(74502001)(107046002)(81156004)(26826002)(20776003)(88136002)(83072002)(64706001)(19580405001)(74662001)(33646002)(80022001)(105606002)(50226001)(104016003)(93916002)(44976005)(21056001)(89996001)(99396002)(77156001)(95666004)(4396001)(104166001); DIR:OUT; SFP:; SCL:1; SRVR:BLUPR03MB342; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0279B3DD0D Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=Shawn.Guo@freescale.com; X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_004653_995598_48213AD2 X-CRM114-Status: UNSURE ( 8.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Nicolas Pitre , Rob Herring , Russell King , Will Deacon , Gregory Clement , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With SCU standby enabled, SCU CLK will be turned off when all processors are in WFI mode. And the clock will be turned on when any processor leaves WFI mode. This behavior should be preferable in terms of power efficiency of system idle. So let's set the SCU standby bit to enable the support in function scu_enable(). Signed-off-by: Shawn Guo --- arch/arm/kernel/smp_scu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index c947508f84e6..9f29d167d02c 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c @@ -18,6 +18,7 @@ #define SCU_CTRL 0x00 #define SCU_ENABLE (1 << 0) +#define SCU_STANDBY_ENABLE (1 << 5) #define SCU_CONFIG 0x04 #define SCU_CPU_STATUS 0x08 #define SCU_INVALIDATE 0x0c @@ -54,7 +55,7 @@ void scu_enable(void __iomem *scu_base) if (scu_ctrl & SCU_ENABLE) return; - scu_ctrl |= SCU_ENABLE; + scu_ctrl |= SCU_ENABLE | SCU_STANDBY_ENABLE; writel_relaxed(scu_ctrl, scu_base + SCU_CTRL); /*