From patchwork Tue Jul 29 17:21:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 4641601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6881AC0338 for ; Tue, 29 Jul 2014 17:24:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9DFF62010B for ; Tue, 29 Jul 2014 17:24:09 +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 DD48920108 for ; Tue, 29 Jul 2014 17:24:08 +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 1XCB6U-0003fl-BS; Tue, 29 Jul 2014 17:22:22 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCB6J-0003Sq-50 for linux-arm-kernel@lists.infradead.org; Tue, 29 Jul 2014 17:22:20 +0000 Received: by mail-pa0-f50.google.com with SMTP id et14so12685345pad.37 for ; Tue, 29 Jul 2014 10:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=anD/4bOzH7FoeXbqDWSTus6WlXHmjgb4fXar8XuXrHo=; b=eA0Li7FPnNMlITyrjPHkdD0NZAinVt7SMBbRBgOOJdDp0RvYS6hnbECvSaNxJRTrRz 0p72jBLs23Oe2lWEz9Zcp5abIBpsfnND5vFZMWMraoFyKVJbRoRqyTd283E3Sa8hrd8I ZFXLn8H2mjZDf4lopjY6lxt6KH5+2/Cij6Camv7hihQ+bj0P8E9M2MIdBUoQhHgsDlw0 7foAH7dZuiI7x93QeG1nqXEYXEkjyAu7BkVFnwmcCC6phD3v0cYLm6lsd+IFsd3W07mY xmjVucGCgZnK0fYGXFyAdZcF9flXg0oLlS5NQLEMltRBZOz1cmydMvzBszxGRkLE49FU wLeg== X-Received: by 10.68.200.101 with SMTP id jr5mr3553352pbc.36.1406654507897; Tue, 29 Jul 2014 10:21:47 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id gn10sm21311788pbc.45.2014.07.29.10.21.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Jul 2014 10:21:46 -0700 (PDT) From: Soren Brinkmann To: Russell King Subject: [PATCH] ARM: smp_scu: Enable standby mode Date: Tue, 29 Jul 2014 10:21:03 -0700 Message-Id: <1406654463-15475-1-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.0.1.1.gfbfc394 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140729_102211_251339_BDA85145 X-CRM114-Status: GOOD ( 14.74 ) X-Spam-Score: -0.7 (/) Cc: Will Deacon , Michal Simek , linux-kernel@vger.kernel.org, Ben Dooks , linux-arm-kernel@lists.infradead.org, Soren Brinkmann 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=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Enable the SCU standby mode. From documentation: When set, SCU CLK is turned off when all processors are in WFI mode, there is no pending request on the ACP (if implemented), and there is no remaining activity in the SCU. When SCU CLK is off, ARREADYS, AWREADYS and WREADYS on the ACP are forced LOW. The clock is turned on when any processor leaves WFI mode, or if there is a new request on the ACP. Signed-off-by: Soren Brinkmann --- Hi, I am working on some PM related patches for Zynq. One of them is enabling the SCU standby mode. I was wondering whether this is probably something that I should not do in platform specific code, but rather in the common code for everybody? Thanks, Sören --- arch/arm/kernel/smp_scu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 1aafa0d785eb..82548a76740d 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c @@ -22,6 +22,9 @@ #define SCU_INVALIDATE 0x0c #define SCU_FPGA_REVISION 0x10 +#define SCU_CTRL_ENABLE BIT(0) +#define SCU_CTRL_STANDBY_ENABLE BIT(5) + #ifdef CONFIG_SMP /* * Get the number of CPU cores from the SCU configuration @@ -53,7 +56,7 @@ void scu_enable(void __iomem *scu_base) if (scu_ctrl & 1) return; - scu_ctrl |= 1; + scu_ctrl |= SCU_CTRL_ENABLE | SCU_CTRL_STANDBY_ENABLE; writel_relaxed(scu_ctrl, scu_base + SCU_CTRL); /*