summaryrefslogtreecommitdiff
path: root/common/cmd_flash.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /common/cmd_flash.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'common/cmd_flash.c')
-rw-r--r--common/cmd_flash.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index efc89dc..6914f59 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -26,8 +26,7 @@
*/
#include <common.h>
#include <command.h>
-#include <cmd_boot.h>
-#include <flash.h>
+
#ifdef CONFIG_HAS_DATAFLASH
#include <dataflash.h>
@@ -438,4 +437,41 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
return rcode;
}
+
+/**************************************************/
+
+cmd_tbl_t U_BOOT_CMD(FLINFO) = MK_CMD_ENTRY(
+ "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,
+ "erase - erase FLASH memory\n",
+ "start end\n"
+ " - erase FLASH from addr 'start' to addr 'end'\n"
+ "erase N:SF[-SL]\n - erase sectors SF-SL in FLASH bank # N\n"
+ "erase bank N\n - erase FLASH bank # N\n"
+ "erase all\n - erase all FLASH banks\n"
+);
+
+cmd_tbl_t U_BOOT_CMD(PROTECT) = MK_CMD_ENTRY(
+ "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"
+ "protect on N:SF[-SL]\n"
+ " - protect sectors SF-SL in FLASH bank # N\n"
+ "protect on bank N\n - protect FLASH bank # N\n"
+ "protect on all\n - protect all FLASH banks\n"
+ "protect off start end\n"
+ " - make FLASH from addr 'start' to addr 'end' writable\n"
+ "protect off N:SF[-SL]\n"
+ " - make sectors SF-SL writable in FLASH bank # N\n"
+ "protect off bank N\n - make FLASH bank # N writable\n"
+ "protect off all\n - make all FLASH banks writable\n"
+);
+
#endif /* CFG_CMD_FLASH */