]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
PPC: Record U-Boot's relocated address in RAM and show in bdinfo.
authorRichard Retanubun <RichardRetanubun@RuggedCom.com>
Fri, 15 Jan 2010 15:06:06 +0000 (10:06 -0500)
committerWolfgang Denk <wd@denx.de>
Thu, 11 Mar 2010 22:49:16 +0000 (23:49 +0100)
This patch uses gd->relocaddr variable to store uboot's relocated
address in RAM and shows it in bdinfo command.

This patch moves CONFIG_AMIGAONEG3SE style copying of the address
in board_init_f to just before relocation is actually done.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Tested-by: Detlev Zundel <dzu@denx.de>
common/cmd_bdinfo.c
include/asm-ppc/global_data.h
lib_ppc/board.c

index 11c154731e3cc21d226657e1c3adb89bc9469c1b..f8400bcc04b4a7b1d8fc637f83a90a7da9f4350b 100644 (file)
@@ -115,6 +115,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
        printf ("IP addr     = %pI4\n", &bd->bi_ip_addr);
        printf ("baudrate    = %6ld bps\n", bd->bi_baudrate   );
+       print_num ("relocaddr", gd->relocaddr);
        return 0;
 }
 
index 3f119187464fc0696596c9022cfd46c0d81654ea..d3dd44e96d7bdff3d1e1f75e53e304266190dc3c 100644 (file)
@@ -152,9 +152,7 @@ typedef     struct  global_data {
     defined(CONFIG_SANDPOINT)
        void *          console_addr;
 #endif
-#ifdef CONFIG_AMIGAONEG3SE
        unsigned long   relocaddr;      /* Start address of U-Boot in RAM */
-#endif
 #if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
        unsigned long   fb_base;        /* Base address of framebuffer memory   */
 #endif
index 2889b2c2c516af21f444a54f10d0fe926bf8062c..a30acee4febf5ee5c675953cfd2feeacfa8da8e7 100644 (file)
@@ -477,10 +477,6 @@ void board_init_f (ulong bootflag)
 
        debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
 
-#ifdef CONFIG_AMIGAONEG3SE
-       gd->relocaddr = addr;
-#endif
-
        /*
         * reserve memory for malloc() arena
         */
@@ -612,6 +608,8 @@ void board_init_f (ulong bootflag)
 
        WATCHDOG_RESET();
 
+       gd->relocaddr = addr; /* Record relocation address, useful for debug */
+
        memcpy (id, (void *)gd, sizeof (gd_t));
 
        relocate_code (addr_sp, id, addr);