summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-11-04 15:16:38 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2009-11-05 13:10:36 +0300
commit9b229fa0951fb47cbc178be4bd8e9ef185b38802 (patch)
tree97a517a6c8c7788b799a8350a976c2a0556de144 /arch/arm
parent1b3a02eb452354fa9b36a7f33dc4c8307bbc40aa (diff)
downloadlinux-9b229fa0951fb47cbc178be4bd8e9ef185b38802.tar.xz
Check whether the SCU was already initialised
If Linux is running in non-secure mode, this register may have been already initialised and writing to the control register not allowed. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/smp_scu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
index d3831f616ee9..9ab4149bd983 100644
--- a/arch/arm/kernel/smp_scu.c
+++ b/arch/arm/kernel/smp_scu.c
@@ -37,6 +37,10 @@ void __init scu_enable(void __iomem *scu_base)
u32 scu_ctrl;
scu_ctrl = __raw_readl(scu_base + SCU_CTRL);
+ /* already enabled? */
+ if (scu_ctrl & 1)
+ return;
+
scu_ctrl |= 1;
__raw_writel(scu_ctrl, scu_base + SCU_CTRL);