From patchwork Mon Mar 11 10:57:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 2247901 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 0DF683FC8F for ; Mon, 11 Mar 2013 11:00:39 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UF0Q6-0001yQ-71; Mon, 11 Mar 2013 10:57:30 +0000 Received: from mail-ia0-x230.google.com ([2607:f8b0:4001:c02::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UF0Q1-0001wo-Ru for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2013 10:57:27 +0000 Received: by mail-ia0-f176.google.com with SMTP id i18so3432011iac.7 for ; Mon, 11 Mar 2013 03:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer; bh=mazRH7mbVX6lEuNvRqAYu3fjdGZ67nRozt8XwCRgC9g=; b=nLkOVbmH4LNGXQ8/NZbcLxDiC/fxq693MAixTqNOcTY3LL37Lk3Og4f3MCE8qzh1Jm TP0Qf/mbbNzvvkvYhSqpkYMCQmqTpKlzjCXb9n98uNElTT5CyM05Brk8DkHnar81R83C tkE/Y4kzonLswHoXncduMfia4/pcJX7iCx9mSW67NzlxLBvZBhSvC0BpHCsjEvYP5yfQ GQbiRsK8zYrorsnD+FqqT8WS3Ig9btHRSErHmsZJAYAxtfcETooaj11zP6R61GNFa8vm WE2DXx3WDTCsjL9LJch5nvGQYjXwCYRPK3BEGZmZ/OVDpfR62046M2xkXNwWJFO9VX+g AbNA== X-Received: by 10.50.88.233 with SMTP id bj9mr6954917igb.55.1362999442803; Mon, 11 Mar 2013 03:57:22 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id wn10sm12540035igb.2.2013.03.11.03.57.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 11 Mar 2013 03:57:21 -0700 (PDT) From: Amit Daniel Kachhap To: linux-samsung-soc@vger.kernel.org, Kukjin Kim Subject: [PATCH 1/2] ARM: EXYNOS: enable all secondary cores for exynos5440 Date: Mon, 11 Mar 2013 16:27:01 +0530 Message-Id: <1362999422-24655-1-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130311_065726_071494_95DB69D6 X-CRM114-Status: GOOD ( 16.60 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (amitdanielk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Kukjin Kim , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.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 This patch enables four cores on exynos5440. Also this patch skips the non exynos5440 pmu control changes. Cc: Kukjin Kim Signed-off-by: Kukjin Kim Signed-off-by: Amit Daniel Kachhap --- arch/arm/mach-exynos/platsmp.c | 44 ++++++++++++++++++++++----------------- 1 files changed, 25 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 60f7c5b..087b73f 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,29 @@ 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); - - 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; - - mdelay(1); - } - - if (timeout == 0) { - printk(KERN_ERR "cpu1 power enable failed"); - spin_unlock(&boot_lock); - return -ETIMEDOUT; + timeout = 10; + 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); + + /* wait max 10 ms until this cpu is on */ + while (!(__raw_readl(S5P_ARM_CORE1_STATUS) & + S5P_CORE_LOCAL_PWR_EN)) { + if (timeout-- == 0) + break; + mdelay(1); + } } } + if (timeout == 0) { + pr_err("cpu%d power enable failed", cpu); + 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 +182,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;