[U-Boot] [PATCH] mx31pdk: Enable D and I caches

Fabio Estevam fabio.estevam at freescale.com
Tue Nov 1 19:16:37 CET 2011


Enable D and I caches on mx31pdk.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
Stefano,

You explained that enabling cache may cause some drivers like FEC and MMC not to work properly.
As mx31pdk does not have FEC or MMC driver I thought this should be OK.

Tested by booting Linux kernel via TFTP and mounting a NFS rootfs.

 board/freescale/mx31pdk/mx31pdk.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index 9f8bc53..1d7b4f6 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -71,11 +71,19 @@ int board_early_init_f(void)
 	return 0;
 }
 
+void enable_caches(void)
+{
+	icache_enable();
+	dcache_enable();
+}
+
 int board_init(void)
 {
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
+	enable_caches();
+
 	return 0;
 }
 
-- 
1.6.0.4




More information about the U-Boot mailing list