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: 2247831 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2104CDF5B1 for ; Mon, 11 Mar 2013 10:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753546Ab3CKK5Y (ORCPT ); Mon, 11 Mar 2013 06:57:24 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:54015 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753735Ab3CKK5X (ORCPT ); Mon, 11 Mar 2013 06:57:23 -0400 Received: by mail-ie0-f176.google.com with SMTP id k13so4533692iea.21 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 Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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;