From: Amit Daniel Kachhap <amit.daniel@samsung.com>
To: linux-samsung-soc@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Kukjin Kim <kgene.kim@samsung.com>
Subject: [PATCH 1/2] ARM: EXYNOS: enable all secondary cores for exynos5440
Date: Mon, 11 Mar 2013 16:27:01 +0530 [thread overview]
Message-ID: <1362999422-24655-1-git-send-email-amit.daniel@samsung.com> (raw)
This patch enables four cores on exynos5440. Also this patch skips the non
exynos5440 pmu control changes.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
---
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;
--
1.7.1
next reply other threads:[~2013-03-11 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 10:57 Amit Daniel Kachhap [this message]
2013-03-11 10:57 ` [PATCH 2/2] ARM: EXYNOS: Support CPU hotplug " Amit Daniel Kachhap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362999422-24655-1-git-send-email-amit.daniel@samsung.com \
--to=amit.daniel@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®