diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-09-25 18:15:13 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-10-21 00:06:36 +0900 |
commit | b588aaec6d0d846c88bfa2ba95e76147386a4cd6 (patch) | |
tree | e4b440146c8bb4d7ef10cac11650ad02161931f9 /arch/arm/mach-exynos/platsmp.c | |
parent | 0d713cf1a6286aae6a12affab0887dbe2a4fbb83 (diff) | |
download | op-kernel-dev-b588aaec6d0d846c88bfa2ba95e76147386a4cd6.zip op-kernel-dev-b588aaec6d0d846c88bfa2ba95e76147386a4cd6.tar.gz |
ARM: EXYNOS: SWRESET is needed to boot secondary CPU on exynos3250
Without software reset the secondary CPU does not power up and
exynos_boot_secondary() ends with pen_release equal to 1. This can be
observed in dmesg:
CPU1: failed to come online
Brought up 1 CPUs
SMP: Total of 1 processors activated.
CPU: All CPU(s) started in SVC mode.
When booting the secondary CPU on Exynos3250 execute also software
reset for core 1.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/platsmp.c')
-rw-r--r-- | arch/arm/mach-exynos/platsmp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 41ae28d..8543064 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -121,6 +121,26 @@ static inline void __iomem *cpu_boot_reg(int cpu) } /* + * Set wake up by local power mode and execute software reset for given core. + * + * Currently this is needed only when booting secondary CPU on Exynos3250. + */ +static void exynos_core_restart(u32 core_id) +{ + u32 val; + + if (!of_machine_is_compatible("samsung,exynos3250")) + return; + + val = pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(core_id)); + val |= S5P_CORE_WAKEUP_FROM_LOCAL_CFG; + pmu_raw_writel(val, EXYNOS_ARM_CORE_STATUS(core_id)); + + pr_info("CPU%u: Software reset\n", core_id); + pmu_raw_writel(EXYNOS_CORE_PO_RESET(core_id), EXYNOS_SWRESET); +} + +/* * Write pen_release in a way that is guaranteed to be visible to all * observers, irrespective of whether they're taking part in coherency * or not. This is necessary for the hotplug code to work reliably. @@ -196,6 +216,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) return -ETIMEDOUT; } } + + exynos_core_restart(core_id); + /* * Send the secondary CPU a soft interrupt, thereby causing * the boot monitor to read the system wide flags register, |