From patchwork Mon Dec 31 19:09:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Kukjin X-Patchwork-Id: 1921791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 8B9613FED4 for ; Mon, 31 Dec 2012 19:14:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TpkkL-0002j5-S8; Mon, 31 Dec 2012 19:10:02 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TpkkH-0002in-ER for linux-arm-kernel@lists.infradead.org; Mon, 31 Dec 2012 19:09:59 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFW006QDT8GBA10@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 01 Jan 2013 04:09:52 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.49]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 84.EA.12699.003E1E05; Tue, 01 Jan 2013 04:09:52 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-a9-50e1e300f137 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 54.EA.12699.003E1E05; Tue, 01 Jan 2013 04:09:52 +0900 (KST) Received: from localhost.localdomain ([105.128.18.183]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFW00MKFT8AFZ10@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 01 Jan 2013 04:09:52 +0900 (KST) From: Kukjin Kim To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: enable 4 cores secondary cpu up for exynos5440 Date: Mon, 31 Dec 2012 11:09:40 -0800 Message-id: <1356980980-3387-1-git-send-email-kgene.kim@samsung.com> X-Mailer: git-send-email 1.7.10.4 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrILMWRmVeSWpSXmKPExsVy+t8zQ12Gxw8DDL43yVtsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6Mq6f2MRdcFapouLucpYHxGV8XIweHhICJxJmVBV2MnECmmMSF e+vZuhi5OIQEljFK3Lr1mQkiYSLxetISFojEIkaJN2++MkI4G5gktm/ZyQ5SxSagIXH4/TN2 kKkiAt4Sy68pgoSZBdQkbhx6ywxiCwv4SHw/t5kJpIRFQFVi884QkDCvgIvEro1zWCF2KUp0 P5vABmKzCAhIfJt8iAXiTlmJTQeYQbZKCOxgk9j89R/UbZISB1fcYJnAKLiAkWEVo2hqQXJB cVJ6rpFecWJucWleul5yfu4mRkg4Se9gXNVgcYhRgINRiYeXk+lhgBBrYllxZe4hRgkOZiUR 3lP3gEK8KYmVValF+fFFpTmpxYcYfYAumcgsJZqcDwz1vJJ4Q2NjEzMTUxNzS1NzUxzCSuK8 zR4pAUIC6YklqdmpqQWpRTDjmDg4pRoY/ees9Z99oPzPTFv90F6X8zfUM1c9DC1zkLgk7/gn atmxI6zuS7htzU8dncVX2xezs8jo7LwpZ88Ydtzr/dDP65+0ts42tlkg49C27ZYfuvYxtV9+ /mWx4891PzjDF07N4ZqikPyib828KQcavll8ffTTgV3H9Hkiyz8h94stVz/orzzbLJwrocRS nJFoqMVcVJwIAKt0G1ZUAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t9jAV2Gxw8DDFbMkrbY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhHWMGVdP7WMuuCpU0XB3OUsD 4zO+LkZODgkBE4nXk5awQNhiEhfurWfrYuTiEBJYxCjx5s1XRghnA5PE9i072UGq2AQ0JA6/ fwZkc3CICHhLLL+mCBJmFlCTuHHoLTOILSzgI/H93GYmkBIWAVWJzTtDQMK8Ai4SuzbOYYXY pSjR/WwC2wRG7gWMDKsYRVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgsP1mfQOxlUNFocYBTgY lXh4OZkeBgixJpYVV+YeYpTgYFYS4T11DyjEm5JYWZValB9fVJqTWnyI0Qdo+URmKdHkfGAs 5ZXEGxqbmBlZGplZGJmYm+MQVhLnbfZICRASSE8sSc1OTS1ILYIZx8TBKdXAWLRto1gxt3Qf f7mUvsTlx0LHMuO84wPcmRYLrld8Eym6dUqem8qP1337dpmuDuVdkmphLPySJUp//eMNetPa Fn+7NP9k0++Xk/8UCNzexvWTf5J+iqnIU3uj5riupsqFi5+uWKc7PS7do9eZ8eQ69pP+zg8X icW6V16TP+eqsMY4aZ6WX2SZEktxRqKhFnNRcSIAjQMJiIQCAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121231_140957_796474_42204110 X-CRM114-Status: GOOD ( 15.43 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kukjin Kim X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org No need to check power on/off with pmu control to support hotplug in/out on exynos5440. And this patch enables 4 cores on exynos5440. Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/platsmp.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index c5c840e..495a501 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -40,6 +40,8 @@ static inline void __iomem *cpu_boot_reg_base(void) { if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) return S5P_INFORM5; + else if (soc_is_exynos5440()) + return (S5P_VA_CHIPID + 0x560); return S5P_VA_SYSRAM; } @@ -116,27 +118,30 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct */ write_pen_release(phys_cpu); - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { - __raw_writel(S5P_CORE_LOCAL_PWR_EN, - S5P_ARM_CORE1_CONFIGURATION); + if (!soc_is_exynos5440()) { + if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { + __raw_writel(S5P_CORE_LOCAL_PWR_EN, + S5P_ARM_CORE1_CONFIGURATION); - timeout = 10; + timeout = 10; - /* wait max 10 ms until cpu1 is on */ - while ((__raw_readl(S5P_ARM_CORE1_STATUS) - & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) { - if (timeout-- == 0) - break; + /* wait max 10 ms until cpu1 is on */ + while ((__raw_readl(S5P_ARM_CORE1_STATUS) + & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) { + if (timeout-- == 0) + break; - mdelay(1); - } + mdelay(1); + } - if (timeout == 0) { - printk(KERN_ERR "cpu1 power enable failed"); - spin_unlock(&boot_lock); - return -ETIMEDOUT; + if (timeout == 0) { + printk(KERN_ERR "cpu1 power enable failed"); + spin_unlock(&boot_lock); + return -ETIMEDOUT; + } } } + /* * Send the secondary CPU a soft interrupt, thereby causing * the boot monitor to read the system wide flags register, @@ -178,6 +183,8 @@ static void __init exynos_smp_init_cpus(void) if (soc_is_exynos5250()) ncores = 2; + else if (soc_is_exynos5440()) + ncores = 4; else ncores = scu_base ? scu_get_core_count(scu_base) : 1;