]>
Commit | Line | Data |
---|---|---|
c609719b | 1 | /* |
c7de829c | 2 | * (C) Copyright 2001, 2002 |
c609719b WD |
3 | * Wolfgang Denk, DENX Software Engineering, [email protected]. |
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 | #ifndef _CMD_BSP_H_ | |
25 | #define _CMD_BSP_H_ | |
26 | ||
27 | #include <common.h> | |
28 | #include <command.h> | |
29 | ||
30 | #if (CONFIG_COMMANDS & CFG_CMD_BSP) | |
31 | ||
c7de829c | 32 | /* ----- LWMON --------------------------------------------------------- |
c609719b WD |
33 | */ |
34 | #if defined(CONFIG_LWMON) | |
35 | ||
36 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
37 | "pic", 3, 4, 1, do_pic, \ | |
38 | "pic - read and write PIC registers\n", \ | |
39 | "read reg - read PIC register `reg'\n" \ | |
40 | "pic write reg val - write value `val' to PIC register `reg'\n" \ | |
41 | ), MK_CMD_TBL_ENTRY( \ | |
42 | "kbd", 3, 1, 1, do_kbd, \ | |
43 | "kbd - read keyboard status\n", \ | |
44 | NULL \ | |
45 | ), MK_CMD_TBL_ENTRY( \ | |
46 | "lsb", 3, 2, 1, do_lsb, \ | |
47 | "lsb - check and set LSB switch\n", \ | |
48 | "on - switch LSB on\n" \ | |
49 | "lsb off - switch LSB off\n" \ | |
50 | "lsb - print current setting\n" \ | |
51 | ), | |
52 | int do_pic (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
53 | int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
54 | int do_lsb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
55 | ||
56 | #endif /* CONFIG_LWMON */ | |
c7de829c | 57 | /* -------------------------------------------------------------------- */ |
c609719b | 58 | |
c7de829c | 59 | /* ----- PCU E -------------------------------------------------------- */ |
c609719b WD |
60 | #if defined(CONFIG_PCU_E) |
61 | ||
62 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
63 | "puma", 4, 4, 1, do_puma, \ | |
64 | "puma - access PUMA FPGA\n", \ | |
65 | "status - print PUMA status\n" \ | |
66 | "puma load addr len - load PUMA configuration data\n" \ | |
67 | ), | |
68 | int do_puma (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
69 | ||
70 | #endif /* CONFIG_PCU_E */ | |
c7de829c | 71 | /* -------------------------------------------------------------------- */ |
c609719b | 72 | |
c7de829c | 73 | /* ----- CCM/SCM ------------------------------------------------------ */ |
c609719b WD |
74 | #if defined(CONFIG_CCM) || defined(CONFIG_SCM) |
75 | ||
76 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
77 | "fpga", 4, 4, 1, do_fpga, \ | |
78 | "fpga - access FPGA(s)\n", \ | |
79 | "fpga status [name] - print FPGA status\n" \ | |
80 | "fpga reset [name] - reset FPGA\n" \ | |
81 | "fpga load [name] addr - load FPGA configuration data\n" \ | |
82 | ), | |
83 | int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
84 | ||
85 | #endif /* CONFIG_CCM, CONFIG_SCM */ | |
c7de829c | 86 | /* -------------------------------------------------------------------- */ |
c609719b | 87 | |
c7de829c | 88 | /* ----- PIP405 ------------------------------------------------------- */ |
c609719b WD |
89 | #if defined(CONFIG_PIP405) |
90 | ||
91 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
92 | "pip405", 4, 6, 1, do_pip405, \ | |
93 | "pip405 - PIP405 specific Cmds\n", \ | |
94 | "flash mem [SrcAddr] - updates U-Boot with image in memory\n" \ | |
95 | "pip405 flash floppy [SrcAddr] - updates U-Boot with image from floppy\n" \ | |
96 | "pip405 flash mps - updates U-Boot with image from MPS\n" \ | |
97 | ), | |
98 | int do_pip405 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
99 | ||
100 | #endif /* CONFIG_PIP405 */ | |
c7de829c WD |
101 | /* -------------------------------------------------------------------- */ |
102 | ||
103 | /* ----- MIP405 ------------------------------------------------------- */ | |
c609719b WD |
104 | #if defined(CONFIG_MIP405) |
105 | ||
106 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
107 | "mip405", 4, 6, 1, do_mip405, \ | |
108 | "mip405 - MIP405 specific Cmds\n", \ | |
109 | "flash mem [SrcAddr] - updates U-Boot with image in memory\n" \ | |
110 | "mip405 flash mps - updates U-Boot with image from MPS\n" \ | |
111 | ), | |
112 | int do_mip405 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
113 | ||
114 | #endif /* CONFIG_MIP405 */ | |
1cb8e980 WD |
115 | /* ----- VCMA9 ----------------------------------------------------------------- |
116 | */ | |
117 | #if defined(CONFIG_VCMA9) | |
118 | ||
119 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
120 | "vcma9", 4, 6, 1, do_vcma9, \ | |
121 | "vcma9 - VCMA9 specific Cmds\n", \ | |
122 | "flash mem [SrcAddr] - updates U-Boot with image in memory\n" \ | |
123 | ), | |
124 | int do_vcma9 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
125 | ||
126 | #endif /* CONFIG_VCMA9 */ | |
127 | /* ----------------------------------------------------------------------------*/ | |
c609719b | 128 | |
c7de829c | 129 | /* ----- DASA_SIM ----------------------------------------------------- */ |
c609719b WD |
130 | #if defined(CONFIG_DASA_SIM) |
131 | ||
132 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
133 | "pci9054", 7, 3, 1, do_pci9054, \ | |
134 | "pci9054 - PLX PCI9054 EEPROM access\n", \ | |
135 | "pci9054 info - print EEPROM values\n" \ | |
136 | "pci9054 update - updates EEPROM with default values\n" \ | |
137 | ), | |
138 | int do_pci9054 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
139 | ||
140 | #endif /* CONFIG_DASA_SIM */ | |
c7de829c | 141 | /* -------------------------------------------------------------------- */ |
c609719b | 142 | |
c7de829c | 143 | /* ----- HYMOD -------------------------------------------------------- */ |
c609719b WD |
144 | #if defined(CONFIG_HYMOD) |
145 | ||
146 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
147 | "fpga", 4, 6, 1, do_fpga, \ | |
148 | "fpga - FPGA sub-system\n", \ | |
149 | "load [type] addr size\n" \ | |
150 | " - write the configuration data at memory address `addr',\n" \ | |
151 | " size `size' bytes, into the FPGA of type `type' (either\n" \ | |
152 | " `main' or `mezz', default `main'). e.g.\n" \ | |
153 | " `fpga load 100000 7d8f'\n" \ | |
154 | " loads the main FPGA with config data at address 100000\n" \ | |
155 | " HEX, size 7d8f HEX (32143 DEC) bytes\n" \ | |
156 | "fpga tftp file addr\n" \ | |
157 | " - transfers `file' from the tftp server into memory at\n" \ | |
158 | " address `addr', then writes the entire file contents\n" \ | |
159 | " into the main FPGA\n" \ | |
160 | "fpga store addr\n" \ | |
161 | " - read configuration data from the main FPGA (the mezz\n" \ | |
162 | " FPGA is write-only), into address `addr'. There must be\n" \ | |
163 | " enough memory available at `addr' to hold all the config\n"\ | |
164 | " data - the size of which is determined by VC:???\n" \ | |
165 | "fpga info\n" \ | |
166 | " - print information about the Hymod FPGA, namely the\n" \ | |
167 | " memory addresses at which the four FPGA local bus\n" \ | |
168 | " address spaces appear in the physical address space\n" \ | |
169 | ), MK_CMD_TBL_ENTRY( \ | |
170 | "eeclear", 4, 1, 0, do_eecl, \ | |
6dd652fa | 171 | "eeclear - Clear the eeprom on a Hymod board\n", \ |
c609719b WD |
172 | "[type]\n" \ |
173 | " - write zeroes into the EEPROM on the board of type `type'\n"\ | |
174 | " (`type' is either `main' or `mezz' - default `main')\n" \ | |
175 | " Note: the EEPROM write enable jumper must be installed\n" \ | |
6dd652fa WD |
176 | ), MK_CMD_TBL_ENTRY( \ |
177 | "htest", 5, 1, 0, do_htest, \ | |
178 | "htest - run HYMOD tests\n", \ | |
179 | NULL \ | |
c609719b | 180 | ), |
6dd652fa | 181 | |
c609719b WD |
182 | int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); |
183 | int do_eecl (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
6dd652fa | 184 | int do_htest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); |
c609719b WD |
185 | |
186 | #endif /* CONFIG_HYMOD */ | |
c7de829c WD |
187 | /* -------------------------------------------------------------------- */ |
188 | ||
189 | /* ----- CRAY405 (L1) ------------------------------------------------- */ | |
c609719b WD |
190 | #if defined (CONFIG_CRAYL1) |
191 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
192 | "L1cmd", 5, 4, 1, do_crayL1, \ | |
193 | "L1cmd - L1 update, setup, commands \n", \ | |
194 | "L1cmd update - update flash images from host\n" \ | |
195 | "L1cmd boot - nfs or ramboot L1\n" \ | |
196 | ), | |
197 | int do_crayL1 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
198 | #endif /* CONFIG_CRAY405 */ | |
c7de829c | 199 | /* -------------------------------------------------------------------- */ |
c609719b | 200 | |
c7de829c | 201 | /* ----- EVB64260 ----------------------------------------------------- */ |
c609719b | 202 | #if defined (CONFIG_EVB64260) |
c609719b WD |
203 | #ifdef CONFIG_ZUMA_V2 |
204 | #define CMD_TBL_BSP ZUMA_TBL_ENTRY | |
205 | ||
206 | #define ZUMA_TBL_ENTRY MK_CMD_TBL_ENTRY( \ | |
207 | "zinit", 5, 1, 0, do_zuma_init_pbb, \ | |
208 | "zinit - init zuma pbb\n", \ | |
209 | "\n" \ | |
210 | " - init zuma pbb\n" \ | |
211 | ), MK_CMD_TBL_ENTRY( \ | |
212 | "zdtest", 6, 3, 1, do_zuma_test_dma, \ | |
213 | "zdtest - run dma test\n", \ | |
214 | "[cmd [count]]\n" \ | |
215 | " - run dma cmd (w=0,v=1,cp=2,cmp=3,wi=4,vi=5), count bytes\n" \ | |
216 | ), MK_CMD_TBL_ENTRY( \ | |
217 | "zminit", 5, 1, 0, do_zuma_init_mbox, \ | |
218 | "zminit - init zuma mbox\n", \ | |
219 | "\n" \ | |
220 | " - init zuma mbox\n" \ | |
221 | ), | |
222 | ||
223 | int do_zuma_init_pbb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
224 | int do_zuma_test_dma (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
225 | int do_zuma_init_mbox (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
226 | ||
227 | void zuma_init_pbb(void); | |
228 | int zuma_mbox_init(void); | |
229 | int zuma_test_dma(int cmd, int size); | |
230 | #else | |
231 | #define CMD_TBL_BSP | |
232 | #endif /* ZUMA_NTL */ | |
233 | ||
234 | #endif /* CONFIG_EVB64260 */ | |
c7de829c | 235 | /* -------------------------------------------------------------------- */ |
c609719b | 236 | |
c7de829c | 237 | /* -----W7O------------------------------------------------------------ */ |
c609719b WD |
238 | #if defined(CONFIG_W7O) |
239 | ||
240 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
241 | "vpd", 3, 2, 1, do_vpd, \ | |
242 | "vpd - Read Vital Product Data\n", \ | |
243 | "[dev_addr]\n" \ | |
244 | " - Read VPD Data from default address, or device address 'dev_addr'.\n" \ | |
245 | ), | |
246 | ||
247 | extern int do_vpd (cmd_tbl_t *, int, int, char *[]); | |
248 | ||
249 | #endif /* CONFIG_W7O */ | |
c7de829c | 250 | /* -------------------------------------------------------------------- */ |
c609719b | 251 | |
c7de829c | 252 | /* ---- PCIPPC2 / PCIPPC6 --------------------------------------------- */ |
c609719b WD |
253 | #if defined(CONFIG_PCIPPC2) || defined(CONFIG_PCIPPC6) |
254 | #if defined(CONFIG_WATCHDOG) | |
255 | ||
256 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
c7de829c WD |
257 | "wd", 3, 2, 1, do_wd, \ |
258 | "wd - check and set watchdog\n", \ | |
259 | "on - switch watchDog on\n" \ | |
260 | "wd off - switch watchdog off\n" \ | |
261 | "wd - print current status\n" \ | |
c609719b WD |
262 | ), |
263 | ||
264 | extern int do_wd (cmd_tbl_t *, int, int, char *[]); | |
265 | ||
266 | #else | |
267 | #define CMD_TBL_BSP | |
268 | #endif /* CONFIG_WATCHDOG */ | |
269 | ||
270 | #endif /* CONFIG_PCIPPC2 , CONFIG_PCIPPC6 */ | |
c7de829c | 271 | /* -------------------------------------------------------------------- */ |
c609719b | 272 | |
c7de829c | 273 | /* ----- PN62 --------------------------------------------------------- */ |
c609719b WD |
274 | #if defined(CONFIG_PN62) |
275 | ||
276 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
277 | "loadpci", 5, 2, 1, do_loadpci, \ | |
278 | "loadpci - load binary file over PCI\n", \ | |
279 | "[addr]\n" \ | |
280 | " - load binary file over PCI to address 'addr'\n" \ | |
281 | ), MK_CMD_TBL_ENTRY( \ | |
282 | "led" , 3, 3, 1, do_led, \ | |
283 | "led - set LED 0..11 on the PN62 board\n", \ | |
284 | "i fun\n" \ | |
285 | " - set 'i'th LED to function 'fun'\n" \ | |
286 | ), | |
287 | ||
288 | extern int do_loadpci (cmd_tbl_t *, int, int, char *[]); | |
289 | extern int do_led (cmd_tbl_t *, int, int, char *[]); | |
290 | #endif /* CONFIG_PN62 */ | |
c7de829c | 291 | /* -------------------------------------------------------------------- */ |
c609719b | 292 | |
c7de829c | 293 | /* ----- TRAB --------------------------------------------------------- */ |
c609719b WD |
294 | #if defined(CONFIG_TRAB) |
295 | ||
c7de829c WD |
296 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ |
297 | "kbd", 3, 1, 1, do_kbd, \ | |
298 | "kbd - read keyboard status\n", \ | |
299 | NULL \ | |
c609719b WD |
300 | ), |
301 | ||
302 | int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
303 | ||
304 | #endif /* CONFIG_TRAB */ | |
c7de829c | 305 | /* -------------------------------------------------------------------- */ |
c609719b | 306 | |
c7de829c | 307 | /* ----- R360MPI ------------------------------------------------------ */ |
c609719b WD |
308 | #if defined(CONFIG_R360MPI) |
309 | ||
c7de829c WD |
310 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ |
311 | "kbd", 3, 1, 1, do_kbd, \ | |
312 | "kbd - read keyboard status\n", \ | |
313 | NULL \ | |
c609719b WD |
314 | ), |
315 | ||
316 | int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
317 | ||
318 | #endif /* CONFIG_R360MPI */ | |
c7de829c WD |
319 | /* -------------------------------------------------------------------- */ |
320 | ||
321 | /* ------ AMIGAONEG3SE ------------------------------------------------ */ | |
322 | #if defined(CONFIG_AMIGAONEG3SE) | |
323 | ||
324 | #define CMD_TBL_BSP /* dummy */ | |
325 | ||
326 | #endif /* AmigaOneG3SE */ | |
a02ab7d1 SR |
327 | /* ----- PCI405 ------------------------------------------------------- */ |
328 | #if defined(CONFIG_PCI405) | |
329 | ||
330 | #define CMD_TBL_BSP MK_CMD_TBL_ENTRY( \ | |
331 | "loadpci", 7, 1, 1, do_loadpci, \ | |
332 | "loadpci - wait for sync and boot image\n", \ | |
333 | NULL \ | |
334 | ), | |
335 | ||
336 | int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
337 | ||
338 | #endif /* CONFIG_PCI405 */ | |
c7de829c WD |
339 | /* -------------------------------------------------------------------- */ |
340 | ||
341 | #else | |
342 | #define CMD_TBL_BSP | |
343 | #endif /* CFG_CMD_BSP */ | |
c609719b WD |
344 | |
345 | #endif /* _CMD_BSP_H_ */ |