]>
Commit | Line | Data |
---|---|---|
78f6622a WD |
1 | /* |
2 | * (C) Copyright 2000 | |
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | * | |
5 | * See file CREDITS for list of people who contributed to this | |
6 | * project. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public License as | |
10 | * published by the Free Software Foundation; either version 2 of | |
11 | * the License, or (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | * MA 02111-1307 USA | |
22 | */ | |
23 | ||
24 | /* | |
25 | * FLASH support | |
26 | */ | |
27 | #ifndef _CMD_FLASH_H | |
28 | #define _CMD_FLASH_H | |
29 | ||
30 | #if (CONFIG_COMMANDS & CFG_CMD_FLASH) | |
31 | #define CMD_TBL_FLINFO MK_CMD_TBL_ENTRY( \ | |
32 | "flinfo", 3, 2, 1, do_flinfo, \ | |
33 | "flinfo - print FLASH memory information\n", \ | |
34 | "\n - print information for all FLASH memory banks\n" \ | |
35 | "flinfo N\n - print information for FLASH memory bank # N\n" \ | |
36 | ), | |
37 | ||
38 | #define CMD_TBL_FLERASE MK_CMD_TBL_ENTRY( \ | |
39 | "erase", 3, 3, 1, do_flerase, \ | |
40 | "erase - erase FLASH memory\n", \ | |
41 | "start end\n" \ | |
42 | " - erase FLASH from addr 'start' to addr 'end'\n" \ | |
43 | "erase N:SF[-SL]\n - erase sectors SF-SL in FLASH bank # N\n" \ | |
44 | "erase bank N\n - erase FLASH bank # N\n" \ | |
45 | "erase all\n - erase all FLASH banks\n" \ | |
46 | ), | |
47 | ||
48 | #define CMD_TBL_PROTECT MK_CMD_TBL_ENTRY( \ | |
49 | "protect", 4, 4, 1, do_protect, \ | |
50 | "protect - enable or disable FLASH write protection\n", \ | |
51 | "on start end\n" \ | |
52 | " - protect FLASH from addr 'start' to addr 'end'\n" \ | |
53 | "protect on N:SF[-SL]\n" \ | |
54 | " - protect sectors SF-SL in FLASH bank # N\n" \ | |
55 | "protect on bank N\n - protect FLASH bank # N\n" \ | |
56 | "protect on all\n - protect all FLASH banks\n" \ | |
57 | "protect off start end\n" \ | |
58 | " - make FLASH from addr 'start' to addr 'end' writable\n" \ | |
59 | "protect off N:SF[-SL]\n" \ | |
60 | " - make sectors SF-SL writable in FLASH bank # N\n" \ | |
61 | "protect off bank N\n - make FLASH bank # N writable\n" \ | |
62 | "protect off all\n - make all FLASH banks writable\n" \ | |
63 | ), | |
64 | int do_flinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
65 | int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
66 | int do_protect(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
67 | #else | |
68 | #define CMD_TBL_FLINFO | |
69 | #define CMD_TBL_FLERASE | |
70 | #define CMD_TBL_PROTECT | |
71 | #endif /* CFG_CMD_FLASH */ | |
72 | ||
73 | #endif /* _CMD_FLASH_H */ |