diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_autoscript.c | 1 | ||||
-rw-r--r-- | common/cmd_bmp.c | 7 | ||||
-rw-r--r-- | common/cmd_boot.c | 1 | ||||
-rw-r--r-- | common/cmd_fat.c | 23 | ||||
-rw-r--r-- | common/cmd_fpga.c | 1 | ||||
-rw-r--r-- | common/cmd_ide.c | 1 | ||||
-rw-r--r-- | common/cmd_load.c | 1 | ||||
-rw-r--r-- | common/cmd_mmc.c | 6 | ||||
-rw-r--r-- | common/cmd_nand.c | 21 | ||||
-rw-r--r-- | common/cmd_net.c | 1 | ||||
-rw-r--r-- | common/cmd_portio.c | 14 | ||||
-rw-r--r-- | common/cmd_scsi.c | 1 | ||||
-rw-r--r-- | common/cmd_usb.c | 1 | ||||
-rw-r--r-- | common/command.c | 26 |
14 files changed, 82 insertions, 23 deletions
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c index d3d04c3040a..81dbf495758 100644 --- a/common/cmd_autoscript.c +++ b/common/cmd_autoscript.c @@ -47,7 +47,6 @@ #include <hush.h> #endif -#define AUTOSCRIPT_MAGIC 0x09011962 #if defined(CONFIG_AUTOSCRIPT) || \ (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT ) diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c index c6a16a46cfb..6e813c625eb 100644 --- a/common/cmd_bmp.c +++ b/common/cmd_bmp.c @@ -73,6 +73,13 @@ 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, + "bmp - manipulate BMP image data\n", + "info <imageAddr> - display image info\n" + "bmp display <imageAddr> - display image\n" +); + /* * Subroutine: bmp_info * diff --git a/common/cmd_boot.c b/common/cmd_boot.c index a0bc04ba60c..1adbd42b1bc 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -26,7 +26,6 @@ */ #include <common.h> #include <command.h> -#include <cmd_autoscript.h> #include <net.h> #include <syscall.h> diff --git a/common/cmd_fat.c b/common/cmd_fat.c index 12eb764a9dd..6be55556251 100644 --- a/common/cmd_fat.c +++ b/common/cmd_fat.c @@ -26,7 +26,6 @@ */ #include <common.h> #include <command.h> -#include <cmd_autoscript.h> #include <s_record.h> #include <net.h> #include <ata.h> @@ -63,6 +62,14 @@ 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, + "fatload - load binary file from a dos filesystem\n", + "[ off ] [ filename ]\n" + " - load binary file from dos filesystem\n" + " with offset 'off'\n" +); + int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { char *filename = "/"; @@ -76,6 +83,13 @@ 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, + "fatls - list files in a directory (default /)\n", + "[ directory ]\n" + " - list files in a directory\n" +); + int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int ret; @@ -87,6 +101,13 @@ 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, + "fatinfo - print information about filesystem\n", + "\n" + " - print information about filesystem\n" +); + #ifdef NOT_IMPLEMENTED_YET /* find first device whose first partition is a DOS filesystem */ int find_fat_partition (void) diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index f8ae52a66e5..b364f14832a 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -27,7 +27,6 @@ */ #include <common.h> #include <command.h> -#include <cmd_bsp.h> #if (CONFIG_COMMANDS & CFG_CMD_NET) #include <net.h> #endif diff --git a/common/cmd_ide.c b/common/cmd_ide.c index c1e610ae60a..8ca2b8992d2 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -39,7 +39,6 @@ #endif #include <ide.h> #include <ata.h> -#include <cmd_disk.h> #ifdef CONFIG_STATUS_LED # include <status_led.h> #endif diff --git a/common/cmd_load.c b/common/cmd_load.c index d784e837283..5272b0f2d02 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -26,7 +26,6 @@ */ #include <common.h> #include <command.h> -#include <cmd_autoscript.h> #include <s_record.h> #include <net.h> #include <syscall.h> diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 45b506416fd..39c18cc01a8 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -37,4 +37,10 @@ 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, + "mmcinit - init mmc card\n", + NULL +); + #endif /* CFG_CMD_MMC */ diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 41f84fdc0f6..1da5b03a31b 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -247,6 +247,21 @@ 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, + "nand - NAND sub-system\n", + "info - show available NAND devices\n" + "nand device [dev] - show or set current device\n" + "nand read[.jffs2] addr off size\n" + "nand write[.jffs2] addr off size - read/write `size' bytes starting\n" + " at offset `off' to/from memory address `addr'\n" + "nand erase [clean] [off size] - erase `size' bytes from\n" + " offset `off' (entire device if not specified)\n" + "nand bad - show bad blocks\n" + "nand read.oob addr off size - read out-of-band data\n" + "nand write.oob addr off size - read out-of-band data\n" +); + int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { char *boot_device = NULL; @@ -348,6 +363,12 @@ 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, + "nboot - boot from NAND device\n", + "loadAddr dev\n" +); + /* returns 0 if block containing pos is OK: * valid erase block and * not marked bad, or no bad mark position is specified diff --git a/common/cmd_net.c b/common/cmd_net.c index 8a55f43b321..01f5f91c821 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -26,7 +26,6 @@ */ #include <common.h> #include <command.h> -#include <cmd_autoscript.h> #include <net.h> #if (CONFIG_COMMANDS & CFG_CMD_NET) diff --git a/common/cmd_portio.c b/common/cmd_portio.c index afa39e1ebd9..ad84b81dc2d 100644 --- a/common/cmd_portio.c +++ b/common/cmd_portio.c @@ -29,7 +29,6 @@ #include <common.h> #include <command.h> -#include <cmd_portio.h> #if (CONFIG_COMMANDS & CFG_CMD_PORTIO) @@ -96,6 +95,12 @@ 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, + "out - write datum to IO port\n", + "[.b, .w, .l] port value\n - output to IO port\n" +); + int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) { uint addr = in_last_addr; @@ -154,4 +159,11 @@ 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, + "in - read data from an IO port\n", + "[.b, .w, .l] port\n" + " - read datum from IO port\n" +); + #endif /* CFG_CMD_PORTIO */ diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index c925823cd4f..2da9ac9160b 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -33,7 +33,6 @@ #include <asm/processor.h> #include <scsi.h> #include <image.h> -#include <cmd_disk.h> #include <pci.h> diff --git a/common/cmd_usb.c b/common/cmd_usb.c index d8f2f2cde15..17e6433578d 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -31,7 +31,6 @@ #if (CONFIG_COMMANDS & CFG_CMD_USB) #include <usb.h> -#include <cmd_disk.h> #undef CMD_USB_DEBUG diff --git a/common/command.c b/common/command.c index 059da7c96c3..9a982b8da2e 100644 --- a/common/command.c +++ b/common/command.c @@ -36,6 +36,12 @@ 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, + "version - print monitor version\n", + NULL +); + int do_echo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { @@ -61,6 +67,13 @@ 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, + "echo - echo args to console\n", + "[args..]\n" + " - echo args to console; \\c suppresses newline\n" +); + /* * Use puts() instead of printf() to avoid printf buffer overflow * for long help messages @@ -162,19 +175,6 @@ cmd_tbl_t U_BOOT_CMD(QUES) = MK_CMD_ENTRY( NULL ); -cmd_tbl_t U_BOOT_CMD(VERS) = MK_CMD_ENTRY( - "version", 1, 1, do_version, - "version - print monitor version\n", - NULL -); - -cmd_tbl_t U_BOOT_CMD(ECHO) = MK_CMD_ENTRY( - "echo", CFG_MAXARGS, 1, do_echo, - "echo - echo args to console\n", - "[args..]\n" - " - echo args to console; \\c suppresses newline\n" -); - /*************************************************************************** * find command table entry for a command */ |