From patchwork Fri Apr 25 01:16:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 4057171 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 00491BFF02 for ; Fri, 25 Apr 2014 01:19:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1201520381 for ; Fri, 25 Apr 2014 01:19:07 +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 2B62620353 for ; Fri, 25 Apr 2014 01:19:06 +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 1WdUlA-0002dp-OW; Fri, 25 Apr 2014 01:17:00 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdUkt-0002Yb-5a for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 01:16:43 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4K00G9DBJ5N620@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 10:16:17 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 1F.75.18501.167B9535; Fri, 25 Apr 2014 10:16:17 +0900 (KST) X-AuditID: cbfee68d-b7f4e6d000004845-f7-5359b7613dfb Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 18.DF.27725.167B9535; Fri, 25 Apr 2014 10:16:17 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4K00ALCBJ2RP20@mmp2.samsung.com>; Fri, 25 Apr 2014 10:16:17 +0900 (KST) From: Chanwoo Choi To: kgene.kim@samsung.com, t.figa@samsung.com Subject: [PATCHv4 4/7] ARM: EXYNOS: Enter a15 lowpower mode for Exynos3250 based on Cortex-a7 Date: Fri, 25 Apr 2014 10:16:09 +0900 Message-id: <1398388572-30239-5-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1398388572-30239-1-git-send-email-cw00.choi@samsung.com> References: <1398388572-30239-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCIsWRmVeSWpSXmKPExsWyRsSkSDdxe2Swwbv9ChZ/Jx1jt5i07gCT xeX92hbXvzxntZh/5ByrxecPLUDx+xNYLHoXXGWzONv0ht1i0+NrrBaXd81hs5hxfh+Txe3L vBZ/7/xjszh1/TObxck/vYwWTw5/ZLWYMfklm8X6Ga9ZLI7NWMJo0f53L5vF3p2TGR3EPNbM W8Po0dLcw+bx+9ckRo+/q14we+ycdZfd4861PWwem5fUe1w50cTq0bdlFaPH501yAVxRXDYp qTmZZalF+nYJXBm/fl9hL3jBXfFsk0ID4xnOLkZODgkBE4mjS84wQthiEhfurWcDsYUEljJK /P7lDFPzdtFNli5GLqD4dEaJV3OnMEE4TUwS264tYwWpYhPQktj/4gZYt4iArsSUmXfA4swC rSwSfVtquhg5OIQF4iV2T9YHCbMIqEpcWnYVrIRXwFXiz8NLTBDL5CQ+7HnEDmJzCrh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Wleel6yfm5mxjBKeCZ 1A7GlQ0WhxgFOBiVeHg/qEUGC7EmlhVX5h5ilOBgVhLhVV4FFOJNSaysSi3Kjy8qzUktPsSY DHTURGYp0eR8YHrKK4k3NDYxM7I0Mje0MDI2J01YSZz3QKt1oJBAemJJanZqakFqEcwWJg5O qQZGq/MF6VbK1535r0toOj8yua5w5WOcd92sK6/y69V/zvE/+cz49dEU0WZRd/mnDfcsXPl+ rbg+N3JZ+4tdDgFzwl/4/tx8cXMId/z5ByLrprI+i/Np2Fu6NHz7x4i0w0c/+5qs4fkgaZC/ UVhqc0rl7s8ZFnMObP0vOzWb1aFF1ZFl9sQK3gZ+JZbijERDLeai4kQAfI+4/EUDAAA= 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-20140424_181643_384482_AD7FA35C X-CRM114-Status: GOOD ( 10.25 ) X-Spam-Score: -5.7 (-----) Cc: sajjan.linux@gmail.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, arnd@arndb.de, marc.zyngier@arm.com, hyunhee.kim@samsung.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, yj44.cho@samsung.com, inki.dae@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, 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.5 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);