Skip to content

Commit

Permalink
Check whether the SCU was already initialised
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Catalin Marinas committed Nov 5, 2009
1 parent 1b3a02e commit 9b229fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/kernel/smp_scu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9b229fa

Please sign in to comment.