public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCHv2 1/3] armv8: fsl-layerscape: add i/d-cache enable function to enable_caches
@ 2016-01-21  9:44 Zhiqiang Hou
  2016-01-21  9:44 ` [U-Boot] [PATCHv2 2/3] ARMv8/layerscape: Add FSL PPA support Zhiqiang Hou
  2016-01-21  9:44 ` [U-Boot] [PATCHv2 3/3] ARMv8/ls1043ardb: Integrate FSL PPA Zhiqiang Hou
  0 siblings, 2 replies; 21+ messages in thread
From: Zhiqiang Hou @ 2016-01-21  9:44 UTC (permalink / raw)
  To: u-boot

From: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>

This function assume that the d-cache and MMU has been enabled earlier,
so it just created MMU table in main memory. But the assumption is not
always correct, for example, the early setup is done in EL3, while
enable_caches() is called when the PE has turned into another EL.

Define the function mmu_setup() for fsl-layerscape to cover the weak
one.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
---
Tested on LS1043A RDB board

V2:
 - Replace patch [PATCH 1/3] ARMv8/layerscape: Add mmu_init API

 arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 6ea28ed..3147870 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -393,15 +393,21 @@ int arch_cpu_init(void)
 	return 0;
 }
 
+void mmu_setup(void)
+{
+	final_mmu_setup();
+}
+
 /*
- * This function is called from lib/board.c.
- * It recreates MMU table in main memory. MMU and d-cache are enabled earlier.
- * There is no need to disable d-cache for this operation.
+ * This function is called from common/board_r.c.
+ * It recreates MMU table in main memory.
  */
 void enable_caches(void)
 {
-	final_mmu_setup();
+	mmu_setup();
 	__asm_invalidate_tlb_all();
+	icache_enable();
+	dcache_enable();
 }
 #endif
 
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-03-23  3:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21  9:44 [U-Boot] [PATCHv2 1/3] armv8: fsl-layerscape: add i/d-cache enable function to enable_caches Zhiqiang Hou
2016-01-21  9:44 ` [U-Boot] [PATCHv2 2/3] ARMv8/layerscape: Add FSL PPA support Zhiqiang Hou
2016-01-22 20:05   ` york sun
2016-01-22 20:09     ` Scott Wood
2016-01-22 20:14       ` Bhupesh Sharma
2016-01-22 20:17         ` Scott Wood
2016-01-22 20:26           ` Bhupesh Sharma
2016-01-25  3:11           ` Zhiqiang Hou
2016-01-22 20:18         ` york sun
2016-01-22 20:21           ` Scott Wood
2016-01-22 20:27             ` Bhupesh Sharma
2016-01-22 20:30               ` york sun
2016-01-25  3:22                 ` Zhiqiang Hou
2016-03-17 21:09                   ` york sun
2016-03-23  3:17                     ` Zhiqiang Hou
2016-01-22 20:32               ` Scott Wood
2016-01-25  3:15             ` Zhiqiang Hou
2016-01-25  3:16             ` Zhiqiang Hou
2016-01-25  3:09       ` Zhiqiang Hou
2016-01-25  3:02     ` Zhiqiang Hou
2016-01-21  9:44 ` [U-Boot] [PATCHv2 3/3] ARMv8/ls1043ardb: Integrate FSL PPA Zhiqiang Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox