summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-29 21:03:46 +0000
committerwdenk <wdenk>2003-06-29 21:03:46 +0000
commitb0fce99bfc116c2ddb4506268d6e4a0a7054478d (patch)
tree6a11d99f1e350d9046c1c0e17298fa2bccd7db3e /common
parenteeacb89cb311fe273fef0f20b2bacf589b36f8f4 (diff)
downloadu-boot-imx-b0fce99bfc116c2ddb4506268d6e4a0a7054478d.zip
u-boot-imx-b0fce99bfc116c2ddb4506268d6e4a0a7054478d.tar.gz
u-boot-imx-b0fce99bfc116c2ddb4506268d6e4a0a7054478d.tar.bz2
Fix some missing commands, cleanup header files
(autoscript, bmp, bsp, fat, mmc, nand, portio, ...)
Diffstat (limited to 'common')
-rw-r--r--common/cmd_autoscript.c1
-rw-r--r--common/cmd_bmp.c7
-rw-r--r--common/cmd_boot.c1
-rw-r--r--common/cmd_fat.c23
-rw-r--r--common/cmd_fpga.c1
-rw-r--r--common/cmd_ide.c1
-rw-r--r--common/cmd_load.c1
-rw-r--r--common/cmd_mmc.c6
-rw-r--r--common/cmd_nand.c21
-rw-r--r--common/cmd_net.c1
-rw-r--r--common/cmd_portio.c14
-rw-r--r--common/cmd_scsi.c1
-rw-r--r--common/cmd_usb.c1
-rw-r--r--common/command.c26
14 files changed, 82 insertions, 23 deletions
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
index d3d04c3..81dbf49 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 c6a16a4..6e813c6 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 a0bc04b..1adbd42 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 12eb764..6be5555 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 f8ae52a..b364f14 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 c1e610a..8ca2b89 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 d784e83..5272b0f 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 45b5064..39c18cc 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 41f84fd..1da5b03 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 8a55f43..01f5f91 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 afa39e1..ad84b81 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 c925823..2da9ac9 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 d8f2f2c..17e6433 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 059da7c..9a982b8 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
*/