Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b229fa0 authored by Catalin Marinas's avatar Catalin Marinas
Browse files

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: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 1b3a02eb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);