From patchwork Fri Apr 18 01:15:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 4012511 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 31EFE9F2CC for ; Fri, 18 Apr 2014 01:19:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70CF8201BF for ; Fri, 18 Apr 2014 01:19:12 +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 2E65D20320 for ; Fri, 18 Apr 2014 01:19:11 +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 1WaxPd-0006ae-0c; Fri, 18 Apr 2014 01:16:17 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaxPG-0006UK-B2 for linux-arm-kernel@lists.infradead.org; Fri, 18 Apr 2014 01:15:55 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4700ALLCTS0N10@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 18 Apr 2014 10:15:29 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 88.C8.12635.0BC70535; Fri, 18 Apr 2014 10:15:28 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-d6-53507cb075fa Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 82.B3.28157.0BC70535; Fri, 18 Apr 2014 10:15:28 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4700C5CCTPZG70@mmp1.samsung.com>; Fri, 18 Apr 2014 10:15:28 +0900 (KST) From: Chanwoo Choi To: linux-kernel@vger.kernel.org Subject: [PATCHv3 4/7] ARM: EXYNOS: Enter a15 lowpower mode for Exynos3250 based on Cortex-a7 Date: Fri, 18 Apr 2014 10:15:25 +0900 Message-id: <1397783728-6193-5-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1397783728-6193-1-git-send-email-cw00.choi@samsung.com> References: <1397783728-6193-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMIsWRmVeSWpSXmKPExsWyRsSkSHdDTUCwwcMX5hZ/Jx1jt5i07gCT xeX92hbXvzxntZh/5ByrxecPLewWvQuuslmcbXrDbrHp8TVWi8u75rBZzDi/j8ni9mVei793 /rFZnLr+mc3i5J9eRosnhz+yWsyY/JLNYv2M1ywWx2YsYbRo/7uXzWLvzsmMDqIea+atYfRo ae5h8/j9axKjx99VL5g9ds66y+5x59oeNo/NS+o9rpxoYvXo27KK0ePzJrkArigum5TUnMyy 1CJ9uwSujF+/r7AXvOCueLZJoYHxDGcXIyeHhICJxJFbD5ggbDGJC/fWs3UxcnEICSxllNhy rZEdpujX1eXMEIlFjBLHTl5ghHCamCT6jyxmA6liE9CS2P/iBpgtIqAgsbn3GStIEbPAL2aJ n8+bwUYJC8RL7Dz0E6yIRUBV4t6Bl2A2r4CLxPazn6DukJP4sOcRWD2ngKvE+cdHWEB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H/THoH46oG i0OMAhyMSjy8F776BwuxJpYVV+YeYpTgYFYS4VUuDQgW4k1JrKxKLcqPLyrNSS0+xJgMdNVE ZinR5HxgasoriTc0NjEzsjQyN7QwMjYnTVhJnPdgq3WgkEB6YklqdmpqQWoRzBYmDk6pBsbe cofmEpWMyT12XHeEQvMm75j7sX/RNl1bk7d+Sd5tthFHHG7EuCV/qdqw4ZBc38Xle36+ftVj YqDhdP1P+Lf/SyStA7d/MT3DoWx3o3qTneCOVZxrxWdxJd+94Pz21rSgNyH7LRbnHjt2eOK9 r9zdyh6+DVVT5kpYWt9Zeso+6wLzouyJ67OUWIozEg21mIuKEwEUh051QwMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140417_181554_551967_7AE0B61F X-CRM114-Status: GOOD ( 10.92 ) X-Spam-Score: -5.7 (-----) Cc: sajjan.linux@gmail.com, devicetree@vger.kernel.org, kgene.kim@samsung.com, linux@arm.linux.org.uk, arnd@arndb.de, marc.zyngier@arm.com, t.figa@samsung.com, hyunhee.kim@samsung.com, sw0312.kim@samsung.com, yj44.cho@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org, ben-linux@fluff.org, olof@lixom.net, chanho61.park@samsung.com, sachin.kamat@linaro.org, linux-arm-kernel@lists.infradead.org, tushar.behera@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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.6 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 This patch decide proper lowpower mode of either a15 or a9 according to own ID from Main ID register. Cc: Arnd Bergmann Cc: Marc Zynigier Signed-off-by: Chanwoo Choi Acked-by: Kyungmin Park --- arch/arm/mach-exynos/hotplug.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 5eead53..acf3119 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -135,16 +135,21 @@ void __ref exynos_cpu_die(unsigned int cpu) int primary_part = 0; /* - * we're ready for shutdown now, so do it. - * Exynos4 is A9 based while Exynos5 is A15; check the CPU part - * number by reading the Main ID register and then perform the - * appropriate sequence for entering low power. + * Prepare the CPU for shutting down. The required sequence of + * operations depends on core type. CPUID part number can be used to + * determine the right way. */ - asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc"); - if ((primary_part & 0xfff0) == 0xc0f0) + primary_part = read_cpuid_part_number(); + + switch (primary_part) { + case ARM_CPU_PART_CORTEX_A7: + case ARM_CPU_PART_CORTEX_A15: cpu_enter_lowpower_a15(); - else + break; + default: cpu_enter_lowpower_a9(); + break; + } platform_do_lowpower(cpu, &spurious);