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