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
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"
);
}
#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",
""
);
}
-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"
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"
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"
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"
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"
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
);
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"
}
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"
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"
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"
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"
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"
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
);
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"
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"
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
);
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"
}
#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"
/* -------------------------------------------------------------------- */
-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
);
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"
);
}
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"
);
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"
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"
);
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"
);
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"
);
}
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"
);
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"
);
}
}
-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"
/* -------------------------------------------------------------------- */
-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"
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
);
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"
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
);
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"
}
-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"
/***************************************************/
-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",
""
);
/***************************************************/
-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"
/***************************************************/
-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"
);
}
/***************************************************/
-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"
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"
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"
);
/***************************************************/
-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"
);
#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"
}
/* ====================================================================== */
-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"
);
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"
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"
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"
#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"
);
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"
);
/**************************************************/
-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"
"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"
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"
/***************************************************/
-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"
);
/*
* 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"
#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"
" 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"
);
/***************************************************/
-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
);
/***************************************************/
-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"
);
#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"
);
#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"
#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"
#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"
/* -------------------------------------------------------------------- */
-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"
);
}
}
#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"
/**************************************************/
#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"
/***************************************************/
-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"
#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"
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
);
}
}
-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"
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"
);
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"
);
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"
);
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"
);
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"
);
/**************************************************/
-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"
#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
);
#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"
#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"
/***************************************************/
-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"
/**************************************************/
#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"
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"
);
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"
#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
/***************************************************/
-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"
#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"
);
-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"
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"
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
);
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"
}
-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"
"'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
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"
-#
-# 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 = .;
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) */
#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 */
m = (10 * (size - (n * d)) + (d / 2) ) / d;
+ if (m >= 10) {
+ m -= 10;
+ n += 1;
+ }
+
printf ("%2ld", n);
if (m) {
printf (".%ld", m);