summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-berlin
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@marvell.com>2015-09-14 14:47:44 +0800
committerSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2015-10-15 21:10:22 +0200
commitac7fc233b2c337880d7d973be19f6fb03108d6f7 (patch)
tree357b9e67a08e13e44d92e61a4a0f9d80dabdbb6d /arch/arm/mach-berlin
parente1a3e724a25761a2b2e9e0e059e33afac6409a76 (diff)
downloadlinux-0-day-ac7fc233b2c337880d7d973be19f6fb03108d6f7.tar.gz
linux-0-day-ac7fc233b2c337880d7d973be19f6fb03108d6f7.tar.xz
arm: berlin: use non-self-cleared reset register to reset cpu
In Berlin SoCs, there are two kinds of cpu reset control registers: the first one's corresponding bits will be self-cleared after some cycles, while the second one's bits won't. Previously the first kind of reset control register is used, this patch uses the second kind one to prepare for the next hotplug commit. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'arch/arm/mach-berlin')
-rw-r--r--arch/arm/mach-berlin/platsmp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c
index 34a3753e73564..64cb1ab182c4b 100644
--- a/arch/arm/mach-berlin/platsmp.c
+++ b/arch/arm/mach-berlin/platsmp.c
@@ -17,7 +17,12 @@
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>
-#define CPU_RESET 0x00
+/*
+ * There are two reset registers, one with self-clearing (SC)
+ * reset and one with non-self-clearing reset (NON_SC).
+ */
+#define CPU_RESET_SC 0x00
+#define CPU_RESET_NON_SC 0x20
#define RESET_VECT 0x00
#define SW_RESET_ADDR 0x94
@@ -30,9 +35,11 @@ static inline void berlin_perform_reset_cpu(unsigned int cpu)
{
u32 val;
- val = readl(cpu_ctrl + CPU_RESET);
+ val = readl(cpu_ctrl + CPU_RESET_NON_SC);
+ val &= ~BIT(cpu_logical_map(cpu));
+ writel(val, cpu_ctrl + CPU_RESET_NON_SC);
val |= BIT(cpu_logical_map(cpu));
- writel(val, cpu_ctrl + CPU_RESET);
+ writel(val, cpu_ctrl + CPU_RESET_NON_SC);
}
static int berlin_boot_secondary(unsigned int cpu, struct task_struct *idle)