wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 6 | * |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 7 | * hacked for Hymod FPGA support by Murray.Jensen@csiro.au, 29-Jan-01 |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <command.h> |
| 12 | #include <net.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 13 | #include <asm/iopin_8260.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 14 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 15 | DECLARE_GLOBAL_DATA_PTR; |
| 16 | |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 17 | /*----------------------------------------------------------------------- |
| 18 | * Board Special Commands: FPGA load/store, EEPROM erase |
| 19 | */ |
| 20 | |
Jon Loeliger | c508a4c | 2007-07-09 18:31:28 -0500 | [diff] [blame] | 21 | #if defined(CONFIG_CMD_BSP) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 22 | |
| 23 | #define LOAD_SUCCESS 0 |
| 24 | #define LOAD_FAIL_NOCONF 1 |
| 25 | #define LOAD_FAIL_NOINIT 2 |
| 26 | #define LOAD_FAIL_NODONE 3 |
| 27 | |
| 28 | #define STORE_SUCCESS 0 |
| 29 | |
| 30 | /* |
| 31 | * Programming the Hymod FPGAs |
| 32 | * |
| 33 | * The 8260 io port config table is set up so that the INIT pin is |
| 34 | * held Low (Open Drain output 0) - this will delay the automatic |
| 35 | * Power-On config until INIT is released (by making it an input). |
| 36 | * |
| 37 | * If the FPGA has been programmed before, then the assertion of PROGRAM |
| 38 | * will initiate configuration (i.e. it begins clearing the RAM). |
| 39 | * |
| 40 | * When the FPGA is ready to receive configuration data (either after |
| 41 | * releasing INIT after Power-On, or after asserting PROGRAM), it will |
| 42 | * pull INIT high. |
| 43 | * |
| 44 | * Notes from Paul Dunn: |
| 45 | * |
| 46 | * 1. program pin should be forced low for >= 300ns |
| 47 | * (about 20 bus clock cycles minimum). |
| 48 | * |
| 49 | * 2. then wait for init to go high, which signals |
| 50 | * that the FPGA has cleared its internal memory |
| 51 | * and is ready to load |
| 52 | * |
| 53 | * 3. perform load writes of entire config file |
| 54 | * |
| 55 | * 4. wait for done to go high, which should be |
| 56 | * within a few bus clock cycles. If done has not |
| 57 | * gone high after reasonable period, then load |
| 58 | * has not worked (wait several ms?) |
| 59 | */ |
| 60 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 61 | int |
Wolfgang Denk | e6a857d | 2011-07-30 13:33:49 +0000 | [diff] [blame] | 62 | fpga_load(int mezz, const uchar *addr, ulong size) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 63 | { |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 64 | hymod_conf_t *cp = &gd->bd->bi_hymod_conf; |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 65 | xlx_info_t *fp; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 66 | xlx_iopins_t *fpgaio; |
| 67 | volatile uchar *fpgabase; |
| 68 | volatile uint cnt; |
Wolfgang Denk | e6a857d | 2011-07-30 13:33:49 +0000 | [diff] [blame] | 69 | const uchar *eaddr = addr + size; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 70 | int result; |
| 71 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 72 | if (mezz) |
| 73 | fp = &cp->mezz.xlx[0]; |
| 74 | else |
| 75 | fp = &cp->main.xlx[0]; |
| 76 | |
| 77 | if (!fp->mmap.prog.exists) |
| 78 | return (LOAD_FAIL_NOCONF); |
| 79 | |
| 80 | fpgabase = (uchar *)fp->mmap.prog.base; |
| 81 | fpgaio = &fp->iopins; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 82 | |
| 83 | /* set enable HIGH if required */ |
| 84 | if (fpgaio->enable_pin.flag) |
| 85 | iopin_set_high (&fpgaio->enable_pin); |
| 86 | |
| 87 | /* ensure INIT is released (set it to be an input) */ |
| 88 | iopin_set_in (&fpgaio->init_pin); |
| 89 | |
| 90 | /* toggle PROG Low then High (will already be Low after Power-On) */ |
| 91 | iopin_set_low (&fpgaio->prog_pin); |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 92 | udelay (1); /* minimum 300ns - 1usec should do it */ |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 93 | iopin_set_high (&fpgaio->prog_pin); |
| 94 | |
| 95 | /* wait for INIT High */ |
| 96 | cnt = 0; |
| 97 | while (!iopin_is_high (&fpgaio->init_pin)) |
| 98 | if (++cnt == 10000000) { |
| 99 | result = LOAD_FAIL_NOINIT; |
| 100 | goto done; |
| 101 | } |
| 102 | |
| 103 | /* write configuration data */ |
| 104 | while (addr < eaddr) |
| 105 | *fpgabase = *addr++; |
| 106 | |
| 107 | /* wait for DONE High */ |
| 108 | cnt = 0; |
| 109 | while (!iopin_is_high (&fpgaio->done_pin)) |
| 110 | if (++cnt == 100000000) { |
| 111 | result = LOAD_FAIL_NODONE; |
| 112 | goto done; |
| 113 | } |
| 114 | |
| 115 | /* success */ |
| 116 | result = LOAD_SUCCESS; |
| 117 | |
| 118 | done: |
| 119 | |
| 120 | if (fpgaio->enable_pin.flag) |
| 121 | iopin_set_low (&fpgaio->enable_pin); |
| 122 | |
| 123 | return (result); |
| 124 | } |
| 125 | |
| 126 | /* ------------------------------------------------------------------------- */ |
| 127 | int |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 128 | do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 129 | { |
| 130 | uchar *addr, *save_addr; |
| 131 | ulong size; |
| 132 | int mezz, arg, result; |
| 133 | |
| 134 | switch (argc) { |
| 135 | |
| 136 | case 0: |
| 137 | case 1: |
| 138 | break; |
| 139 | |
| 140 | case 2: |
| 141 | if (strcmp (argv[1], "info") == 0) { |
| 142 | printf ("\nHymod FPGA Info...\n"); |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 143 | printf ("\t\t\t\tAddress\t\tSize\n"); |
| 144 | printf ("\tMain Configuration:\t0x%08x\t%d\n", |
| 145 | FPGA_MAIN_CFG_BASE, FPGA_MAIN_CFG_SIZE); |
| 146 | printf ("\tMain Register:\t\t0x%08x\t%d\n", |
| 147 | FPGA_MAIN_REG_BASE, FPGA_MAIN_REG_SIZE); |
| 148 | printf ("\tMain Port:\t\t0x%08x\t%d\n", |
| 149 | FPGA_MAIN_PORT_BASE, FPGA_MAIN_PORT_SIZE); |
| 150 | printf ("\tMezz Configuration:\t0x%08x\t%d\n", |
| 151 | FPGA_MEZZ_CFG_BASE, FPGA_MEZZ_CFG_SIZE); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 152 | return 0; |
| 153 | } |
| 154 | break; |
| 155 | |
| 156 | case 3: |
| 157 | if (strcmp (argv[1], "store") == 0) { |
| 158 | addr = (uchar *) simple_strtoul (argv[2], NULL, 16); |
| 159 | |
| 160 | save_addr = addr; |
| 161 | #if 0 |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 162 | /* fpga readback unimplemented */ |
| 163 | while (more readback data) |
| 164 | *addr++ = *fpga; |
| 165 | result = error ? STORE_FAIL_XXX : STORE_SUCCESS; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 166 | #else |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 167 | result = STORE_SUCCESS; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 168 | #endif |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 169 | |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 170 | if (result == STORE_SUCCESS) { |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 171 | printf ("SUCCEEDED (%d bytes)\n", |
| 172 | addr - save_addr); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 173 | return 0; |
| 174 | } else |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 175 | printf ("FAILED (%d bytes)\n", |
| 176 | addr - save_addr); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 177 | return 1; |
| 178 | } |
| 179 | break; |
| 180 | |
| 181 | case 4: |
| 182 | if (strcmp (argv[1], "tftp") == 0) { |
| 183 | copy_filename (BootFile, argv[2], sizeof (BootFile)); |
| 184 | load_addr = simple_strtoul (argv[3], NULL, 16); |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 185 | NetBootFileXferSize = 0; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 186 | |
Simon Glass | e4bf0c5 | 2011-10-24 18:00:02 +0000 | [diff] [blame] | 187 | if (NetLoop(TFTPGET) <= 0) { |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 188 | printf ("tftp transfer failed - aborting " |
| 189 | "fgpa load\n"); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 190 | return 1; |
| 191 | } |
| 192 | |
| 193 | if (NetBootFileXferSize == 0) { |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 194 | printf ("can't determine file size - " |
| 195 | "aborting fpga load\n"); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 196 | return 1; |
| 197 | } |
| 198 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 199 | printf ("File transfer succeeded - " |
| 200 | "beginning fpga load..."); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 201 | |
| 202 | result = fpga_load (0, (uchar *) load_addr, |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 203 | NetBootFileXferSize); |
| 204 | |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 205 | if (result == LOAD_SUCCESS) { |
| 206 | printf ("SUCCEEDED\n"); |
| 207 | return 0; |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 208 | } else if (result == LOAD_FAIL_NOCONF) |
| 209 | printf ("FAILED (no CONF)\n"); |
| 210 | else if (result == LOAD_FAIL_NOINIT) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 211 | printf ("FAILED (no INIT)\n"); |
| 212 | else |
| 213 | printf ("FAILED (no DONE)\n"); |
| 214 | return 1; |
| 215 | |
| 216 | } |
| 217 | /* fall through ... */ |
| 218 | |
| 219 | case 5: |
| 220 | if (strcmp (argv[1], "load") == 0) { |
| 221 | if (argc == 5) { |
| 222 | if (strcmp (argv[2], "main") == 0) |
| 223 | mezz = 0; |
| 224 | else if (strcmp (argv[2], "mezz") == 0) |
| 225 | mezz = 1; |
| 226 | else { |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 227 | printf ("FPGA type must be either " |
| 228 | "`main' or `mezz'\n"); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 229 | return 1; |
| 230 | } |
| 231 | arg = 3; |
| 232 | } else { |
| 233 | mezz = 0; |
| 234 | arg = 2; |
| 235 | } |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 236 | |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 237 | addr = (uchar *) simple_strtoul (argv[arg++], NULL, 16); |
| 238 | size = (ulong) simple_strtoul (argv[arg], NULL, 16); |
| 239 | |
| 240 | result = fpga_load (mezz, addr, size); |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 241 | |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 242 | if (result == LOAD_SUCCESS) { |
| 243 | printf ("SUCCEEDED\n"); |
| 244 | return 0; |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 245 | } else if (result == LOAD_FAIL_NOCONF) |
| 246 | printf ("FAILED (no CONF)\n"); |
| 247 | else if (result == LOAD_FAIL_NOINIT) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 248 | printf ("FAILED (no INIT)\n"); |
| 249 | else |
| 250 | printf ("FAILED (no DONE)\n"); |
| 251 | return 1; |
| 252 | } |
| 253 | break; |
| 254 | |
| 255 | default: |
| 256 | break; |
| 257 | } |
| 258 | |
Wolfgang Denk | 47e26b1 | 2010-07-17 01:06:04 +0200 | [diff] [blame] | 259 | return cmd_usage(cmdtp); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 260 | } |
wdenk | 0d49839 | 2003-07-01 21:06:45 +0000 | [diff] [blame] | 261 | U_BOOT_CMD( |
| 262 | fpga, 6, 1, do_fpga, |
Peter Tyser | 2fb2604 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 263 | "FPGA sub-system", |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 264 | "load [type] addr size\n" |
| 265 | " - write the configuration data at memory address `addr',\n" |
| 266 | " size `size' bytes, into the FPGA of type `type' (either\n" |
| 267 | " `main' or `mezz', default `main'). e.g.\n" |
| 268 | " `fpga load 100000 7d8f'\n" |
| 269 | " loads the main FPGA with config data at address 100000\n" |
| 270 | " HEX, size 7d8f HEX (32143 DEC) bytes\n" |
| 271 | "fpga tftp file addr\n" |
| 272 | " - transfers `file' from the tftp server into memory at\n" |
| 273 | " address `addr', then writes the entire file contents\n" |
| 274 | " into the main FPGA\n" |
| 275 | "fpga store addr\n" |
| 276 | " - read configuration data from the main FPGA (the mezz\n" |
| 277 | " FPGA is write-only), into address `addr'. There must be\n" |
| 278 | " enough memory available at `addr' to hold all the config\n" |
| 279 | " data - the size of which is determined by VC:???\n" |
| 280 | "fpga info\n" |
| 281 | " - print information about the Hymod FPGA, namely the\n" |
| 282 | " memory addresses at which the four FPGA local bus\n" |
Wolfgang Denk | a89c33d | 2009-05-24 17:06:54 +0200 | [diff] [blame] | 283 | " address spaces appear in the physical address space" |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 284 | ); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 285 | /* ------------------------------------------------------------------------- */ |
| 286 | int |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 287 | do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 288 | { |
| 289 | uchar data[HYMOD_EEPROM_SIZE]; |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 290 | uint addr = CONFIG_SYS_I2C_EEPROM_ADDR; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 291 | |
| 292 | switch (argc) { |
| 293 | |
| 294 | case 1: |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 295 | addr |= HYMOD_EEOFF_MAIN; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 296 | break; |
| 297 | |
| 298 | case 2: |
| 299 | if (strcmp (argv[1], "main") == 0) { |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 300 | addr |= HYMOD_EEOFF_MAIN; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 301 | break; |
| 302 | } |
| 303 | if (strcmp (argv[1], "mezz") == 0) { |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 304 | addr |= HYMOD_EEOFF_MEZZ; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 305 | break; |
| 306 | } |
| 307 | /* fall through ... */ |
| 308 | |
| 309 | default: |
Wolfgang Denk | 47e26b1 | 2010-07-17 01:06:04 +0200 | [diff] [blame] | 310 | return cmd_usage(cmdtp); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | memset (data, 0, HYMOD_EEPROM_SIZE); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 314 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 315 | eeprom_write (addr, 0, data, HYMOD_EEPROM_SIZE); |
| 316 | |
| 317 | return 0; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 318 | } |
wdenk | 0d49839 | 2003-07-01 21:06:45 +0000 | [diff] [blame] | 319 | U_BOOT_CMD( |
| 320 | eeclear, 1, 0, do_eecl, |
Peter Tyser | 2fb2604 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 321 | "Clear the eeprom on a Hymod board", |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 322 | "[type]\n" |
| 323 | " - write zeroes into the EEPROM on the board of type `type'\n" |
| 324 | " (`type' is either `main' or `mezz' - default `main')\n" |
Wolfgang Denk | a89c33d | 2009-05-24 17:06:54 +0200 | [diff] [blame] | 325 | " Note: the EEPROM write enable jumper must be installed" |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 326 | ); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 327 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 328 | /* ------------------------------------------------------------------------- */ |
| 329 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 330 | int |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 331 | do_htest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 332 | { |
| 333 | #if 0 |
| 334 | int rc; |
| 335 | #endif |
| 336 | #ifdef CONFIG_ETHER_LOOPBACK_TEST |
| 337 | extern void eth_loopback_test (void); |
| 338 | #endif /* CONFIG_ETHER_LOOPBACK_TEST */ |
| 339 | |
| 340 | printf ("HYMOD tests - ensure loopbacks etc. are connected\n\n"); |
| 341 | |
| 342 | #if 0 |
| 343 | /* Load FPGA with test program */ |
| 344 | |
| 345 | printf ("Loading test FPGA program ..."); |
| 346 | |
| 347 | rc = fpga_load (0, test_bitfile, sizeof (test_bitfile)); |
| 348 | |
| 349 | switch (rc) { |
| 350 | |
| 351 | case LOAD_SUCCESS: |
| 352 | printf (" SUCCEEDED\n"); |
| 353 | break; |
| 354 | |
| 355 | case LOAD_FAIL_NOCONF: |
| 356 | printf (" FAILED (no configuration space defined)\n"); |
| 357 | return 1; |
| 358 | |
| 359 | case LOAD_FAIL_NOINIT: |
| 360 | printf (" FAILED (timeout - no INIT signal seen)\n"); |
| 361 | return 1; |
| 362 | |
| 363 | case LOAD_FAIL_NODONE: |
| 364 | printf (" FAILED (timeout - no DONE signal seen)\n"); |
| 365 | return 1; |
| 366 | |
| 367 | default: |
| 368 | printf (" FAILED (unknown return code from fpga_load\n"); |
| 369 | return 1; |
| 370 | } |
| 371 | |
| 372 | /* run Local Bus <=> Xilinx tests */ |
| 373 | |
| 374 | /* tell Xilinx to run ZBT Ram, High Speed serial and Mezzanine tests */ |
| 375 | |
| 376 | /* run SDRAM test */ |
| 377 | #endif |
| 378 | |
| 379 | #ifdef CONFIG_ETHER_LOOPBACK_TEST |
| 380 | /* run Ethernet test */ |
| 381 | eth_loopback_test (); |
| 382 | #endif /* CONFIG_ETHER_LOOPBACK_TEST */ |
| 383 | |
| 384 | return 0; |
| 385 | } |
| 386 | |
Jon Loeliger | 77a3185 | 2007-07-10 10:39:10 -0500 | [diff] [blame] | 387 | #endif |