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