Skip to content
Snippets Groups Projects
Commit 982adfc6 authored by Peter Tyser's avatar Peter Tyser Committed by Wolfgang Denk
Browse files

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: default avatarPeter Tyser <ptyser@xes-inc.com>
parent 4fb799ae
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#if defined(CONFIG_LOGBUFFER) #if defined(CONFIG_LOGBUFFER)
#include <logbuff.h> #include <logbuff.h>
#endif #endif
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) #if defined(CONFIG_SYS_INIT_RAM_LOCK)
#include <asm/cache.h> #include <asm/cache.h>
#endif #endif
#ifdef CONFIG_PS2KBD #ifdef CONFIG_PS2KBD
...@@ -754,8 +754,8 @@ void board_init_r (gd_t *id, ulong dest_addr) ...@@ -754,8 +754,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
icache_enable (); /* it's time to enable the instruction cache */ icache_enable (); /* it's time to enable the instruction cache */
#endif #endif
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) #if defined(CONFIG_SYS_INIT_RAM_LOCK)
unlock_ram_in_cache(); /* it's time to unlock D-cache in e500 */ unlock_ram_in_cache(); /* it's time to unlock D-cache */
#endif #endif
#if defined(CONFIG_BAB7xx) || defined(CONFIG_CPC45) #if defined(CONFIG_BAB7xx) || defined(CONFIG_CPC45)
......
...@@ -38,11 +38,6 @@ ...@@ -38,11 +38,6 @@
#include <fdt.h> #include <fdt.h>
#include <libfdt.h> #include <libfdt.h>
#include <fdt_support.h> #include <fdt_support.h>
#endif
#ifdef CONFIG_SYS_INIT_RAM_LOCK
#include <asm/cache.h>
#endif #endif
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
...@@ -71,10 +66,6 @@ static void boot_jump_linux(bootm_headers_t *images) ...@@ -71,10 +66,6 @@ static void boot_jump_linux(bootm_headers_t *images)
show_boot_progress (15); 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 defined(CONFIG_OF_LIBFDT)
if (of_flat_tree) { /* device tree; boot new style */ if (of_flat_tree) { /* device tree; boot new style */
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment