From: Peter Tyser Date: Fri, 10 Jul 2009 23:46:10 +0000 (-0500) Subject: ppc: Unlock cache-as-ram in a consistent manner X-Git-Tag: v2009.08-rc1~31 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=982adfc610669482a32127282fe489857a92cfe3;p=u-boot ppc: Unlock cache-as-ram in a consistent manner Previously, non-e500 architectures only unlocked their data cache which was used as early RAM when booting to Linux using the "bootm" command. This change causes all PPC boards with CONFIG_SYS_INIT_RAM_LOCK defined to unlock their data cache during U-Boot's initialization. This improves U-Boot performance and provides a common cache state when booting to different OSes. Signed-off-by: Peter Tyser --- diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 6dd4d56ff3..8def520556 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -68,7 +68,7 @@ #if defined(CONFIG_LOGBUFFER) #include #endif -#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) +#if defined(CONFIG_SYS_INIT_RAM_LOCK) #include #endif #ifdef CONFIG_PS2KBD @@ -754,8 +754,8 @@ void board_init_r (gd_t *id, ulong dest_addr) icache_enable (); /* it's time to enable the instruction cache */ #endif -#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) - unlock_ram_in_cache(); /* it's time to unlock D-cache in e500 */ +#if defined(CONFIG_SYS_INIT_RAM_LOCK) + unlock_ram_in_cache(); /* it's time to unlock D-cache */ #endif #if defined(CONFIG_BAB7xx) || defined(CONFIG_CPC45) diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c index 0d702bf251..e7d2c98353 100644 --- a/lib_ppc/bootm.c +++ b/lib_ppc/bootm.c @@ -38,11 +38,6 @@ #include #include #include - -#endif - -#ifdef CONFIG_SYS_INIT_RAM_LOCK -#include #endif DECLARE_GLOBAL_DATA_PTR; @@ -71,10 +66,6 @@ static void boot_jump_linux(bootm_headers_t *images) show_boot_progress (15); -#if defined(CONFIG_SYS_INIT_RAM_LOCK) && !defined(CONFIG_E500) - unlock_ram_in_cache(); -#endif - #if defined(CONFIG_OF_LIBFDT) if (of_flat_tree) { /* device tree; boot new style */ /*