Commit 5132060c authored by Vikram Kanigiri's avatar Vikram Kanigiri Committed by Dan Handley
Browse files

Fix the disable_mmu code

Remove the hard coding of all the MMU related registers with 0 and disable MMU
by clearing the M and C bit in SCTLR_ELx

Change-Id: I4a0b1bb14a604734b74c32eb31315d8504a7b8d8
parent d1466a2e
...@@ -91,11 +91,11 @@ void enable_mmu() ...@@ -91,11 +91,11 @@ void enable_mmu()
void disable_mmu(void) void disable_mmu(void)
{ {
/* Zero out the MMU related registers */ unsigned long sctlr;
write_mair(0);
write_tcr(0); sctlr = read_sctlr();
write_ttbr0(0); sctlr = sctlr & ~(SCTLR_M_BIT | SCTLR_C_BIT);
write_sctlr(0); write_sctlr(sctlr);
/* Flush the caches */ /* Flush the caches */
dcsw_op_all(DCCISW); dcsw_op_all(DCCISW);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment