From patchwork Tue Apr 15 01:59:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 3988481 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 2BBFA9F336 for ; Tue, 15 Apr 2014 02:02:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB12220121 for ; Tue, 15 Apr 2014 02:02:57 +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 A4F77200E9 for ; Tue, 15 Apr 2014 02:02:56 +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 1WZsfp-0007Ao-RF; Tue, 15 Apr 2014 02:00:33 +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 1WZsfY-0005oJ-0T for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 02:00:16 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4100G31UVW0P20@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 10:59:56 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.112]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 81.8E.10092.C929C435; Tue, 15 Apr 2014 10:59:56 +0900 (KST) X-AuditID: cbfee68f-b7f156d00000276c-1b-534c929c1031 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 94.4E.29263.B929C435; Tue, 15 Apr 2014 10:59:56 +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 <0N4100LE6UVPW9A0@mmp1.samsung.com>; Tue, 15 Apr 2014 10:59:55 +0900 (KST) From: Chanwoo Choi To: linux-kernel@vger.kernel.org Subject: [PATCHv2 6/8] ARM: EXYNOS: Enter a15 lowpower mode for Exynos3250 based on Cortex-a7 Date: Tue, 15 Apr 2014 10:59:50 +0900 Message-id: <1397527192-21988-7-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1397527192-21988-1-git-send-email-cw00.choi@samsung.com> References: <1397527192-21988-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWyRsSkQHfOJJ9gg/1NwhZ/Jx1jt5i07gCT xeX92hbXvzxntZh/5ByrxecPLewWvQuuslmcbXrDbrHp8TVWi8u75rBZzDi/j8ni9mVei793 /rFZnLr+GSg0+SWbxfoZr1ksjs1Ywmixd+dkRgchjzXz1jB6tDT3sHn8/jWJ0ePvqhfMHneu 7WHz2Lyk3uPKiSZWj74tqxg9Pm+SC+CM4rJJSc3JLEst0rdL4Mp4MYu14B1XxenvHawNjI84 uhg5OSQETCS2v93LDGGLSVy4t54NxBYSWMoosXGJCUzNu49vgOJcQPFFjBJbb01ghXCamCTe f33DClLFJqAlsf/FDbBuEQEFic29z8CKmAXWMktcnNQIlODgEBaIl9jRATaVRUBV4t3k/2Cb eQVcJVbefs8CsU1O4sOeR+wgNqeAm8Te+3+ZIS5ylVi/fzYTyEwJgVYOib+vGtkhBglIfJt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vqg0J7X4EGMy0FUTmaVEk/OBCSevJN7Q2MTMyNLI3NDCyNic NGElcd4DrdaBQgLpiSWp2ampBalFMFuYODilGhjtX9W+aK8+n+mi53EqT/yrzt5XH1VOlDRm Sane3nL+ucGkhJ/ac7uFpu3s7cidqlxit1Ft1cLKpcznG8t2M9u8yn8uad2jZb3uEUvtkvdz Dz2/X7NPbut6HvZn2WwLhLy4mHf28yy8eXXBlnNft/Wl999SNLDY9YStzvW3afeiBQfZ8rzN C+2VWIozEg21mIuKEwGT9Q1yLgMAAA== 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-20140414_190016_193999_DBE11CEB X-CRM114-Status: GOOD ( 10.06 ) X-Spam-Score: -6.0 (------) Cc: 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, linux-arm-kernel@lists.infradead.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.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 This patch decide proper lowpower mode of either a15 or a9 according to own ID from Main ID register. Signed-off-by: Chanwoo Choi Acked-by: Kyungmin Park --- arch/arm/mach-exynos/hotplug.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 5eead53..99e54e0 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -135,16 +135,22 @@ 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 + * we're ready for shutdown now, so do it. Exynos4 is A9 based + * while Exynos5 is A15/Exynos3 is A7; check the CPU part * number by reading the Main ID register and then perform the * appropriate sequence for entering low power. */ - 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);