diff options
61 files changed, 332 insertions, 389 deletions
@@ -2,6 +2,9 @@ Changes for U-Boot 0.4.2: ====================================================================== +* Patch by Kenneth Johansson, 30 Jun 2003: + get rid of MK_CMD_ENTRY macro; update doc/README.command + * Patch by Seb James, 30 Jun 2003: Improve documentation of I2C configuration in README diff --git a/board/MAI/AmigaOneG3SE/cmd_boota.c b/board/MAI/AmigaOneG3SE/cmd_boota.c index db1ecfc..3e2835a 100644 --- a/board/MAI/AmigaOneG3SE/cmd_boota.c +++ b/board/MAI/AmigaOneG3SE/cmd_boota.c @@ -121,8 +121,8 @@ int do_boota (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } #if defined(CONFIG_AMIGAONEG3SE) && (CONFIG_COMMANDS & CFG_CMD_BSP) -cmd_tbl_t U_BOOT_CMD(BOOTA) = MK_CMD_ENTRY( - "boota", 3, 1, do_boota, +U_BOOT_CMD( + boota, 3, 1, do_boota, "boota - boot an Amiga kernel\n", "address disk" ); diff --git a/board/MAI/menu/cmd_menu.c b/board/MAI/menu/cmd_menu.c index 4c17c6a..a515bd8 100644 --- a/board/MAI/menu/cmd_menu.c +++ b/board/MAI/menu/cmd_menu.c @@ -8,8 +8,8 @@ int do_menu( cmd_tbl_t *cmdtp, /*bd_t *bd,*/ int flag, int argc, char *argv[] ) } #if defined(CONFIG_AMIGAONEG3SE) && (CONFIG_COMMANDS & CFG_CMD_BSP) -cmd_tbl_t U_BOOT_CMD(MENU) = MK_CMD_ENTRY( - "menu", 1, 1, do_menu, +U_BOOT_CMD( + menu, 1, 1, do_menu, "menu - display BIOS setup menu\n", "" ); diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c index 0ebe09e..9edb3af 100644 --- a/board/esd/dasa_sim/cmd_dasa_sim.c +++ b/board/esd/dasa_sim/cmd_dasa_sim.c @@ -225,8 +225,8 @@ int do_pci9054 (cmd_tbl_t * cmdtp, int flag, int argc, } -cmd_tbl_t U_BOOT_CMD (pci9054) = MK_CMD_ENTRY( - "pci9054", 3, 1, do_pci9054, +U_BOOT_CMD( + pci9054, 3, 1, do_pci9054, "pci9054 - PLX PCI9054 EEPROM access\n", "pci9054 info - print EEPROM values\n" "pci9054 update - updates EEPROM with default values\n" diff --git a/board/evb64260/zuma_pbb.c b/board/evb64260/zuma_pbb.c index 531b16b..d64025a 100644 --- a/board/evb64260/zuma_pbb.c +++ b/board/evb64260/zuma_pbb.c @@ -198,20 +198,20 @@ do_zuma_init_mbox (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(zuma_init_pbb) = MK_CMD_ENTRY( - "zinit", 1, 0, do_zuma_init_pbb, +U_BOOT_CMD( + zinit, 1, 0, do_zuma_init_pbb, "zinit - init zuma pbb\n", "\n" " - init zuma pbb\n" ); -cmd_tbl_t U_BOOT_CMD(zuma_test_dma) = MK_CMD_ENTRY( - "zdtest", 3, 1, do_zuma_test_dma, +U_BOOT_CMD( + zdtest, 3, 1, do_zuma_test_dma, "zdtest - run dma test\n", "[cmd [count]]\n" " - run dma cmd (w=0,v=1,cp=2,cmp=3,wi=4,vi=5), count bytes\n" ); -cmd_tbl_t U_BOOT_CMD(zuma_init_mbox) = MK_CMD_ENTRY( - "zminit", 1, 0, do_zuma_init_mbox, +U_BOOT_CMD( + zminit, 1, 0, do_zuma_init_mbox, "zminit - init zuma mbox\n", "\n" " - init zuma mbox\n" diff --git a/board/hymod/bsp.c b/board/hymod/bsp.c index 7ea91e6..0596fa4 100644 --- a/board/hymod/bsp.c +++ b/board/hymod/bsp.c @@ -275,8 +275,8 @@ do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) printf ("Usage:\n%s\n", cmdtp->usage); return 1; } -cmd_tbl_t U_BOOT_CMD(fpga) = MK_CMD_ENTRY( - "fpga", 6, 1, do_fpga, +U_BOOT_CMD( + fpga, 6, 1, do_fpga, "fpga - FPGA sub-system\n", "load [type] addr size\n" " - write the configuration data at memory address `addr',\n" @@ -334,8 +334,8 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(eec) = MK_CMD_ENTRY( - "eeclear", 1, 0, do_eecl, +U_BOOT_CMD( + eeclear, 1, 0, do_eecl, "eeclear - Clear the eeprom on a Hymod board \n", "[type]\n" " - write zeroes into the EEPROM on the board of type `type'\n" diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c index 91aa58c..2aa990c 100644 --- a/board/lwmon/lwmon.c +++ b/board/lwmon/lwmon.c @@ -851,8 +851,8 @@ int do_pic (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("Usage:\n%s\n", cmdtp->usage); return 1; } -cmd_tbl_t U_BOOT_CMD(pic) = MK_CMD_ENTRY( - "pic", 4, 1, do_pic, +U_BOOT_CMD( + pic, 4, 1, do_pic, "pic - read and write PIC registers\n", "read reg - read PIC register `reg'\n" "pic write reg val - write value `val' to PIC register `reg'\n" @@ -910,8 +910,8 @@ int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(kdb) = MK_CMD_ENTRY( - "kbd", 1, 1, do_kbd, +U_BOOT_CMD( + kbd, 1, 1, do_kbd, "kbd - read keyboard status\n", NULL ); @@ -982,8 +982,8 @@ int do_lsb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } -cmd_tbl_t U_BOOT_CMD(lsb) = MK_CMD_ENTRY( - "lsb", 2, 1, do_lsb, +U_BOOT_CMD( + lsb, 2, 1, do_lsb, "lsb - check and set LSB switch\n", "on - switch LSB on\n" "lsb off - switch LSB off\n" diff --git a/board/mpl/mip405/cmd_mip405.c b/board/mpl/mip405/cmd_mip405.c index 2075fbd..0f28fa2 100644 --- a/board/mpl/mip405/cmd_mip405.c +++ b/board/mpl/mip405/cmd_mip405.c @@ -53,8 +53,8 @@ int do_mip405(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } return (do_mplcommon(cmdtp, flag, argc, argv)); } -cmd_tbl_t U_BOOT_CMD(mip405) = MK_CMD_ENTRY( - "mip405", 6, 1, do_mip405, +U_BOOT_CMD( + mip405, 6, 1, do_mip405, "mip405 - MIP405 specific Cmds\n", "flash mem [SrcAddr] - updates U-Boot with image in memory\n" "mip405 flash mps - updates U-Boot with image from MPS\n" diff --git a/board/mpl/pip405/cmd_pip405.c b/board/mpl/pip405/cmd_pip405.c index 4cc3776..1bf4d7b 100644 --- a/board/mpl/pip405/cmd_pip405.c +++ b/board/mpl/pip405/cmd_pip405.c @@ -58,8 +58,8 @@ int do_pip405(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return (do_mplcommon(cmdtp, flag, argc, argv)); } -cmd_tbl_t U_BOOT_CMD(pip405) = MK_CMD_ENTRY( - "pip405", 6, 1, do_pip405, +U_BOOT_CMD( + pip405, 6, 1, do_pip405, "pip405 - PIP405 specific Cmds\n", "flash mem [SrcAddr] - updates U-Boot with image in memory\n" "pip405 flash floppy [SrcAddr] - updates U-Boot with image from floppy\n" diff --git a/board/pcippc2/pcippc2.c b/board/pcippc2/pcippc2.c index fd3d479..ce3ae4d 100644 --- a/board/pcippc2/pcippc2.c +++ b/board/pcippc2/pcippc2.c @@ -233,8 +233,8 @@ int do_wd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } -cmd_tbl_t U_BOOT_CMD(wd) = MK_CMD_ENTRY( - "wd", 2, 1, do_wd, +U_BOOT_CMD( + wd, 2, 1, do_wd, "wd - check and set watchdog\n", "on - switch watchDog on\n" "wd off - switch watchdog off\n" diff --git a/board/pn62/cmd_pn62.c b/board/pn62/cmd_pn62.c index 421829a..3ea068d 100644 --- a/board/pn62/cmd_pn62.c +++ b/board/pn62/cmd_pn62.c @@ -51,8 +51,8 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) set_led (number, function); return 0; } -cmd_tbl_t U_BOOT_CMD(led) = MK_CMD_ENTRY( - "led" , 3, 1, do_led, +U_BOOT_CMD( + led , 3, 1, do_led, "led - set LED 0..11 on the PN62 board\n", "i fun\n" " - set 'i'th LED to function 'fun'\n" @@ -165,8 +165,8 @@ int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } -cmd_tbl_t U_BOOT_CMD(loadpci) = MK_CMD_ENTRY( - "loadpci", 2, 1, do_loadpci, +U_BOOT_CMD( + loadpci, 2, 1, do_loadpci, "loadpci - load binary file over PCI\n", "[addr]\n" " - load binary file over PCI to address 'addr'\n" diff --git a/board/r360mpi/r360mpi.c b/board/r360mpi/r360mpi.c index ca556be..fe0deee 100644 --- a/board/r360mpi/r360mpi.c +++ b/board/r360mpi/r360mpi.c @@ -443,8 +443,8 @@ int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(kbd) = MK_CMD_ENTRY( - "kbd", 1, 1, do_kbd, +U_BOOT_CMD( + kbd, 1, 1, do_kbd, "kbd - read keyboard status\n", NULL ); diff --git a/board/siemens/common/fpga.c b/board/siemens/common/fpga.c index 7edeb0a..169048e 100644 --- a/board/siemens/common/fpga.c +++ b/board/siemens/common/fpga.c @@ -291,8 +291,8 @@ int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } -cmd_tbl_t U_BOOT_CMD(fpga) = MK_CMD_ENTRY( - "fpga", 4, 1, do_fpga, +U_BOOT_CMD( + fpga, 4, 1, do_fpga, "fpga - access FPGA(s)\n", "fpga status [name] - print FPGA status\n" "fpga reset [name] - reset FPGA\n" diff --git a/board/siemens/pcu_e/pcu_e.c b/board/siemens/pcu_e/pcu_e.c index 8be70d3..b211189 100644 --- a/board/siemens/pcu_e/pcu_e.c +++ b/board/siemens/pcu_e/pcu_e.c @@ -432,8 +432,8 @@ int do_puma (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("Usage:\n%s\n", cmdtp->usage); return 1; } -cmd_tbl_t U_BOOT_CMD(puma) = MK_CMD_ENTRY( - "puma", 4, 1, do_puma, +U_BOOT_CMD( + puma, 4, 1, do_puma, "puma - access PUMA FPGA\n", "status - print PUMA status\n" "puma load addr len - load PUMA configuration data\n" diff --git a/board/trab/trab.c b/board/trab/trab.c index 1a4f5c5..895c9e1 100644 --- a/board/trab/trab.c +++ b/board/trab/trab.c @@ -298,8 +298,8 @@ int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(kbd) = MK_CMD_ENTRY( - "kbd", 1, 1, do_kbd, +U_BOOT_CMD( + kbd, 1, 1, do_kbd, "kbd - read keyboard status\n", NULL ); diff --git a/board/w7o/cmd_vpd.c b/board/w7o/cmd_vpd.c index 6a151e2..449089e 100644 --- a/board/w7o/cmd_vpd.c +++ b/board/w7o/cmd_vpd.c @@ -56,8 +56,8 @@ int do_vpd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 1; } -cmd_tbl_t U_BOOT_CMD(vpd) = MK_CMD_ENTRY( - "vpd", 2, 1, do_vpd, +U_BOOT_CMD( + vpd, 2, 1, do_vpd, "vpd - Read Vital Product Data\n", "[dev_addr]\n" " - Read VPD Data from default address, or device address 'dev_addr'.\n" diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c index 81dbf49..4894dab 100644 --- a/common/cmd_autoscript.c +++ b/common/cmd_autoscript.c @@ -171,8 +171,8 @@ do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) -cmd_tbl_t U_BOOT_CMD(AUTOSCRIPT) = MK_CMD_ENTRY( - "autoscr", 2, 0, do_autoscript, +U_BOOT_CMD( + autoscr, 2, 0, do_autoscript, "autoscr - run script from memory\n", "[addr] - run script starting at addr" " - A valid autoscr header must be present\n" diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 542e25b..c22a9d1 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -172,8 +172,8 @@ static void print_str(const char *name, const char *str) /* -------------------------------------------------------------------- */ -cmd_tbl_t U_BOOT_CMD(BDINFO) = MK_CMD_ENTRY( - "bdinfo", 1, 1, do_bdinfo, +U_BOOT_CMD( + bdinfo, 1, 1, do_bdinfo, "bdinfo - print Board Info structure\n", NULL ); diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c index 6ee01d5..cdb379d 100644 --- a/common/cmd_bedbug.c +++ b/common/cmd_bedbug.c @@ -108,8 +108,8 @@ int do_bedbug_dis (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) dis_last_len = len; return 0; } /* do_bedbug_dis */ -cmd_tbl_t U_BOOT_CMD(DIS) = MK_CMD_ENTRY( - "ds", 3, 1, do_bedbug_dis, +U_BOOT_CMD( + ds, 3, 1, do_bedbug_dis, "ds - disassemble memory\n", "ds <address> [# instructions]\n" ); @@ -165,8 +165,8 @@ int do_bedbug_asm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } return rcode; } /* do_bedbug_asm */ -cmd_tbl_t U_BOOT_CMD(ASM) = MK_CMD_ENTRY( - "as", 2, 0, do_bedbug_asm, +U_BOOT_CMD( + as, 2, 0, do_bedbug_asm, "as - assemble memory\n", "as <address>\n" ); @@ -184,8 +184,8 @@ int do_bedbug_break (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } /* do_bedbug_break */ -cmd_tbl_t U_BOOT_CMD(BREAK) = MK_CMD_ENTRY( - "break", 3, 0, do_bedbug_break, +U_BOOT_CMD( + break, 3, 0, do_bedbug_break, "break - set or clear a breakpoint\n", " - Set or clear a breakpoint\n" "break <address> - Break at an address\n" @@ -288,8 +288,8 @@ int do_bedbug_continue (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) bug_ctx.stopped = 0; return 0; } /* do_bedbug_continue */ -cmd_tbl_t U_BOOT_CMD(CONTINUE) = MK_CMD_ENTRY( - "continue", 1, 0, do_bedbug_continue, +U_BOOT_CMD( + continue, 1, 0, do_bedbug_continue, "continue- continue from a breakpoint\n", " - continue from a breakpoint.\n" ); @@ -320,8 +320,8 @@ int do_bedbug_step (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) bug_ctx.stopped = 0; return 0; } /* do_bedbug_step */ -cmd_tbl_t U_BOOT_CMD(STEP) = MK_CMD_ENTRY( - "step", 1, 1, do_bedbug_step, +U_BOOT_CMD( + step, 1, 1, do_bedbug_step, "step - single step execution.\n", " - single step execution.\n" ); @@ -352,8 +352,8 @@ int do_bedbug_next (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) bug_ctx.stopped = 0; return 0; } /* do_bedbug_next */ -cmd_tbl_t U_BOOT_CMD(NEXT) = MK_CMD_ENTRY( - "next", 1, 1, do_bedbug_next, +U_BOOT_CMD( + next, 1, 1, do_bedbug_next, "next - single step execution, stepping over subroutines.\n", " - single step execution, stepping over subroutines.\n" ); @@ -401,8 +401,8 @@ int do_bedbug_stack (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } return 0; } /* do_bedbug_stack */ -cmd_tbl_t U_BOOT_CMD(STACK) = MK_CMD_ENTRY( - "where", 1, 1, do_bedbug_stack, +U_BOOT_CMD( + where, 1, 1, do_bedbug_stack, "where - Print the running stack.\n", " - Print the running stack.\n" ); @@ -424,8 +424,8 @@ int do_bedbug_rdump (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) show_regs( bug_ctx.regs ); return 0; } /* do_bedbug_rdump */ -cmd_tbl_t U_BOOT_CMD(RDUMP) = MK_CMD_ENTRY( - "rdump", 1, 1, do_bedbug_rdump, +U_BOOT_CMD( + rdump, 1, 1, do_bedbug_rdump, "rdump - Show registers.\n", " - Show registers.\n" ); diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c index 69f6fa6..6dd6070 100644 --- a/common/cmd_bmp.c +++ b/common/cmd_bmp.c @@ -73,8 +73,8 @@ int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } } -cmd_tbl_t U_BOOT_CMD(BMP) = MK_CMD_ENTRY( - "bmp", 3, 1, do_bmp, +U_BOOT_CMD( + bmp, 3, 1, do_bmp, "bmp - manipulate BMP image data\n", "info <imageAddr> - display image info\n" "bmp display <imageAddr> - display image\n" diff --git a/common/cmd_boot.c b/common/cmd_boot.c index 1adbd42..fe8025d 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -59,8 +59,8 @@ int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* -------------------------------------------------------------------- */ -cmd_tbl_t U_BOOT_CMD(GO) = MK_CMD_ENTRY( - "go", CFG_MAXARGS, 1, do_go, +U_BOOT_CMD( + go, CFG_MAXARGS, 1, do_go, "go - start application at address 'addr'\n", "addr [arg ...]\n - start application at address 'addr'\n" " passing 'arg' as arguments\n" @@ -68,8 +68,8 @@ cmd_tbl_t U_BOOT_CMD(GO) = MK_CMD_ENTRY( extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -cmd_tbl_t U_BOOT_CMD(RESET) = MK_CMD_ENTRY( - "reset", 1, 0, do_reset, +U_BOOT_CMD( + reset, 1, 0, do_reset, "reset - Perform RESET of the CPU\n", NULL ); diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index aad04cf..39c2348 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -381,8 +381,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } -cmd_tbl_t U_BOOT_CMD(BOOTM) = MK_CMD_ENTRY( - "bootm", CFG_MAXARGS, 1, do_bootm, +U_BOOT_CMD( + bootm, CFG_MAXARGS, 1, do_bootm, "bootm - boot application image from memory\n", "[addr [arg ...]]\n - boot application image stored in memory\n" " passing arguments 'arg ...'; when booting a Linux kernel,\n" @@ -872,15 +872,15 @@ int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } -cmd_tbl_t U_BOOT_CMD(BOOT) = MK_CMD_ENTRY( - "boot", 1, 1, do_bootd, +U_BOOT_CMD( + boot, 1, 1, do_bootd, "boot - boot default, i.e., run 'bootcmd'\n", NULL ); /* keep old command name "bootd" for backward compatibility */ -cmd_tbl_t U_BOOT_CMD(BOOTD) = MK_CMD_ENTRY( - "bootd", 1, 1, do_bootd, +U_BOOT_CMD( + bootd, 1, 1, do_bootd, "bootd - boot default, i.e., run 'bootcmd'\n", NULL ); @@ -945,8 +945,9 @@ static int image_info (ulong addr) printf ("OK\n"); return 0; } -cmd_tbl_t U_BOOT_CMD(IMINFO) = MK_CMD_ENTRY( - "iminfo", CFG_MAXARGS, 1, do_iminfo, + +U_BOOT_CMD( + iminfo, CFG_MAXARGS, 1, do_iminfo, "iminfo - print header information for application image\n", "addr [addr ...]\n" " - print header information for application image starting at\n" diff --git a/common/cmd_cache.c b/common/cmd_cache.c index 0016b72..6c250bc 100644 --- a/common/cmd_cache.c +++ b/common/cmd_cache.c @@ -95,15 +95,15 @@ static int on_off (const char *s) } -cmd_tbl_t U_BOOT_CMD(ICACHE) = MK_CMD_ENTRY( - "icache", 2, 1, do_icache, +U_BOOT_CMD( + icache, 2, 1, do_icache, "icache - enable or disable instruction cache\n", "[on, off]\n" " - enable or disable instruction cache\n" ); -cmd_tbl_t U_BOOT_CMD(DCACHE) = MK_CMD_ENTRY( - "dcache", 2, 1, do_dcache, +U_BOOT_CMD( + dcache, 2, 1, do_dcache, "dcache - enable or disable data cache\n", "[on, off]\n" " - enable or disable data (writethrough) cache\n" diff --git a/common/cmd_console.c b/common/cmd_console.c index e6b001a..912234b 100644 --- a/common/cmd_console.c +++ b/common/cmd_console.c @@ -62,8 +62,8 @@ int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(CONINFO) = MK_CMD_ENTRY( - "coninfo", 3, 1, do_coninfo, +U_BOOT_CMD( + coninfo, 3, 1, do_coninfo, "coninfo - print console devices and informations\n", "" ); diff --git a/common/cmd_date.c b/common/cmd_date.c index 6b75210..4648a0e 100644 --- a/common/cmd_date.c +++ b/common/cmd_date.c @@ -191,8 +191,8 @@ int mk_date (char *datestr, struct rtc_time *tmp) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(DATE) = MK_CMD_ENTRY( - "date", 2, 1, do_date, +U_BOOT_CMD( + date, 2, 1, do_date, "date - get/set/reset date & time\n", "[MMDDhhmm[[CC]YY][.ss]]\ndate reset\n" " - without arguments: print date & time\n" diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c index 3ec11b0..a91db66 100644 --- a/common/cmd_dcr.c +++ b/common/cmd_dcr.c @@ -106,13 +106,13 @@ int do_setdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(GETDCR) = MK_CMD_ENTRY( - "getdcr", 2, 1, do_getdcr, +U_BOOT_CMD( + getdcr, 2, 1, do_getdcr, "getdcr - Get an IBM PPC 4xx DCR's value\n", "dcrn - return a DCR's value.\n" ); -cmd_tbl_t U_BOOT_CMD(SETDCR) = MK_CMD_ENTRY( - "setdcr", 2, 1, do_setdcr, +U_BOOT_CMD( + setdcr, 2, 1, do_setdcr, "setdcr - Set an IBM PPC 4xx DCR's value\n", "dcrn - set a DCR's value.\n" ); diff --git a/common/cmd_diag.c b/common/cmd_diag.c index 0bb6c7f..861f005 100644 --- a/common/cmd_diag.c +++ b/common/cmd_diag.c @@ -66,8 +66,8 @@ int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } /***************************************************/ -cmd_tbl_t U_BOOT_CMD(DIAG) = MK_CMD_ENTRY( - "diag", CFG_MAXARGS, 0, do_diag, +U_BOOT_CMD( + diag, CFG_MAXARGS, 0, do_diag, "diag - perform board diagnostics\n", " - print list of available tests\n" "diag [test1 [test2]]\n" diff --git a/common/cmd_doc.c b/common/cmd_doc.c index 17c9d0d..69d1d9f 100644 --- a/common/cmd_doc.c +++ b/common/cmd_doc.c @@ -170,8 +170,8 @@ int do_doc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } } -cmd_tbl_t U_BOOT_CMD(DOC) = MK_CMD_ENTRY( - "doc", 5, 1, do_doc, +U_BOOT_CMD( + doc, 5, 1, do_doc, "doc - Disk-On-Chip sub-system\n", "info - show available DOC devices\n" "doc device [dev] - show or set current device\n" @@ -284,8 +284,8 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } -cmd_tbl_t U_BOOT_CMD(DOCBOOT) = MK_CMD_ENTRY( - "docboot", 4, 1, do_docboot, +U_BOOT_CMD( + docboot, 4, 1, do_docboot, "docboot - boot from DOC device\n", "loadAddr dev\n" ); diff --git a/common/cmd_dtt.c b/common/cmd_dtt.c index 447076c..9db64e9 100644 --- a/common/cmd_dtt.c +++ b/common/cmd_dtt.c @@ -47,8 +47,8 @@ int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(DTT) = MK_CMD_ENTRY( - "dtt", 1, 1, do_dtt, +U_BOOT_CMD( + dtt, 1, 1, do_dtt, "dtt - Digital Thermometer and Themostat\n", " - Read temperature from digital thermometer and thermostat.\n" ); diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c index 0a78319..5193b13 100644 --- a/common/cmd_eeprom.c +++ b/common/cmd_eeprom.c @@ -376,16 +376,16 @@ void eeprom_init (void) #if (CONFIG_COMMANDS & CFG_CMD_EEPROM) #ifdef CFG_I2C_MULTI_EEPROMS -cmd_tbl_t U_BOOT_CMD(EEPROM) = MK_CMD_ENTRY( - "eeprom", 6, 1, do_eeprom, +U_BOOT_CMD( + eeprom, 6, 1, do_eeprom, "eeprom - EEPROM sub-system\n", "read devaddr addr off cnt\n" "eeprom write devaddr addr off cnt\n" " - read/write `cnt' bytes from `devaddr` EEPROM at offset `off'\n" ); #else /* One EEPROM */ -cmd_tbl_t U_BOOT_CMD(EEPROM) = MK_CMD_ENTRY( - "eeprom", 5, 1, do_eeprom, +U_BOOT_CMD( + eeprom, 5, 1, do_eeprom, "eeprom - EEPROM sub-system\n", "read addr off cnt\n" "eeprom write addr off cnt\n" diff --git a/common/cmd_elf.c b/common/cmd_elf.c index c068c10..f039724 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -321,14 +321,14 @@ unsigned long load_elf_image (unsigned long addr) } /* ====================================================================== */ -cmd_tbl_t U_BOOT_CMD(BOOTELF) = MK_CMD_ENTRY( - "bootelf", 2, 0, do_bootelf, +U_BOOT_CMD( + bootelf, 2, 0, do_bootelf, "bootelf - Boot from an ELF image in memory\n", " [address] - load address of ELF image.\n" ); -cmd_tbl_t U_BOOT_CMD(BOOTVX) = MK_CMD_ENTRY( - "bootvx", 2, 0, do_bootvx, +U_BOOT_CMD( + bootvx, 2, 0, do_bootvx, "bootvx - Boot vxWorks from an ELF image\n", " [address] - load address of vxWorks ELF image.\n" ); diff --git a/common/cmd_fat.c b/common/cmd_fat.c index 6be5555..27f8322 100644 --- a/common/cmd_fat.c +++ b/common/cmd_fat.c @@ -62,8 +62,8 @@ int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return size; } -cmd_tbl_t U_BOOT_CMD(FATLOAD) = MK_CMD_ENTRY( - "fatload", 4, 0, do_fat_fsload, +U_BOOT_CMD( + fatload, 4, 0, do_fat_fsload, "fatload - load binary file from a dos filesystem\n", "[ off ] [ filename ]\n" " - load binary file from dos filesystem\n" @@ -83,8 +83,8 @@ int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return (ret); } -cmd_tbl_t U_BOOT_CMD(FATLS) = MK_CMD_ENTRY( - "fatls", 2, 1, do_fat_ls, +U_BOOT_CMD( + fatls, 2, 1, do_fat_ls, "fatls - list files in a directory (default /)\n", "[ directory ]\n" " - list files in a directory\n" @@ -101,8 +101,8 @@ int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return (ret); } -cmd_tbl_t U_BOOT_CMD(FATINFO) = MK_CMD_ENTRY( - "fatinfo", 1, 1, do_fat_fsinfo, +U_BOOT_CMD( + fatinfo, 1, 1, do_fat_fsinfo, "fatinfo - print information about filesystem\n", "\n" " - print information about filesystem\n" diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 3030750..02dffa3 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -888,8 +888,8 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if (CONFIG_COMMANDS & CFG_CMD_FDC) -cmd_tbl_t U_BOOT_CMD(FDC) = MK_CMD_ENTRY( - "fdcboot", 3, 1, do_fdcboot, +U_BOOT_CMD( + fdcboot, 3, 1, do_fdcboot, "fdcboot - boot from floppy device\n", "loadAddr drive\n" ); diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c index 8257e70..adaddcd 100644 --- a/common/cmd_fdos.c +++ b/common/cmd_fdos.c @@ -142,14 +142,14 @@ int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return (dos_dir ()); } -cmd_tbl_t U_BOOT_CMD(FDOS_BOOT) = MK_CMD_ENTRY( - "fdosboot", 3, 0, do_fdosboot, +U_BOOT_CMD( + fdosboot, 3, 0, do_fdosboot, "fdosboot- boot from a dos floppy file\n", "[loadAddr] [filename]\n" ); -cmd_tbl_t U_BOOT_CMD(FDOS_LS) = MK_CMD_ENTRY( - "fdosls", 2, 0, do_fdosls, +U_BOOT_CMD( + fdosls, 2, 0, do_fdosls, "fdosls - list files in a directory\n", "[directory]\n" ); diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 6914f59..811b89b 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -440,15 +440,15 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last) /**************************************************/ -cmd_tbl_t U_BOOT_CMD(FLINFO) = MK_CMD_ENTRY( - "flinfo", 2, 1, do_flinfo, +U_BOOT_CMD( + flinfo, 2, 1, do_flinfo, "flinfo - print FLASH memory information\n", "\n - print information for all FLASH memory banks\n" "flinfo N\n - print information for FLASH memory bank # N\n" ); -cmd_tbl_t U_BOOT_CMD(ERASE) = MK_CMD_ENTRY( - "erase", 3, 1, do_flerase, +U_BOOT_CMD( + erase, 3, 1, do_flerase, "erase - erase FLASH memory\n", "start end\n" " - erase FLASH from addr 'start' to addr 'end'\n" @@ -457,8 +457,8 @@ cmd_tbl_t U_BOOT_CMD(ERASE) = MK_CMD_ENTRY( "erase all\n - erase all FLASH banks\n" ); -cmd_tbl_t U_BOOT_CMD(PROTECT) = MK_CMD_ENTRY( - "protect", 4, 1, do_protect, +U_BOOT_CMD( + protect, 4, 1, do_protect, "protect - enable or disable FLASH write protection\n", "on start end\n" " - protect FLASH from addr 'start' to addr 'end'\n" diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index b364f14..8e180da 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -154,8 +154,8 @@ static int fpga_get_op( char *opstr ) return op; } -cmd_tbl_t U_BOOT_CMD(FPGA) = MK_CMD_ENTRY( - "fpga", 6, 1, do_fpga, +U_BOOT_CMD( + fpga, 6, 1, do_fpga, "fpga - loadable FPGA image support\n", "fpga [operation type] [device number] [image address] [image size]\n" "fpga operations:\n" diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 203e803..3856f3d 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -867,38 +867,38 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(IMD) = MK_CMD_ENTRY( - "imd", 4, 1, do_i2c_md, \ +U_BOOT_CMD( + imd, 4, 1, do_i2c_md, \ "imd - i2c memory display\n", \ "chip address[.0, .1, .2] [# of objects]\n - i2c memory display\n" \ ); -cmd_tbl_t U_BOOT_CMD(IMM) = MK_CMD_ENTRY( - "imm", 3, 1, do_i2c_mm, +U_BOOT_CMD( + imm, 3, 1, do_i2c_mm, "imm - i2c memory modify (auto-incrementing)\n", "chip address[.0, .1, .2]\n" " - memory modify, auto increment address\n" ); -cmd_tbl_t U_BOOT_CMD(INM) = MK_CMD_ENTRY( - "inm", 3, 1, do_i2c_nm, +U_BOOT_CMD( + inm, 3, 1, do_i2c_nm, "inm - memory modify (constant address)\n", "chip address[.0, .1, .2]\n - memory modify, read and keep address\n" ); -cmd_tbl_t U_BOOT_CMD(IMW) = MK_CMD_ENTRY( - "imw", 5, 1, do_i2c_mw, +U_BOOT_CMD( + imw, 5, 1, do_i2c_mw, "imw - memory write (fill)\n", "chip address[.0, .1, .2] value [count]\n - memory write (fill)\n" ); -cmd_tbl_t U_BOOT_CMD(ICRC) = MK_CMD_ENTRY( - "icrc32", 5, 1, do_i2c_crc, +U_BOOT_CMD( + icrc32, 5, 1, do_i2c_crc, "icrc32 - checksum calculation\n", "chip address[.0, .1, .2] count\n - compute CRC32 checksum\n" ); -cmd_tbl_t U_BOOT_CMD(IPROBE) = MK_CMD_ENTRY( - "iprobe", 1, 1, do_i2c_probe, +U_BOOT_CMD( + iprobe, 1, 1, do_i2c_probe, "iprobe - probe to discover valid I2C chip addresses\n", "\n -discover valid I2C chip addresses\n" ); @@ -906,16 +906,16 @@ cmd_tbl_t U_BOOT_CMD(IPROBE) = MK_CMD_ENTRY( /* * Require full name for "iloop" because it is an infinite loop! */ -cmd_tbl_t U_BOOT_CMD(ILOOP) = MK_CMD_ENTRY( - "iloop", 5, 1, do_i2c_loop, +U_BOOT_CMD( + iloop, 5, 1, do_i2c_loop, "iloop - infinite loop on address range\n", "chip address[.0, .1, .2] [# of objects]\n" " - loop, reading a set of addresses\n" ); #if (CONFIG_COMMANDS & CFG_CMD_SDRAM) -cmd_tbl_t U_BOOT_CMD(ISDRAM) = MK_CMD_ENTRY( - "isdram", 2, 1, do_sdram, +U_BOOT_CMD( + isdram, 2, 1, do_sdram, "isdram - print SDRAM configuration information\n", "chip\n - print SDRAM configuration information\n" " (valid chip values 50..57)\n" diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 8ca2b89..dacec2a 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -1810,8 +1810,8 @@ ulong atapi_read (int device, ulong blknr, ulong blkcnt, ulong *buffer) #endif /* CONFIG_ATAPI */ -cmd_tbl_t U_BOOT_CMD(IDE) = MK_CMD_ENTRY( - "ide", 5, 1, do_ide, +U_BOOT_CMD( + ide, 5, 1, do_ide, "ide - IDE sub-system\n", "reset - reset IDE controller\n" "ide info - show available IDE devices\n" @@ -1823,8 +1823,8 @@ cmd_tbl_t U_BOOT_CMD(IDE) = MK_CMD_ENTRY( " to/from memory address `addr'\n" ); -cmd_tbl_t U_BOOT_CMD(DISK) = MK_CMD_ENTRY( - "diskboot", 3, 1, do_diskboot, +U_BOOT_CMD( + diskboot, 3, 1, do_diskboot, "diskboot- boot from IDE device\n", "loadAddr dev:part\n" ); diff --git a/common/cmd_immap.c b/common/cmd_immap.c index fbb4a7d..4bb6e0c 100644 --- a/common/cmd_immap.c +++ b/common/cmd_immap.c @@ -594,106 +594,106 @@ do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(SIUINFO) = MK_CMD_ENTRY( - "siuinfo", 1, 1, do_siuinfo, +U_BOOT_CMD( + siuinfo, 1, 1, do_siuinfo, "siuinfo - print System Interface Unit (SIU) registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(MEMCINFO) = MK_CMD_ENTRY( - "memcinfo", 1, 1, do_memcinfo, +U_BOOT_CMD( + memcinfo, 1, 1, do_memcinfo, "memcinfo- print Memory Controller registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(SITINFO) = MK_CMD_ENTRY( - "sitinfo", 1, 1, do_sitinfo, +U_BOOT_CMD( + sitinfo, 1, 1, do_sitinfo, "sitinfo - print System Integration Timers (SIT) registers\n", NULL ); #ifdef CONFIG_8260 -cmd_tbl_t U_BOOT_CMD(ICINFO) = MK_CMD_ENTRY( - "icinfo", 1, 1, do_icinfo, +U_BOOT_CMD( + icinfo, 1, 1, do_icinfo, "icinfo - print Interrupt Controller registers\n", NULL ); #endif -cmd_tbl_t U_BOOT_CMD(CARINFO) = MK_CMD_ENTRY( - "carinfo", 1, 1, do_carinfo, +U_BOOT_CMD( + carinfo, 1, 1, do_carinfo, "carinfo - print Clocks and Reset registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(IOPINFO) = MK_CMD_ENTRY( - "iopinfo", 1, 1, do_iopinfo, +U_BOOT_CMD( + iopinfo, 1, 1, do_iopinfo, "iopinfo - print I/O Port registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(IOPSET) = MK_CMD_ENTRY( - "iopset", 5, 0, do_iopset, +U_BOOT_CMD( + iopset, 5, 0, do_iopset, "iopset - set I/O Port registers\n", "PORT PIN CMD VALUE\nPORT: A-D, PIN: 0-31, CMD: [dat|dir|odr|sor], VALUE: 0|1" ); -cmd_tbl_t U_BOOT_CMD(DMAINFO) = MK_CMD_ENTRY( - "dmainfo", 1, 1, do_dmainfo, +U_BOOT_CMD( + dmainfo, 1, 1, do_dmainfo, "dmainfo - print SDMA/IDMA registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(FCCINFO) = MK_CMD_ENTRY( - "fccinfo", 1, 1, do_fccinfo, +U_BOOT_CMD( + fccinfo, 1, 1, do_fccinfo, "fccinfo - print FCC registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(BRGINFO) = MK_CMD_ENTRY( - "brginfo", 1, 1, do_brginfo, +U_BOOT_CMD( + brginfo, 1, 1, do_brginfo, "brginfo - print Baud Rate Generator (BRG) registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(I2CINFO) = MK_CMD_ENTRY( - "i2cinfo", 1, 1, do_i2cinfo, +U_BOOT_CMD( + i2cinfo, 1, 1, do_i2cinfo, "i2cinfo - print I2C registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(SCCINFO) = MK_CMD_ENTRY( - "sccinfo", 1, 1, do_sccinfo, +U_BOOT_CMD( + sccinfo, 1, 1, do_sccinfo, "sccinfo - print SCC registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(SMCINFO) = MK_CMD_ENTRY( - "smcinfo", 1, 1, do_smcinfo, +U_BOOT_CMD( + smcinfo, 1, 1, do_smcinfo, "smcinfo - print SMC registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(SPIINFO) = MK_CMD_ENTRY( - "spiinfo", 1, 1, do_spiinfo, +U_BOOT_CMD( + spiinfo, 1, 1, do_spiinfo, "spiinfo - print Serial Peripheral Interface (SPI) registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(MUXINFO) = MK_CMD_ENTRY( - "muxinfo", 1, 1, do_muxinfo, +U_BOOT_CMD( + muxinfo, 1, 1, do_muxinfo, "muxinfo - print CPM Multiplexing registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(SIINFO) = MK_CMD_ENTRY( - "siinfo", 1, 1, do_siinfo, +U_BOOT_CMD( + siinfo, 1, 1, do_siinfo, "siinfo - print Serial Interface (SI) registers\n", NULL ); -cmd_tbl_t U_BOOT_CMD(MCCINFO) = MK_CMD_ENTRY( - "mccinfo", 1, 1, do_mccinfo, +U_BOOT_CMD( + mccinfo, 1, 1, do_mccinfo, "mccinfo - print MCC registers\n", NULL ); diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index e45a2ce..f591565 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -186,29 +186,29 @@ do_jffs2_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(JFFS2_FSLOAD) = MK_CMD_ENTRY( - "fsload", 3, 0, do_jffs2_fsload, +U_BOOT_CMD( + fsload, 3, 0, do_jffs2_fsload, "fsload - load binary file from a filesystem image\n", "[ off ] [ filename ]\n" " - load binary file from flash bank\n" " with offset 'off'\n" ); -cmd_tbl_t U_BOOT_CMD(JFFS2_FSINFO) = MK_CMD_ENTRY( - "fsinfo", 1, 1, do_jffs2_fsinfo, +U_BOOT_CMD( + fsinfo, 1, 1, do_jffs2_fsinfo, "fsinfo - print information about filesystems\n", " - print information about filesystems\n" ); -cmd_tbl_t U_BOOT_CMD(JFFS2_LS) = MK_CMD_ENTRY( - "ls", 2, 1, do_jffs2_ls, +U_BOOT_CMD( + ls, 2, 1, do_jffs2_ls, "ls - list files in a directory (default /)\n", "[ directory ]\n" " - list files in a directory.\n" ); -cmd_tbl_t U_BOOT_CMD(JFFS2_CHPART) = MK_CMD_ENTRY( - "chpart", 2, 0, do_jffs2_chpart, +U_BOOT_CMD( + chpart, 2, 0, do_jffs2_chpart, "chpart - change active partition\n", " - change active partition\n" ); diff --git a/common/cmd_load.c b/common/cmd_load.c index 5272b0f..2cb2f33 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -971,8 +971,8 @@ START: #if (CONFIG_COMMANDS & CFG_CMD_LOADS) #ifdef CFG_LOADS_BAUD_CHANGE -cmd_tbl_t U_BOOT_CMD(LOADS) = MK_CMD_ENTRY( - "loads", 3, 0, do_load_serial, +U_BOOT_CMD( + loads, 3, 0, do_load_serial, "loads - load S-Record file over serial line\n", "[ off ] [ baud ]\n" " - load S-Record file over serial line" @@ -980,8 +980,8 @@ cmd_tbl_t U_BOOT_CMD(LOADS) = MK_CMD_ENTRY( ); #else /* ! CFG_LOADS_BAUD_CHANGE */ -cmd_tbl_t U_BOOT_CMD(LOADS) = MK_CMD_ENTRY( - "loads", 2, 0, do_load_serial, +U_BOOT_CMD( + loads, 2, 0, do_load_serial, "loads - load S-Record file over serial line\n", "[ off ]\n" " - load S-Record file over serial line with offset 'off'\n" @@ -995,16 +995,16 @@ cmd_tbl_t U_BOOT_CMD(LOADS) = MK_CMD_ENTRY( #if (CONFIG_COMMANDS & CFG_CMD_SAVES) #ifdef CFG_LOADS_BAUD_CHANGE -cmd_tbl_t U_BOOT_CMD(SAVES) = MK_CMD_ENTRY( - "saves", 4, 0, do_save_serial, +U_BOOT_CMD( + saves, 4, 0, do_save_serial, "saves - save S-Record file over serial line\n", "[ off ] [size] [ baud ]\n" " - save S-Record file over serial line" " with offset 'off', size 'size' and baudrate 'baud'\n" ); #else /* ! CFG_LOADS_BAUD_CHANGE */ -cmd_tbl_t U_BOOT_CMD(SAVES) = MK_CMD_ENTRY( - "saves", 3, 0, do_save_serial, +U_BOOT_CMD( + saves, 3, 0, do_save_serial, "saves - save S-Record file over serial line\n", "[ off ] [size]\n" " - save S-Record file over serial line with offset 'off' and size 'size'\n" @@ -1015,8 +1015,8 @@ cmd_tbl_t U_BOOT_CMD(SAVES) = MK_CMD_ENTRY( #if (CONFIG_COMMANDS & CFG_CMD_LOADB) -cmd_tbl_t U_BOOT_CMD(LOADB) = MK_CMD_ENTRY( - "loadb", 3, 0, do_load_serial_bin, +U_BOOT_CMD( + loadb, 3, 0, do_load_serial_bin, "loadb - load binary file over serial line (kermit mode)\n", "[ off ] [ baud ]\n" " - load binary file over serial line" @@ -1047,8 +1047,8 @@ int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* -------------------------------------------------------------------- */ -cmd_tbl_t U_BOOT_CMD(HWFLOW) = MK_CMD_ENTRY( - "hwflow [on|off]", 2, 0, do_hwflow, +U_BOOT_CMD( + hwflow [on|off], 2, 0, do_hwflow, "hwflow - turn the harwdare flow control on/off\n", "\n - change RTS/CTS hardware flow control over serial line\n" ); diff --git a/common/cmd_log.c b/common/cmd_log.c index 534c67e..ace2d52 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -202,8 +202,8 @@ int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } } #if defined(CONFIG_LOGBUFFER) -cmd_tbl_t U_BOOT_CMD(LOG) = MK_CMD_ENTRY( - "log", 255, 1, do_log, +U_BOOT_CMD( + log, 255, 1, do_log, "log - manipulate logbuffer\n", "info - show pointer details\n" "log reset - clear contents\n" diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 4d02d2d..7e6c19e 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -963,66 +963,66 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /**************************************************/ #if (CONFIG_COMMANDS & CFG_CMD_MEMORY) -cmd_tbl_t U_BOOT_CMD(MD) = MK_CMD_ENTRY( - "md", 3, 1, do_mem_md, +U_BOOT_CMD( + md, 3, 1, do_mem_md, "md - memory display\n", "[.b, .w, .l] address [# of objects]\n - memory display\n" ); -cmd_tbl_t U_BOOT_CMD(MM) = MK_CMD_ENTRY( - "mm", 2, 1, do_mem_mm, +U_BOOT_CMD( + mm, 2, 1, do_mem_mm, "mm - memory modify (auto-incrementing)\n", "[.b, .w, .l] address\n" " - memory modify, auto increment address\n" ); -cmd_tbl_t U_BOOT_CMD(NM) = MK_CMD_ENTRY( - "nm", 2, 1, do_mem_nm, +U_BOOT_CMD( + nm, 2, 1, do_mem_nm, "nm - memory modify (constant address)\n", "[.b, .w, .l] address\n - memory modify, read and keep address\n" ); -cmd_tbl_t U_BOOT_CMD(MW) = MK_CMD_ENTRY( - "mw", 4, 1, do_mem_mw, +U_BOOT_CMD( + mw, 4, 1, do_mem_mw, "mw - memory write (fill)\n", "[.b, .w, .l] address value [count]\n - write memory\n" ); -cmd_tbl_t U_BOOT_CMD(CP) = MK_CMD_ENTRY( - "cp", 4, 1, do_mem_cp, +U_BOOT_CMD( + cp, 4, 1, do_mem_cp, "cp - memory copy\n", "[.b, .w, .l] source target count\n - copy memory\n" ); -cmd_tbl_t U_BOOT_CMD(CMP) = MK_CMD_ENTRY( - "cmp", 4, 1, do_mem_cmp, +U_BOOT_CMD( + cmp, 4, 1, do_mem_cmp, "cmp - memory compare\n", "[.b, .w, .l] addr1 addr2 count\n - compare memory\n" ); -cmd_tbl_t U_BOOT_CMD(CRC32) = MK_CMD_ENTRY( - "crc32", 4, 1, do_mem_crc, +U_BOOT_CMD( + crc32, 4, 1, do_mem_crc, "crc32 - checksum calculation\n", "address count [addr]\n - compute CRC32 checksum [save at addr]\n" ); -cmd_tbl_t U_BOOT_CMD(BASE) = MK_CMD_ENTRY( - "base", 2, 1, do_mem_base, +U_BOOT_CMD( + base, 2, 1, do_mem_base, "base - print or set address offset\n", "\n - print address offset for memory commands\n" "base off\n - set address offset for memory commands to 'off'\n" ); -cmd_tbl_t U_BOOT_CMD(LOOP) = MK_CMD_ENTRY( - "loop", 3, 1, do_mem_loop, +U_BOOT_CMD( + loop, 3, 1, do_mem_loop, "loop - infinite loop on address range\n", "[.b, .w, .l] address number_of_objects\n" " - loop on a set of addresses\n" ); -cmd_tbl_t U_BOOT_CMD(MTEST) = MK_CMD_ENTRY( - "mtest", 4, 1, do_mem_mtest, +U_BOOT_CMD( + mtest, 4, 1, do_mem_mtest, "mtest - simple RAM test\n", "[start [end [pattern]]]\n" " - simple RAM read/write test\n" diff --git a/common/cmd_mii.c b/common/cmd_mii.c index d74a06f..18fad1e 100644 --- a/common/cmd_mii.c +++ b/common/cmd_mii.c @@ -129,8 +129,8 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(MII) = MK_CMD_ENTRY( - "mii", 5, 1, do_mii, +U_BOOT_CMD( + mii, 5, 1, do_mii, "mii - MII utility commands\n", "info <addr> - display MII PHY info\n" "mii read <addr> <reg> - read MII PHY <addr> register <reg>\n" diff --git a/common/cmd_misc.c b/common/cmd_misc.c index 76fe267..674eafc 100644 --- a/common/cmd_misc.c +++ b/common/cmd_misc.c @@ -56,15 +56,15 @@ int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if (CONFIG_COMMANDS & CFG_CMD_IRQ) int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -cmd_tbl_t U_BOOT_CMD(IRQINFO) = MK_CMD_ENTRY( - "irqinfo", 1, 1, do_irqinfo, +U_BOOT_CMD( + irqinfo, 1, 1, do_irqinfo, "irqinfo - print information about IRQs\n", NULL ); #endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */ -cmd_tbl_t U_BOOT_CMD(MISC) = MK_CMD_ENTRY( - "sleep" , 2, 2, do_sleep, +U_BOOT_CMD( + sleep , 2, 2, do_sleep, "sleep - delay execution for some time\n", "N\n" " - delay execution for N seconds (N is _decimal_ !!!)\n" diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 39c18cc..573eb97 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -37,8 +37,8 @@ int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(MMCINIT) = MK_CMD_ENTRY( - "mmcinit", 1, 0, do_mmc, +U_BOOT_CMD( + mmcinit, 1, 0, do_mmc, "mmcinit - init mmc card\n", NULL ); diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 1da5b03..137f34f 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -247,8 +247,8 @@ int do_nand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } } -cmd_tbl_t U_BOOT_CMD(NAND) = MK_CMD_ENTRY( - "nand", 5, 1, do_nand, +U_BOOT_CMD( + nand, 5, 1, do_nand, "nand - NAND sub-system\n", "info - show available NAND devices\n" "nand device [dev] - show or set current device\n" @@ -363,8 +363,8 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } -cmd_tbl_t U_BOOT_CMD(NBOOT) = MK_CMD_ENTRY( - "nboot", 4, 1, do_nandboot, +U_BOOT_CMD( + nboot, 4, 1, do_nandboot, "nboot - boot from NAND device\n", "loadAddr dev\n" ); diff --git a/common/cmd_net.c b/common/cmd_net.c index 01f5f91..fd7ff56 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -40,8 +40,8 @@ int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return netboot_common (BOOTP, cmdtp, argc, argv); } -cmd_tbl_t U_BOOT_CMD(BOOTP) = MK_CMD_ENTRY( - "bootp", 3, 1, do_bootp, +U_BOOT_CMD( + bootp, 3, 1, do_bootp, "bootp - boot image via network using BootP/TFTP protocol\n", "[loadAddress] [bootfilename]\n" ); @@ -51,8 +51,8 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return netboot_common (TFTP, cmdtp, argc, argv); } -cmd_tbl_t U_BOOT_CMD(TFTPB) = MK_CMD_ENTRY( - "tftpboot", 3, 1, do_tftpb, +U_BOOT_CMD( + tftpboot, 3, 1, do_tftpb, "tftpboot- boot image via network using TFTP protocol\n", "[loadAddress] [bootfilename]\n" ); @@ -62,8 +62,8 @@ int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return netboot_common (RARP, cmdtp, argc, argv); } -cmd_tbl_t U_BOOT_CMD(RARPB) = MK_CMD_ENTRY( - "rarpboot", 3, 1, do_rarpb, +U_BOOT_CMD( + rarpboot, 3, 1, do_rarpb, "rarpboot- boot image via network using RARP/TFTP protocol\n", "[loadAddress] [bootfilename]\n" ); @@ -74,8 +74,8 @@ int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return netboot_common(DHCP, cmdtp, argc, argv); } -cmd_tbl_t U_BOOT_CMD(DHCP) = MK_CMD_ENTRY( - "dhcp", 3, 1, do_dhcp, +U_BOOT_CMD( + dhcp, 3, 1, do_dhcp, "dhcp - invoke DHCP client to obtain IP/boot params\n", "\n" ); diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 9cf8b90..bfc69bd 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -561,16 +561,16 @@ envmatch (uchar *s1, int i2) /**************************************************/ -cmd_tbl_t U_BOOT_CMD(PRINTENV) = MK_CMD_ENTRY( - "printenv", CFG_MAXARGS, 1, do_printenv, +U_BOOT_CMD( + printenv, CFG_MAXARGS, 1, do_printenv, "printenv- print environment variables\n", "\n - print values of all environment variables\n" "printenv name ...\n" " - print value of environment variable 'name'\n" ); -cmd_tbl_t U_BOOT_CMD(SETENV) = MK_CMD_ENTRY( - "setenv", CFG_MAXARGS, 0, do_setenv, +U_BOOT_CMD( + setenv, CFG_MAXARGS, 0, do_setenv, "setenv - set environment variables\n", "name value ...\n" " - set environment variable 'name' to 'value ...'\n" @@ -580,8 +580,8 @@ cmd_tbl_t U_BOOT_CMD(SETENV) = MK_CMD_ENTRY( #if ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == (CFG_CMD_ENV|CFG_CMD_FLASH)) -cmd_tbl_t U_BOOT_CMD(SAVEENV) = MK_CMD_ENTRY( - "saveenv", 1, 0, do_saveenv, +U_BOOT_CMD( + saveenv, 1, 0, do_saveenv, "saveenv - save environment variables to persistent storage\n", NULL ); @@ -590,8 +590,8 @@ cmd_tbl_t U_BOOT_CMD(SAVEENV) = MK_CMD_ENTRY( #if (CONFIG_COMMANDS & CFG_CMD_ASKENV) -cmd_tbl_t U_BOOT_CMD(ASKENV) = MK_CMD_ENTRY( - "askenv", CFG_MAXARGS, 1, do_askenv, +U_BOOT_CMD( + askenv, CFG_MAXARGS, 1, do_askenv, "askenv - get environment variables from stdin\n", "name [message] [size]\n" " - get environment variable 'name' from stdin (max 'size' chars)\n" @@ -607,8 +607,8 @@ cmd_tbl_t U_BOOT_CMD(ASKENV) = MK_CMD_ENTRY( #if (CONFIG_COMMANDS & CFG_CMD_RUN) int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -cmd_tbl_t U_BOOT_CMD(RUN) = MK_CMD_ENTRY( - "run", CFG_MAXARGS, 1, do_run, +U_BOOT_CMD( + run, CFG_MAXARGS, 1, do_run, "run - run commands in an environment variable\n", "var [...]\n" " - run the commands in the environment variable(s) 'var'\n" diff --git a/common/cmd_pci.c b/common/cmd_pci.c index 7641d5c..8d4d901 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -548,8 +548,8 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(PCI) = MK_CMD_ENTRY( - "pci", 5, 1, do_pci, +U_BOOT_CMD( + pci, 5, 1, do_pci, "pci - list and access PCI Configuraton Space\n", "[bus] [long]\n" " - short or long list of PCI devices on bus 'bus'\n" diff --git a/common/cmd_pcmcia.c b/common/cmd_pcmcia.c index 2aa2a23..bfdcbda 100644 --- a/common/cmd_pcmcia.c +++ b/common/cmd_pcmcia.c @@ -2487,8 +2487,8 @@ static int identify (volatile uchar *p) /**************************************************/ #if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) -cmd_tbl_t U_BOOT_CMD(PINIT) = MK_CMD_ENTRY( - "pinit", 2, 1, do_pinit, +U_BOOT_CMD( + pinit, 2, 1, do_pinit, "pinit - PCMCIA sub-system\n", "on - power on PCMCIA socket\n" "pinit off - power off PCMCIA socket\n" diff --git a/common/cmd_portio.c b/common/cmd_portio.c index ad84b81..d2e4c4b 100644 --- a/common/cmd_portio.c +++ b/common/cmd_portio.c @@ -95,8 +95,8 @@ int do_portio_out (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(PORTIO_OUT) = MK_CMD_ENTRY( - "out", 3, 1, do_portio_out, +U_BOOT_CMD( + out, 3, 1, do_portio_out, "out - write datum to IO port\n", "[.b, .w, .l] port value\n - output to IO port\n" ); @@ -159,8 +159,8 @@ int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(PORTIO_IN) = MK_CMD_ENTRY( - "in", 2, 1, do_portio_in, +U_BOOT_CMD( + in, 2, 1, do_portio_in, "in - read data from an IO port\n", "[.b, .w, .l] port\n" " - read datum from IO port\n" diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c index aa9abf9..60a015c 100644 --- a/common/cmd_reginfo.c +++ b/common/cmd_reginfo.c @@ -219,8 +219,8 @@ mfdcr(dmacr3), mfdcr(dmact3),mfdcr(dmada3), mfdcr(dmasa3), mfdcr(dmasb3) ); #if (defined(CONFIG_8xx) || defined(CONFIG_405GP)) && \ (CONFIG_COMMANDS & CFG_CMD_REGINFO) -cmd_tbl_t U_BOOT_CMD(REGINFO) = MK_CMD_ENTRY( - "reginfo", 2, 1, do_reginfo, +U_BOOT_CMD( + reginfo, 2, 1, do_reginfo, "reginfo - print register information\n", ); #endif diff --git a/common/cmd_spi.c b/common/cmd_spi.c index 82cb673..3335a14 100644 --- a/common/cmd_spi.c +++ b/common/cmd_spi.c @@ -131,8 +131,8 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /***************************************************/ -cmd_tbl_t U_BOOT_CMD(SPI) = MK_CMD_ENTRY( - "sspi", 5, 1, do_spi, +U_BOOT_CMD( + sspi, 5, 1, do_spi, "sspi - SPI utility commands\n", "<device> <bit_len> <dout> - Send <bit_len> bits from <dout> out the SPI\n" "<device> - Identifies the chip select of the device\n" diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 17e6433..26b39d0 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -594,8 +594,8 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if (CONFIG_COMMANDS & CFG_CMD_USB) #ifdef CONFIG_USB_STORAGE -cmd_tbl_t U_BOOT_CMD(USB) = MK_CMD_ENTRY( - "usb", 5, 1, do_usb, +U_BOOT_CMD( + usb, 5, 1, do_usb, "usb - USB sub-system\n", "reset - reset (rescan) USB controller\n" "usb stop [f] - stop USB [f]=force stop\n" @@ -609,15 +609,15 @@ cmd_tbl_t U_BOOT_CMD(USB) = MK_CMD_ENTRY( ); -cmd_tbl_t U_BOOT_CMD(USBBOOT) = MK_CMD_ENTRY( - "usbboot", 3, 1, do_usbboot, +U_BOOT_CMD( + usbboot, 3, 1, do_usbboot, "usbboot - boot from USB device\n", "loadAddr dev:part\n" ); #else -cmd_tbl_t U_BOOT_CMD(USB) = MK_CMD_ENTRY( - "usb", 5, 1, do_usb, +U_BOOT_CMD( + usb, 5, 1, do_usb, "usb - USB sub-system\n", "reset - reset (rescan) USB controller\n" "usb tree - show USB device tree\n" diff --git a/common/cmd_vfd.c b/common/cmd_vfd.c index 61ebe1c..f047149 100644 --- a/common/cmd_vfd.c +++ b/common/cmd_vfd.c @@ -65,8 +65,8 @@ int do_vfd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(VFD) = MK_CMD_ENTRY( - "vfd", 2, 0, do_vfd, +U_BOOT_CMD( + vfd, 2, 0, do_vfd, "vfd - load a bitmap to the VFDs on TRAB\n", "N\n" " - load bitmap N to the VFDs (N is _decimal_ !!!)\n" diff --git a/common/command.c b/common/command.c index 9a982b8..dfec9c1 100644 --- a/common/command.c +++ b/common/command.c @@ -36,8 +36,8 @@ do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(VERS) = MK_CMD_ENTRY( - "version", 1, 1, do_version, +U_BOOT_CMD( + version, 1, 1, do_version, "version - print monitor version\n", NULL ); @@ -67,8 +67,8 @@ do_echo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(ECHO) = MK_CMD_ENTRY( - "echo", CFG_MAXARGS, 1, do_echo, +U_BOOT_CMD( + echo, CFG_MAXARGS, 1, do_echo, "echo - echo args to console\n", "[args..]\n" " - echo args to console; \\c suppresses newline\n" @@ -158,8 +158,8 @@ int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } -cmd_tbl_t U_BOOT_CMD(HELP) = MK_CMD_ENTRY( - "help", CFG_MAXARGS, 1, do_help, +U_BOOT_CMD( + help, CFG_MAXARGS, 1, do_help, "help - print online help\n", "[command ...]\n" " - show help information (for 'command')\n" @@ -169,11 +169,19 @@ cmd_tbl_t U_BOOT_CMD(HELP) = MK_CMD_ENTRY( "'help' with one or more command names as arguments.\n" ); -cmd_tbl_t U_BOOT_CMD(QUES) = MK_CMD_ENTRY( +/* This do not ust the U_BOOT_CMD macro as ? can't be used in symbol names */ +#ifdef CFG_LONGHELP +cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = { "?", CFG_MAXARGS, 1, do_help, "? - alias for 'help'\n", NULL -); +}; +#else +cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = { + "?", CFG_MAXARGS, 1, do_help, + "? - alias for 'help'\n" +}; +#endif /* CFG_LONGHELP */ /*************************************************************************** * find command table entry for a command diff --git a/common/kgdb.c b/common/kgdb.c index 73fd9a8..06adb3e 100644 --- a/common/kgdb.c +++ b/common/kgdb.c @@ -573,8 +573,8 @@ do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -cmd_tbl_t U_BOOT_CMD(KGDB) = MK_CMD_ENTRY( - "kgdb", CFG_MAXARGS, 1, do_kgdb, +U_BOOT_CMD( + kgdb, CFG_MAXARGS, 1, do_kgdb, "kgdb - enter gdb remote debug mode\n", "[arg0 arg1 .. argN]\n" " - executes a breakpoint so that kgdb mode is\n" diff --git a/doc/README.commands b/doc/README.commands index 7887f63..d678992 100644 --- a/doc/README.commands +++ b/doc/README.commands @@ -1,103 +1,31 @@ -# -# The commands in this table are sorted alphabetically by the -# command name and in descending order by the command name string -# length. This is to prevent conflicts in command name parsing. -# Please ensure that new commands are added according to that rule. -# See $(TOPDIR)/common/command.c -# -######################## -# -# command length -# -######################## -askenv 8 -as 2 -autoscr 5 -base 2 -bdinfo 2 -bmp 3 -bootelf 7 -bootm 5 -bootp 5 -bootvx 6 -bootd 4 -break 2 -brginfo 3 -carinfo 3 -chpart 6 -cmp 3 -coninfo 5 -continue 4 -cp 2 -crc32 3 -date 3 -dcache 2 -dhcp 4 -dmainfo 3 -ds 2 -dtt 3 -echo 4 -eeprom 3 -erase 3 -fccinfo 3 -fdcboot 4 -flinfo 3 -fpga 4 -fsinfo 5 -fsload 5 -getdcr 6 # IBM 4XX DCR registers -go 2 -help 1 -i2cinfo 4 -i2c 3 -icache 2 -icinfo 3 -ide 3 -iminfo 3 -iopinfo 3 -irqinfo 3 -kgdb 4 -loadb 5 -loads 5 -loop 4 -ls 2 -mccinfo 3 -md 2 -memcinfo 4 -mii 3 -mm 2 -mtest 5 -muxinfo 3 -mw 2 -nand 3 -nboot 4 -next 4 -nm 2 -pciinfo 3 -pinit 4 -printenv 8 -protect 4 -rarpboot 4 -rdump 5 -reginfo 3 -reset 5 -run 3 -saveenv 4 -sccinfo 3 -scsiboot 5 -scsi 4 -siiinfo 3 -sitinfo 3 -siuinfo 3 -setdcr 6 # IBM 4XX DCR registers -setenv 6 -smcinfo 3 -spiinfo 3 -sspi 4 -stack 5 -step 4 -tftpboot 4 -usbboot 5 -usb 4 -version 4 -? 1 + +Commands are added to U-Boot by creating a new command structure. +This is done by first including command.h + +Then using the U_BOOT_CMD() macro to fill in a cmd_tbl_t struct. + +U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help") + +name: is the name of the commad. THIS IS NOT a string. +maxargs: the maximumn numbers of arguments this function takes +command: Function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]); +usage: Short description. This is a string +help: long description. This is a string + + +**** Behinde the scene ****** + +The structure created is named with a special prefix (__u_boot_cmd_) +and placed by the linker in a special section. + +This makes it possible for the final link to extract all commands +compiled into any object code and construct a static array so the +command can be found in an array starting at __u_boot_cmd_start. + +If a new board is defined do not forget to define the command section +by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these +3 lines: + + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; diff --git a/include/command.h b/include/command.h index a39c12f..b8c42e1 100644 --- a/include/command.h +++ b/include/command.h @@ -40,7 +40,6 @@ struct cmd_tbl_s { char *name; /* Command Name */ int maxargs; /* maximum number of arguments */ int repeatable; /* autorepeat allowed? */ - /* Implementation function */ int (*cmd)(struct cmd_tbl_s *, int, int, char *[]); char *usage; /* Usage message (short) */ @@ -83,17 +82,16 @@ typedef void command_t (cmd_tbl_t *, int, int, char *[]); #define Struct_Section __attribute__ ((unused,section (".u_boot_cmd"))) -#define U_BOOT_CMD(x) __u_boot_cmd_##x Struct_Section #ifdef CFG_LONGHELP -#define MK_CMD_ENTRY(name,maxargs,rep,cmd,usage,help) \ - { name, maxargs, rep, cmd, usage, help } +#define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \ +cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage, help} #else /* no long help info */ -#define MK_CMD_ENTRY(name,maxargs,rep,cmd,usage,help) \ - { name, maxargs, rep, cmd, usage } +#define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \ +cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage} #endif /* CFG_LONGHELP */ diff --git a/lib_generic/display_options.c b/lib_generic/display_options.c index ac04bff..512e898 100644 --- a/lib_generic/display_options.c +++ b/lib_generic/display_options.c @@ -54,6 +54,11 @@ void print_size (ulong size, const char *s) m = (10 * (size - (n * d)) + (d / 2) ) / d; + if (m >= 10) { + m -= 10; + n += 1; + } + printf ("%2ld", n); if (m) { printf (".%ld", m); |