[PATCH] ARM: layerscape: ppa: Enable MMU when in EL2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We enter EL2 with MMU disabled even when it was enabled in EL3. Enable
MMU in EL2 again.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/mach-layerscape/ppa.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index 43145a7ece..996e881232 100644
--- a/arch/arm/mach-layerscape/ppa.c
+++ b/arch/arm/mach-layerscape/ppa.c
@@ -123,9 +123,16 @@ int ls1046a_ppa_init(resource_size_t ppa_start, resource_size_t ppa_size)
 	get_builtin_firmware(ppa_ls1046a_bin, &ppa_fw, &ppa_fw_size);
 
 	if (el == 3) {
+		unsigned int cr;
+
+		asm volatile("mrs %0, sctlr_el3" : "=r" (cr) : : "cc");
 		remap_range((void *)ppa_start, ppa_size, MAP_CACHED);
+
 		ret = ppa_init(ppa_fw, ppa_fw_size, (void *)ppa_start);
+
+		asm volatile("msr sctlr_el2, %0" : : "r" (cr) : "cc");
 		remap_range((void *)ppa_start, ppa_size, MAP_UNCACHED);
+
 		if (ret)
 			return ret;
 	}
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux