]> git.sur5r.net Git - u-boot/blobdiff - lib_ppc/bootm.c
ppc/8xxx: relocate cpu pointer in global data
[u-boot] / lib_ppc / bootm.c
index e7d2c983537dbb63b456a0db3a53bb198821dbd8..0685a9331cba9fa7918b309b8c004709308c4436 100644 (file)
 #include <fdt.h>
 #include <libfdt.h>
 #include <fdt_support.h>
+
+#endif
+
+#ifdef CONFIG_SYS_INIT_RAM_LOCK
+#include <asm/cache.h>
 #endif
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -66,6 +71,10 @@ 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 */
                /*
@@ -85,6 +94,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 #endif
 
                debug ("   Booting using OF flat tree...\n");
+               WATCHDOG_RESET ();
                (*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC,
                           CONFIG_SYS_BOOTMAPSZ, 0, 0);
                /* does not return */
@@ -108,6 +118,7 @@ static void boot_jump_linux(bootm_headers_t *images)
                bd_t *kbd = images->kbd;
 
                debug ("   Booting using board info...\n");
+               WATCHDOG_RESET ();
                (*kernel) (kbd, initrd_start, initrd_end,
                           cmd_start, cmd_end, 0, 0);
                /* does not return */
@@ -161,7 +172,7 @@ void arch_lmb_reserve(struct lmb *lmb)
 
 static void boot_prep_linux(void)
 {
-#if (CONFIG_NUM_CPUS > 1)
+#ifdef CONFIG_MP
        /* if we are MP make sure to flush the dcache() to any changes are made
         * visibile to all other cores */
        flush_dcache();