]> git.sur5r.net Git - u-boot/commitdiff
ppc: Remove board-specific command table relocation fixups
authorPeter Tyser <ptyser@xes-inc.com>
Mon, 21 Sep 2009 16:20:30 +0000 (11:20 -0500)
committerWolfgang Denk <wd@denx.de>
Sat, 3 Oct 2009 08:17:56 +0000 (10:17 +0200)
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
board/digsy_mtc/cmd_mtc.c
board/digsy_mtc/digsy_mtc.c
board/inka4x0/inka4x0.c
board/inka4x0/inkadiag.c
include/configs/inka4x0.h

index aa3961153b3128ebbef611f68e4a121714799f5c..ecea5b3c547a00393d2130817d8f4495c17158fa 100644 (file)
@@ -320,36 +320,6 @@ static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        ARRAY_SIZE(cmd_mtc_sub), cmdtp, flag, argc, argv);
 }
 
-/* Relocate the command table function pointers when running in RAM */
-int mtc_cmd_init_r(void)
-{
-       cmd_tbl_t *cmdtp;
-
-       for (cmdtp = &cmd_mtc_sub[0]; cmdtp !=
-            &cmd_mtc_sub[ARRAY_SIZE(cmd_mtc_sub)]; cmdtp++) {
-               ulong addr;
-
-               addr = (ulong)(cmdtp->cmd) + gd->reloc_off;
-               cmdtp->cmd =
-                   (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
-
-               addr = (ulong)(cmdtp->name) + gd->reloc_off;
-               cmdtp->name = (char *)addr;
-
-               if (cmdtp->usage) {
-                       addr = (ulong)(cmdtp->usage) + gd->reloc_off;
-                       cmdtp->usage = (char *)addr;
-               }
-#ifdef CONFIG_SYS_LONGHELP
-               if (cmdtp->help) {
-                       addr = (ulong)(cmdtp->help) + gd->reloc_off;
-                       cmdtp->help = (char *)addr;
-               }
-#endif
-       }
-       return 0;
-}
-
 int cmd_mtc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        cmd_tbl_t *c;
index 9d77e5485b6c4236b6c6a7d4e3c2242f99027a6c..cc6087b339598d916dfd378f6daf8760f6d15fd4 100644 (file)
@@ -240,7 +240,6 @@ void board_get_enetaddr (uchar * enet)
 
 int misc_init_r(void)
 {
-       extern int mtc_cmd_init_r (void);
        uchar enetaddr[6];
 
        if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
@@ -248,7 +247,6 @@ int misc_init_r(void)
                eth_setenv_enetaddr("ethaddr", enetaddr);
        }
 
-       mtc_cmd_init_r();
        return 0;
 }
 
index c645b05b5c25711c3636d42c73417e9c0d67f9b8..27b79ec7f48a88189818c21caf1b72561ce746b7 100644 (file)
@@ -177,16 +177,6 @@ void flash_preinit(void)
        clrbits_be32(&lpb->cs0_cfg, 0x1); /* clear RO */
 }
 
-int misc_init_r (void) {
-       extern int inkadiag_init_r (void);
-
-       /*
-        * The command table used for the subcommands of inkadiag
-        * needs to be relocated manually.
-        */
-       return inkadiag_init_r();
-}
-
 int misc_init_f (void)
 {
        volatile struct mpc5xxx_gpio    *gpio    =
index 3761ef66d417dfa7b8ce0bf4ecf06c80552bf8ca..0a75abde3f33d2816ce5a014507823b65ba01e6b 100644 (file)
@@ -484,31 +484,3 @@ U_BOOT_CMD(inkadiag, 6, 1, do_inkadiag,
           "[inkadiag what ...]\n"
           "    - perform a diagnosis on inka hardware\n"
           "'inkadiag' performs hardware tests.");
-
-/* Relocate the command table function pointers when running in RAM */
-int inkadiag_init_r (void) {
-       cmd_tbl_t *cmdtp;
-
-       for (cmdtp = &cmd_inkadiag_sub[0]; cmdtp !=
-                    &cmd_inkadiag_sub[ARRAY_SIZE(cmd_inkadiag_sub)]; cmdtp++) {
-               ulong addr;
-
-               addr = (ulong) (cmdtp->cmd) + gd->reloc_off;
-               cmdtp->cmd = (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
-
-               addr = (ulong)(cmdtp->name) + gd->reloc_off;
-               cmdtp->name = (char *)addr;
-
-               if (cmdtp->usage) {
-                       addr = (ulong)(cmdtp->usage) + gd->reloc_off;
-                       cmdtp->usage = (char *)addr;
-               }
-#ifdef CONFIG_SYS_LONGHELP
-               if (cmdtp->help) {
-                       addr = (ulong)(cmdtp->help) + gd->reloc_off;
-                       cmdtp->help = (char *)addr;
-               }
-#endif
-       }
-       return 0;
-}
index 46606cace9ad2970e91106b9a240b0be08bfc4f7..14f7826705601d39a234f51e4c6da4bc40d7814b 100644 (file)
@@ -42,7 +42,6 @@
 #define BOOTFLAG_WARM          0x02    /* Software reboot                      */
 
 #define CONFIG_MISC_INIT_F     1       /* Use misc_init_f()                    */
-#define CONFIG_MISC_INIT_R     1       /* Use misc_init_r()                    */
 
 #define CONFIG_HIGH_BATS       1       /* High BATs supported                  */