]> git.sur5r.net Git - u-boot/commitdiff
8xx, icache: enabling ICache not before running from RAM
authorHeiko Schocher <hs@denx.de>
Thu, 12 Mar 2009 06:37:15 +0000 (07:37 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 18 Mar 2009 19:48:29 +0000 (20:48 +0100)
with the new CONFIG_SYS_DELAYED_ICACHE config option, ICache
is not enabled before code runs from RAM.

Signed-off-by: Heiko Schocher <hs@denx.de>
README
cpu/mpc8xx/start.S
include/configs/FLAGADM.h
include/configs/IP860.h
include/configs/pcu_e.h
lib_ppc/board.c

diff --git a/README b/README
index 43fb1c0d8959b515c62e612280a0ba538d2921ce..46181a4bcd24f22fcb95d0b1dfd50218750833c1 100644 (file)
--- a/README
+++ b/README
@@ -318,6 +318,11 @@ The following options need to be configured:
                that this requires a (stable) reference clock (32 kHz
                RTC clock or CONFIG_SYS_8XX_XIN)
 
+               CONFIG_SYS_DELAYED_ICACHE
+
+               Define this option if you want to enable the
+               ICache only when Code runs from RAM.
+
 - Intel Monahans options:
                CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO
 
index 45c902e7c6800b84032d57d51685e8c151560b1e..8864c37cf65468467072b54e3375050de942be80 100644 (file)
@@ -142,7 +142,7 @@ boot_warm:
        lis     r3, IDC_DISABLE@h       /* Disable data cache */
        mtspr   DC_CST, r3
 
-#if !(defined(CONFIG_IP860) || defined(CONFIG_PCU_E) || defined (CONFIG_FLAGADM))
+#if !defined(CONFIG_SYS_DELAYED_ICACHE)
                                        /* On IP860 and PCU E,
                                         * we cannot enable IC yet
                                         */
index d8312384df3de59adee112ade597980a8701dbb0..0f4277c4e3eae82ae56dd4ac1b934662169e7c6d 100644 (file)
 #if defined(CONFIG_CMD_KGDB)
 #define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
 #endif
+#define CONFIG_SYS_DELAYED_ICACHE      1       /* enable ICache not before
+                                                * running in RAM.
+                                                */
 
 /*-----------------------------------------------------------------------
  * SYPCR - System Protection Control                           11-9
index b9c57132d7ae898f2b4bbd82db40054b8d7fd81b..125aa6c80259516f1657709651df0064798065aa 100644 (file)
 #if defined(CONFIG_CMD_KGDB)
 #define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
 #endif
+#define CONFIG_SYS_DELAYED_ICACHE      1       /* enable ICache not before
+                                                * running in RAM.
+                                                */
 
 /*-----------------------------------------------------------------------
  * SYPCR - System Protection Control                           11-9
index 921451927b3430da98cb76f86f202bfce86a80e3..7c2bf1b0f4e85f5c7f9c830c0ddbf30031071bf6 100644 (file)
  */
 #define CONFIG_SYS_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
 #define CONFIG_SYS_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
+#define CONFIG_SYS_DELAYED_ICACHE      1       /* enable ICache not before
+                                                * running in RAM.
+                                                */
 
 /*-----------------------------------------------------------------------
  * SYPCR - System Protection Control                           11-9
index 6d2930376ecb7143d6377f1379ec4411490c13aa..f69c5f4f1f4f6dfc65f4cdea78387cfdb39d4bc3 100644 (file)
@@ -736,8 +736,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        WATCHDOG_RESET();
 
-#if defined(CONFIG_IP860) || defined(CONFIG_PCU_E) || \
-       defined (CONFIG_FLAGADM) || defined(CONFIG_MPC83XX)
+#if defined(CONFIG_SYS_DELAYED_ICACHE) || defined(CONFIG_MPC83XX)
        icache_enable ();       /* it's time to enable the instruction cache */
 #endif