summaryrefslogtreecommitdiff
path: root/common/cmd_nand.c
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/cmd_nand.c
parenteeacb89cb311fe273fef0f20b2bacf589b36f8f4 (diff)
Fix some missing commands, cleanup header filesU-Boot-0_4_1
(autoscript, bmp, bsp, fat, mmc, nand, portio, ...)
Diffstat (limited to 'common/cmd_nand.c')
-rw-r--r--common/cmd_nand.c21
1 files changed, 21 insertions, 0 deletions
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