]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/lib/board.c
powerpc/8xxx: Add support for interactive DDR programming interface
[u-boot] / arch / powerpc / lib / board.c
index b88cf6b67db57945b81e5f68fca45314e685c1cb..4fd01498052331b41d4e73a991d1cd43782f7dc4 100644 (file)
@@ -123,7 +123,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #endif
 
 extern ulong __init_end;
-extern ulong _end;
+extern ulong __bss_end__;
 ulong monitor_flash_len;
 
 #if defined(CONFIG_CMD_BEDBUG)
@@ -186,6 +186,12 @@ int __board_flash_wp_on(void)
 }
 int board_flash_wp_on(void) __attribute__((weak, alias("__board_flash_wp_on")));
 
+void __cpu_secondary_init_r(void)
+{
+}
+void cpu_secondary_init_r(void)
+__attribute__((weak, alias("__cpu_secondary_init_r")));
+
 static int init_func_ram (void)
 {
 #ifdef CONFIG_BOARD_TYPES
@@ -403,7 +409,7 @@ void board_init_f (ulong bootflag)
         *  - monitor code
         *  - board info struct
         */
-       len = (ulong)&_end - CONFIG_SYS_MONITOR_BASE;
+       len = (ulong)&__bss_end__ - CONFIG_SYS_MONITOR_BASE;
 
        /*
         * Subtract specified amount of memory to hide so that it won't
@@ -453,9 +459,13 @@ void board_init_f (ulong bootflag)
        debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
 
 #ifdef CONFIG_LCD
+#ifdef CONFIG_FB_ADDR
+       gd->fb_base = CONFIG_FB_ADDR;
+#else
        /* reserve memory for LCD display (always full pages) */
        addr = lcd_setmem (addr);
        gd->fb_base = addr;
+#endif /* CONFIG_FB_ADDR */
 #endif /* CONFIG_LCD */
 
 #if defined(CONFIG_VIDEO) && defined(CONFIG_8xx)
@@ -797,6 +807,14 @@ void board_init_r (gd_t *id, ulong dest_addr)
        /* relocate environment function pointers etc. */
        env_relocate ();
 
+       /*
+        * after non-volatile devices & environment is setup and cpu code have
+        * another round to deal with any initialization that might require
+        * full access to the environment or loading of some image (firmware)
+        * from a non-volatile device
+        */
+       cpu_secondary_init_r();
+
        /*
         * Fill in missing fields of bd_info.
         * We do this here, where we have "normal" access to the
@@ -914,8 +932,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        udelay (20);
 
-       set_timer (0);
-
        /* Initialize from environment */
        if ((s = getenv ("loadaddr")) != NULL) {
                load_addr = simple_strtoul (s, NULL, 16);
@@ -928,9 +944,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        WATCHDOG_RESET ();
 
-#if defined(CONFIG_DTT)                /* Digital Thermometers and Thermostats */
-       dtt_init ();
-#endif
 #if defined(CONFIG_CMD_SCSI)
        WATCHDOG_RESET ();
        puts ("SCSI:  ");
@@ -947,10 +960,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
        bb_miiphy_init();
 #endif
 #if defined(CONFIG_CMD_NET)
-#if defined(CONFIG_NET_MULTI)
        WATCHDOG_RESET ();
        puts ("Net:   ");
-#endif
        eth_initialize (bd);
 #endif