From patchwork Tue May 13 12:02:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 4167151 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 6C5C09F3EE for ; Tue, 13 May 2014 12:04:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71F7820222 for ; Tue, 13 May 2014 12:04:18 +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 47E1E20304 for ; Tue, 13 May 2014 12:04:17 +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 1WkBP1-0002mO-Gg; Tue, 13 May 2014 12:01:47 +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 1WkBOj-0002Ht-Hz for linux-arm-kernel@lists.infradead.org; Tue, 13 May 2014 12:01:30 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5I00CKMHDVGVA0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 13 May 2014 21:01:07 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 20.D3.11496.38902735; Tue, 13 May 2014 21:01:07 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-07-537209831043 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E7.A2.25708.28902735; Tue, 13 May 2014 21:01:07 +0900 (KST) Received: from abhilash-ubuntu.sisodomain.com ([107.108.73.92]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5I00KFXHCNJQ30@mmp2.samsung.com>; Tue, 13 May 2014 21:01:06 +0900 (KST) From: Abhilash Kesavan To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com, vikas.sajjan@samsung.com, t.figa@samsung.com Subject: [PATCH v4 2/4] arm: exynos: Modify code to check for cortex A9 rather than the SoC Date: Tue, 13 May 2014 17:32:00 +0530 Message-id: <1399982522-27928-3-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399982522-27928-1-git-send-email-a.kesavan@samsung.com> References: <1399982522-27928-1-git-send-email-a.kesavan@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWRmVeSWpSXmKPExsWyRsSkWreZsyjYYHYfv8XjNYuZLHoXXGWz 2PT4GqvFjPP7mCzWz3jNYnHz2XYmBzaPzUvqPfq2rGL0+LxJLoA5issmJTUnsyy1SN8ugSuj 6f9BpoIugYpfB44wNTBO5+1i5OSQEDCROLCgnwXCFpO4cG89WxcjF4eQwFJGibV93WwwRevb /rNAJKYzStxa+5kdwuljklj59wdYO5uAnsSCf1+ZQRIiApMYJVrnT2ICSTAL6EhsmL8erEhY IFaiedFrsDiLgKrE0S372EFsXgFXiaN3XwA1cwCtU5CYM8kGxOQUcJN42pAFUiEEVLHi7VFG kPESAu3sEsfPtzNCjBGQ+Db5EAtEq6zEpgPMEEdLShxccYNlAqPwAkaGVYyiqQXJBcVJ6UWm esWJucWleel6yfm5mxiBYXz637OJOxjvH7A+x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q38Sbecf1hEmPca9V8hGEl +7ecRKfZc3q/Xb64ilXjtG302rdKLMUZiYZazEXFiQDIlbFW1gIAAA== 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-20140513_050129_790985_8BB87775 X-CRM114-Status: GOOD ( 10.82 ) X-Spam-Score: -5.7 (-----) Cc: Abhilash Kesavan 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 We have an soc check to ensure that the scu and certain A9 specific registers are not accessed on Exynos5250 (which is A15 based). Rather than adding another soc specific check for 5420 let us test for the Cortex A9 primary part number. Signed-off-by: Abhilash Kesavan --- arch/arm/mach-exynos/pm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 5effd38..95f8086 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -248,7 +248,7 @@ static int exynos_pm_suspend(void) tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); regmap_write(pmu_regmap, S5P_CENTRAL_SEQ_OPTION, tmp); - if (!soc_is_exynos5250()) + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) exynos_cpu_save_register(); return 0; @@ -282,7 +282,7 @@ static void exynos_pm_resume(void) if (exynos_pm_central_resume()) goto early_wakeup; - if (!soc_is_exynos5250()) + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) exynos_cpu_restore_register(); /* For release retention */ @@ -301,7 +301,7 @@ static void exynos_pm_resume(void) s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); - if (!soc_is_exynos5250()) + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) scu_enable(S5P_VA_SCU); early_wakeup: @@ -388,15 +388,18 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self, case CPU_PM_ENTER: if (cpu == 0) { exynos_pm_central_suspend(); - exynos_cpu_save_register(); + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) + exynos_cpu_save_register(); } break; case CPU_PM_EXIT: if (cpu == 0) { - if (!soc_is_exynos5250()) + if (read_cpuid_part_number() == + ARM_CPU_PART_CORTEX_A9) { scu_enable(S5P_VA_SCU); - exynos_cpu_restore_register(); + exynos_cpu_restore_register(); + } exynos_pm_central_resume(); } break;