[PATCH] Check whether the SCU was already initialised
Catalin Marinas
catalin.marinas at arm.com
Thu Oct 15 08:26:07 EDT 2009
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 at arm.com>
---
arch/arm/kernel/smp_scu.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
index d3831f6..9ab4149 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);
More information about the linux-arm-kernel
mailing list