diff options
author | wdenk <wdenk> | 2002-08-27 10:27:51 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2002-08-27 10:27:51 +0000 |
commit | 78f6622a1f135b8f3eabdba71cf26e8371f7eeef (patch) | |
tree | c2afac402ae70c11235e0e8269d9ef1e01f7b2e2 /include/cmd_flash.h | |
parent | 4a9cbbe832e1c377d04cfb53e9679844595bc3cf (diff) | |
download | u-boot-imx-78f6622a1f135b8f3eabdba71cf26e8371f7eeef.zip u-boot-imx-78f6622a1f135b8f3eabdba71cf26e8371f7eeef.tar.gz u-boot-imx-78f6622a1f135b8f3eabdba71cf26e8371f7eeef.tar.bz2 |
Initial revision
Diffstat (limited to 'include/cmd_flash.h')
-rw-r--r-- | include/cmd_flash.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/include/cmd_flash.h b/include/cmd_flash.h new file mode 100644 index 0000000..6f5c6cd --- /dev/null +++ b/include/cmd_flash.h @@ -0,0 +1,73 @@ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* + * FLASH support + */ +#ifndef _CMD_FLASH_H +#define _CMD_FLASH_H + +#if (CONFIG_COMMANDS & CFG_CMD_FLASH) +#define CMD_TBL_FLINFO MK_CMD_TBL_ENTRY( \ + "flinfo", 3, 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" \ +), + +#define CMD_TBL_FLERASE MK_CMD_TBL_ENTRY( \ + "erase", 3, 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" \ +), + +#define CMD_TBL_PROTECT MK_CMD_TBL_ENTRY( \ + "protect", 4, 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" \ +), +int do_flinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_protect(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +#else +#define CMD_TBL_FLINFO +#define CMD_TBL_FLERASE +#define CMD_TBL_PROTECT +#endif /* CFG_CMD_FLASH */ + +#endif /* _CMD_FLASH_H */ |