2 * (C) Copyright 2004, Li-Pro.Net <www.li-pro.net>
5 * See file CREDITS for list of people who contributed to this
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.
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.
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,
27 /***********************************************************************
28 * Include the whole NIOS CPU configuration.
30 * !!! HAVE TO BE HERE !!! DON'T MOVE THIS PART !!!
32 ***********************************************************************/
34 #if defined(CONFIG_NIOS_BASE_32)
35 #include <configs/ADNPESC1_base_32.h>
37 #error *** CFG_ERROR: you have to setup right NIOS CPU configuration
40 /*------------------------------------------------------------------------
41 * BOARD/CPU -- TOP-LEVEL
42 *----------------------------------------------------------------------*/
43 #define CONFIG_NIOS 1 /* NIOS-32 core */
44 #define CONFIG_ADNPESC1 1 /* SSV ADNP/ESC1 board */
45 #define CONFIG_SYS_CLK_FREQ CFG_NIOS_CPU_CLK/* 50 MHz core clock */
46 #define CFG_HZ 1000 /* 1 msec time tick */
48 #define CONFIG_BOARD_EARLY_INIT_F 1 /* enable early board-spec. init*/
50 /*------------------------------------------------------------------------
51 * BASE ADDRESSES / SIZE (Flash, SRAM, SDRAM)
52 *----------------------------------------------------------------------*/
53 #if (CFG_NIOS_CPU_SDRAM_SIZE != 0)
55 #define CFG_SDRAM_BASE CFG_NIOS_CPU_SDRAM_BASE
56 #define CFG_SDRAM_SIZE CFG_NIOS_CPU_SDRAM_SIZE
59 #error *** CFG_ERROR: you have to setup any SDRAM in NIOS CPU config
62 #if defined(CFG_NIOS_CPU_SRAM_BASE) && defined(CFG_NIOS_CPU_SRAM_SIZE)
64 #define CFG_SRAM_BASE CFG_NIOS_CPU_SRAM_BASE
65 #define CFG_SRAM_SIZE CFG_NIOS_CPU_SRAM_SIZE
74 #define CFG_VECT_BASE CFG_NIOS_CPU_VEC_BASE
76 /*------------------------------------------------------------------------
77 * MEMORY ORGANIZATION - For the most part, you can put things pretty
78 * much anywhere. This is pretty flexible for Nios. So here we make some
79 * arbitrary choices & assume that the monitor is placed at the end of
80 * a memory resource (so you must make sure TEXT_BASE is chosen
81 * appropriately -- this is very important if you plan to move your
82 * memory to another place as configured at this time !!!).
84 * -The heap is placed below the monitor.
85 * -Global data is placed below the heap.
86 * -The stack is placed below global data (&grows down).
87 *----------------------------------------------------------------------*/
88 #define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256k */
89 #define CFG_GBL_DATA_SIZE 128 /* Global data size rsvd*/
90 #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
92 #define CFG_MONITOR_BASE TEXT_BASE
93 #define CFG_MALLOC_BASE (CFG_MONITOR_BASE - CFG_MALLOC_LEN)
94 #define CFG_GBL_DATA_OFFSET (CFG_MALLOC_BASE - CFG_GBL_DATA_SIZE)
95 #define CFG_INIT_SP CFG_GBL_DATA_OFFSET
97 /*------------------------------------------------------------------------
99 *----------------------------------------------------------------------*/
100 #if (CFG_NIOS_CPU_FLASH_SIZE != 0)
102 #define CFG_FLASH_BASE CFG_NIOS_CPU_FLASH_BASE
103 #define CFG_FLASH_SIZE CFG_NIOS_CPU_FLASH_SIZE
104 #define CFG_MAX_FLASH_SECT 128 /* Max # sects per bank */
105 #define CFG_MAX_FLASH_BANKS 1 /* Max # of flash banks */
106 #define CFG_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */
107 #define CFG_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */
108 #define CFG_FLASH_WORD_SIZE unsigned short /* flash word size */
111 #error *** CFG_ERROR: you have to setup any Flash memory in NIOS CPU config
114 /*------------------------------------------------------------------------
116 *----------------------------------------------------------------------*/
117 #if (CFG_NIOS_CPU_FLASH_SIZE != 0)
119 #define CFG_ENV_IS_IN_FLASH 1 /* Environment in flash */
121 /* Mem addr of environment */
122 #if defined(CONFIG_NIOS_BASE_32)
123 #define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN)
125 #error *** CFG_ERROR: you have to setup the environment base address CFG_ENV_ADDR
128 #define CFG_ENV_SIZE (64 * 1024) /* 64 KByte (1 sector) */
129 #define CONFIG_ENV_OVERWRITE /* Serial/eth change Ok */
132 #define CFG_ENV_IS_NOWHERE 1 /* NO Environment */
135 /*------------------------------------------------------------------------
136 * NIOS APPLICATION CODE BASE AREA
137 *----------------------------------------------------------------------*/
138 #if ((CFG_ENV_ADDR + CFG_ENV_SIZE) == 0x1050000)
139 #define CFG_ADNPESC1_UPDATE_LOAD_ADDR "0x2000100"
140 #define CFG_ADNPESC1_NIOS_APPL_ENTRY "0x1050000"
141 #define CFG_ADNPESC1_NIOS_APPL_IDENT "0x105000c"
142 #define CFG_ADNPESC1_NIOS_APPL_END "0x11fffff"
143 #define CFG_ADNPESC1_FILESYSTEM_BASE "0x1200000"
144 #define CFG_ADNPESC1_FILESYSTEM_END "0x17fffff"
146 #error *** CFG_ERROR: missing right appl.code base configuration, expand your config.h
148 #define CFG_ADNPESC1_NIOS_IDENTIFIER "Nios"
150 /*------------------------------------------------------------------------
152 *----------------------------------------------------------------------*/
153 #ifdef CONFIG_DNPEVA2 /* DNP/EVA2 base board */
154 #define CFG_ADNPESC1_SLED_BOOT_OFF "sled boot off; "
155 #define CFG_ADNPESC1_SLED_RED_BLINK "sled red blink; "
157 #define CFG_ADNPESC1_SLED_BOOT_OFF
158 #define CFG_ADNPESC1_SLED_RED_BLINK
161 #define CONFIG_BOOTDELAY 5
162 #define CONFIG_BOOTCOMMAND \
163 "if itest.s *$appl_ident_addr == \"$appl_ident_str\"; " \
166 CFG_ADNPESC1_SLED_BOOT_OFF \
167 "go $appl_entry_addr; " \
169 CFG_ADNPESC1_SLED_RED_BLINK \
170 "echo *** missing \"$appl_ident_str\" at $appl_ident_addr; "\
171 "echo *** invalid application at $appl_entry_addr; " \
172 "echo *** stop bootup...; " \
175 /*------------------------------------------------------------------------
177 *----------------------------------------------------------------------*/
178 #ifdef CONFIG_DNPEVA2 /* DNP/EVA2 base board */
179 #define CFG_ADNPESC1_SLED_YELLO_ON "sled yellow on; "
180 #define CFG_ADNPESC1_SLED_YELLO_OFF "sled yellow off; "
182 #define CFG_ADNPESC1_SLED_YELLO_ON
183 #define CFG_ADNPESC1_SLED_YELLO_OFF
186 #define CONFIG_EXTRA_ENV_SETTINGS \
187 "update_allowed=0\0" \
188 "update_load_addr=" CFG_ADNPESC1_UPDATE_LOAD_ADDR "\0" \
189 "appl_entry_addr=" CFG_ADNPESC1_NIOS_APPL_ENTRY "\0" \
190 "appl_end_addr=" CFG_ADNPESC1_NIOS_APPL_END "\0" \
191 "appl_ident_addr=" CFG_ADNPESC1_NIOS_APPL_IDENT "\0" \
192 "appl_ident_str=" CFG_ADNPESC1_NIOS_IDENTIFIER "\0" \
193 "appl_name=ADNPESC1/base32/linux.bin\0" \
195 "if itest.b $update_allowed != 0; " \
197 CFG_ADNPESC1_SLED_YELLO_ON \
198 "tftp $update_load_addr $appl_name; " \
199 "protect off $appl_entry_addr $appl_end_addr; " \
200 "era $appl_entry_addr $appl_end_addr; " \
201 "cp.b $update_load_addr $appl_entry_addr $filesize; "\
202 CFG_ADNPESC1_SLED_YELLO_OFF \
204 "echo *** update not allowed (update_allowed=$update_allowed); "\
206 "fs_base_addr=" CFG_ADNPESC1_FILESYSTEM_BASE "\0" \
207 "fs_end_addr=" CFG_ADNPESC1_FILESYSTEM_END "\0" \
208 "fs_name=ADNPESC1/base32/romfs.img\0" \
210 "if itest.b $update_allowed != 0; " \
212 CFG_ADNPESC1_SLED_YELLO_ON \
213 "tftp $update_load_addr $fs_name; " \
214 "protect off $fs_base_addr $fs_end_addr; " \
215 "era $fs_base_addr $fs_end_addr; " \
216 "cp.b $update_load_addr $fs_base_addr $filesize; "\
217 CFG_ADNPESC1_SLED_YELLO_OFF \
219 "echo *** update not allowed (update_allowed=$update_allowed); "\
221 "uboot_name=ADNPESC1/base32/u-boot.bin\0" \
223 "if ping $serverip; " \
225 CFG_ADNPESC1_SLED_YELLO_ON \
226 "tftp $update_load_addr $uboot_name; " \
228 "go $update_load_addr; " \
230 "echo *** missing connection to $serverip; " \
231 "echo *** check your network and try again...; "\
234 /*------------------------------------------------------------------------
236 *----------------------------------------------------------------------*/
237 #if (CFG_NIOS_CPU_UART_NUMS != 0)
239 #define CFG_NIOS_CONSOLE CFG_NIOS_CPU_UART0 /* 1st UART is Cons. */
241 #if (CFG_NIOS_CPU_UART0_BR != 0)
242 #define CFG_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */
243 #define CONFIG_BAUDRATE CFG_NIOS_CPU_UART0_BR
245 #undef CFG_NIOS_FIXEDBAUD
246 #define CONFIG_BAUDRATE 115200
249 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
252 #error *** CFG_ERROR: you have to setup at least one UART in NIOS CPU config
255 /*------------------------------------------------------------------------
256 * TIMER FOR TIMEBASE -- Nios doesn't have the equivalent of ppc PIT,
257 * so an avalon bus timer is required.
258 *----------------------------------------------------------------------*/
259 #if (CFG_NIOS_CPU_TIMER_NUMS != 0) && defined(CFG_NIOS_CPU_TICK_TIMER)
261 #if (CFG_NIOS_CPU_TICK_TIMER == 0)
263 #define CFG_NIOS_TMRBASE CFG_NIOS_CPU_TIMER0 /* TIMER0 as tick */
264 #define CFG_NIOS_TMRIRQ CFG_NIOS_CPU_TIMER0_IRQ
266 #if (CFG_NIOS_CPU_TIMER0_FP == 1) /* fixed period */
268 #if (CFG_NIOS_CPU_TIMER0_PER >= CFG_HZ)
269 #define CFG_NIOS_TMRMS (CFG_NIOS_CPU_TIMER0_PER / CFG_HZ)
271 #error *** CFG_ERROR: you have to use a timer periode greater than CFG_HZ
274 #undef CFG_NIOS_TMRCNT /* no preloadable counter value */
276 #elif (CFG_NIOS_CPU_TIMER0_FP == 0) /* variable period */
279 #define CFG_NIOS_TMRMS (1000 / CFG_HZ)
281 #error *** CFG_ERROR: sorry, CFG_HZ have to be less than 1000
284 #define CFG_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CFG_HZ)
287 #error *** CFG_ERROR: you have to define CFG_NIOS_CPU_TIMER0_FP correct
290 #elif (CFG_NIOS_CPU_TICK_TIMER == 1)
292 #define CFG_NIOS_TMRBASE CFG_NIOS_CPU_TIMER1 /* TIMER1 as tick */
293 #define CFG_NIOS_TMRIRQ CFG_NIOS_CPU_TIMER1_IRQ
295 #if (CFG_NIOS_CPU_TIMER1_FP == 1) /* fixed period */
297 #if (CFG_NIOS_CPU_TIMER1_PER >= CFG_HZ)
298 #define CFG_NIOS_TMRMS (CFG_NIOS_CPU_TIMER1_PER / CFG_HZ)
300 #error *** CFG_ERROR: you have to use a timer periode greater than CFG_HZ
303 #undef CFG_NIOS_TMRCNT /* no preloadable counter value */
305 #elif (CFG_NIOS_CPU_TIMER1_FP == 0) /* variable period */
308 #define CFG_NIOS_TMRMS (1000 / CFG_HZ)
310 #error *** CFG_ERROR: sorry, CFG_HZ have to be less than 1000
313 #define CFG_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CFG_HZ)
316 #error *** CFG_ERROR: you have to define CFG_NIOS_CPU_TIMER1_FP correct
319 #endif /* CFG_NIOS_CPU_TICK_TIMER */
322 #error *** CFG_ERROR: you have to setup at least one TIMER in NIOS CPU config
325 /*------------------------------------------------------------------------
326 * WATCHDOG (or better MAX823 supervisory circuite access)
327 *----------------------------------------------------------------------*/
328 #define CONFIG_HW_WATCHDOG 1 /* board specific WD */
330 #ifdef CONFIG_HW_WATCHDOG
332 /* MAX823 supervisor -- watchdog enable port at: */
333 #if (CFG_NIOS_CPU_WDENA_PIO == 0)
334 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO0 /* PIO0 */
335 #elif (CFG_NIOS_CPU_WDENA_PIO == 1)
336 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO1 /* PIO1 */
337 #elif (CFG_NIOS_CPU_WDENA_PIO == 2)
338 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO2 /* PIO2 */
339 #elif (CFG_NIOS_CPU_WDENA_PIO == 3)
340 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO3 /* PIO3 */
341 #elif (CFG_NIOS_CPU_WDENA_PIO == 4)
342 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO4 /* PIO4 */
343 #elif (CFG_NIOS_CPU_WDENA_PIO == 5)
344 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO5 /* PIO5 */
345 #elif (CFG_NIOS_CPU_WDENA_PIO == 6)
346 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO6 /* PIO6 */
347 #elif (CFG_NIOS_CPU_WDENA_PIO == 7)
348 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO7 /* PIO7 */
349 #elif (CFG_NIOS_CPU_WDENA_PIO == 8)
350 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO8 /* PIO8 */
351 #elif (CFG_NIOS_CPU_WDENA_PIO == 9)
352 #define CONFIG_HW_WDENA_BASE CFG_NIOS_CPU_PIO9 /* PIO9 */
354 #error *** CFG_ERROR: you have to setup at least one WDENA_PIO in NIOS CPU config
357 /* MAX823 supervisor -- watchdog trigger port at: */
358 #if (CFG_NIOS_CPU_WDTOG_PIO == 0)
359 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO0 /* PIO0 */
360 #elif (CFG_NIOS_CPU_WDTOG_PIO == 1)
361 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO1 /* PIO1 */
362 #elif (CFG_NIOS_CPU_WDTOG_PIO == 2)
363 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO2 /* PIO2 */
364 #elif (CFG_NIOS_CPU_WDTOG_PIO == 3)
365 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO3 /* PIO3 */
366 #elif (CFG_NIOS_CPU_WDTOG_PIO == 4)
367 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO4 /* PIO4 */
368 #elif (CFG_NIOS_CPU_WDTOG_PIO == 5)
369 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO5 /* PIO5 */
370 #elif (CFG_NIOS_CPU_WDTOG_PIO == 6)
371 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO6 /* PIO6 */
372 #elif (CFG_NIOS_CPU_WDTOG_PIO == 7)
373 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO7 /* PIO7 */
374 #elif (CFG_NIOS_CPU_WDTOG_PIO == 8)
375 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO8 /* PIO8 */
376 #elif (CFG_NIOS_CPU_WDTOG_PIO == 9)
377 #define CONFIG_HW_WDTOG_BASE CFG_NIOS_CPU_PIO9 /* PIO9 */
379 #error *** CFG_ERROR: you have to setup at least one WDTOG_PIO in NIOS CPU config
382 #if defined(CONFIG_NIOS_BASE_32) /* NIOS CPU specifics */
383 #define CONFIG_HW_WDENA_BIT 0 /* WD enable @ Bit 0 */
384 #define CONFIG_HW_WDTOG_BIT 0 /* WD trigger @ Bit 0 */
385 #define CONFIG_HW_WDPORT_WRONLY 1 /* each WD port wr/only*/
387 #error *** CFG_ERROR: missing watchdog bit configuration, expand your config.h
390 #endif /* CONFIG_HW_WATCHDOG */
392 /*------------------------------------------------------------------------
393 * SERIAL PERIPHAREL INTERFACE
394 *----------------------------------------------------------------------*/
395 #if (CFG_NIOS_CPU_SPI_NUMS == 1)
397 #define CONFIG_NIOS_SPI 1 /* SPI support active */
398 #define CFG_NIOS_SPIBASE CFG_NIOS_CPU_SPI0
399 #define CFG_NIOS_SPIBITS CFG_NIOS_CPU_SPI0_BITS
401 #define CONFIG_RTC_DS1306 1 /* Dallas 1306 real time clock */
402 #define CFG_SPI_RTC_DEVID 0 /* as 1st SPI device */
404 #define __SPI_CMD_OFF 0 /* allow default commands: */
409 #undef CONFIG_NIOS_SPI /* NO SPI support */
410 #define __SPI_CMD_OFF ( CFG_CMD_SPI \
415 /*------------------------------------------------------------------------
416 * Ethernet -- needs work!
417 *----------------------------------------------------------------------*/
418 #if (CFG_NIOS_CPU_LAN_NUMS == 1)
420 #if (CFG_NIOS_CPU_LAN0_TYPE == 0) /* LAN91C111 */
422 #define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
423 #undef CONFIG_SMC91111_EXT_PHY /* Internal PHY */
424 #define CONFIG_SMC91111_BASE (CFG_NIOS_CPU_LAN0_BASE + CFG_NIOS_CPU_LAN0_OFFS)
426 #if (CFG_NIOS_CPU_LAN0_BUSW == 32)
427 #define CONFIG_SMC_USE_32_BIT 1
429 #undef CONFIG_SMC_USE_32_BIT
432 #elif (CFG_NIOS_CPU_LAN0_TYPE == 1) /* CS8900A */
434 /********************************************/
435 /* !!! CS8900 is __not__ tested on NIOS !!! */
436 /********************************************/
437 #define CONFIG_DRIVER_CS8900 /* Using CS8900 */
438 #define CS8900_BASE (CFG_NIOS_CPU_LAN0_BASE + CFG_NIOS_CPU_LAN0_OFFS)
440 #if (CFG_NIOS_CPU_LAN0_BUSW == 32)
442 #define CS8900_BUS32 1
444 #define CS8900_BUS16 1
449 #error *** CFG_ERROR: invalid LAN0 chip type, check your NIOS CPU config
452 #define CONFIG_ETHADDR 02:80:ae:20:60:6f
453 #define CONFIG_NETMASK 255.255.255.248
454 #define CONFIG_IPADDR 192.168.161.84
455 #define CONFIG_SERVERIP 192.168.161.85
458 #error *** CFG_ERROR: you have to setup just one LAN only or expand your config.h
461 /*------------------------------------------------------------------------
463 *----------------------------------------------------------------------*/
464 #if (CFG_NIOS_CPU_PIO_NUMS != 0) && defined(CFG_NIOS_CPU_LED_PIO)
466 #if (CFG_NIOS_CPU_LED_PIO == 0)
468 #define STATUS_LED_BASE CFG_NIOS_CPU_PIO0
469 #define STATUS_LED_BITS CFG_NIOS_CPU_PIO0_BITS
470 #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
472 #if (CFG_NIOS_CPU_PIO0_TYPE == 1)
473 #define STATUS_LED_WRONLY 1
475 #undef STATUS_LED_WRONLY
478 #elif (CFG_NIOS_CPU_LED_PIO == 1)
480 #define STATUS_LED_BASE CFG_NIOS_CPU_PIO1
481 #define STATUS_LED_BITS CFG_NIOS_CPU_PIO1_BITS
482 #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
484 #if (CFG_NIOS_CPU_PIO1_TYPE == 1)
485 #define STATUS_LED_WRONLY 1
487 #undef STATUS_LED_WRONLY
490 #elif (CFG_NIOS_CPU_LED_PIO == 2)
492 #define STATUS_LED_BASE CFG_NIOS_CPU_PIO2
493 #define STATUS_LED_BITS CFG_NIOS_CPU_PIO2_BITS
494 #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
496 #if (CFG_NIOS_CPU_PIO2_TYPE == 1)
497 #define STATUS_LED_WRONLY 1
499 #undef STATUS_LED_WRONLY
502 #elif (CFG_NIOS_CPU_LED_PIO == 3)
504 #error *** CFG_ERROR: status LEDs at PIO3 not supported, expand your config.h
506 #elif (CFG_NIOS_CPU_LED_PIO == 4)
508 #error *** CFG_ERROR: status LEDs at PIO4 not supported, expand your config.h
510 #elif (CFG_NIOS_CPU_LED_PIO == 5)
512 #error *** CFG_ERROR: status LEDs at PIO5 not supported, expand your config.h
514 #elif (CFG_NIOS_CPU_LED_PIO == 6)
516 #error *** CFG_ERROR: status LEDs at PIO6 not supported, expand your config.h
518 #elif (CFG_NIOS_CPU_LED_PIO == 7)
520 #error *** CFG_ERROR: status LEDs at PIO7 not supported, expand your config.h
522 #elif (CFG_NIOS_CPU_LED_PIO == 8)
524 #error *** CFG_ERROR: status LEDs at PIO8 not supported, expand your config.h
526 #elif (CFG_NIOS_CPU_LED_PIO == 9)
528 #error *** CFG_ERROR: status LEDs at PIO9 not supported, expand your config.h
531 #error *** CFG_ERROR: you have to set CFG_NIOS_CPU_LED_PIO in right case
534 #define CONFIG_STATUS_LED 1 /* enable status led driver */
536 #define STATUS_LED_BIT (1 << 0) /* LED[0] */
537 #define STATUS_LED_STATE STATUS_LED_BLINKING
538 #define STATUS_LED_BOOT_STATE STATUS_LED_OFF
539 #define STATUS_LED_PERIOD (CFG_HZ / 2) /* ca. 1 Hz */
540 #define STATUS_LED_BOOT 0 /* boot LED */
542 #if (STATUS_LED_BITS > 1)
543 #define STATUS_LED_BIT1 (1 << 1) /* LED[1] */
544 #define STATUS_LED_STATE1 STATUS_LED_OFF
545 #define STATUS_LED_PERIOD1 (CFG_HZ / 10) /* ca. 5 Hz */
546 #define STATUS_LED_RED 1 /* fail LED */
549 #if (STATUS_LED_BITS > 2)
550 #define STATUS_LED_BIT2 (1 << 2) /* LED[2] */
551 #define STATUS_LED_STATE2 STATUS_LED_OFF
552 #define STATUS_LED_PERIOD2 (CFG_HZ / 2) /* ca. 1 Hz */
553 #define STATUS_LED_YELLOW 2 /* info LED */
556 #if (STATUS_LED_BITS > 3)
557 #define STATUS_LED_BIT3 (1 << 3) /* LED[3] */
558 #define STATUS_LED_STATE3 STATUS_LED_OFF
559 #define STATUS_LED_PERIOD3 (CFG_HZ / 2) /* ca. 1 Hz */
560 #define STATUS_LED_GREEN 3 /* info LED */
563 #define STATUS_LED_PAR 1 /* makes status_led.h happy */
565 #endif /* CFG_NIOS_CPU_PIO_NUMS */
567 /*------------------------------------------------------------------------
568 * Diagnostics / Power On Self Tests
569 *----------------------------------------------------------------------*/
570 #define CONFIG_POST CFG_POST_RTC
571 #define CFG_NIOS_POST_WORD_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
573 /*------------------------------------------------------------------------
575 *----------------------------------------------------------------------*/
576 #define CONFIG_COMMANDS (CFG_CMD_ALL & ~( \
605 #include <cmd_confdefs.h>
607 /*------------------------------------------------------------------------
609 *----------------------------------------------------------------------*/
610 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
611 #define CONFIG_KGDB_BAUDRATE 9600
614 /*------------------------------------------------------------------------
616 *----------------------------------------------------------------------*/
617 #define CFG_LONGHELP /* undef to save memory */
618 #define CFG_HUSH_PARSER 1 /* use "hush" command parser
619 undef to save memory */
620 #define CFG_PROMPT "ADNPESC1 > " /* Monitor Command Prompt */
621 #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
622 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
623 #define CFG_MAXARGS 64 /* max number of command args*/
624 #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
626 #ifdef CFG_HUSH_PARSER
627 #define CFG_PROMPT_HUSH_PS2 "[]> "
630 /* Default load address */
631 #if (CFG_SRAM_SIZE != 0)
633 /* default in SRAM */
634 #define CFG_LOAD_ADDR CFG_SRAM_BASE
636 #elif (CFG_SDRAM_SIZE != 0)
638 /* default in SDRAM */
639 #if (CFG_SDRAM_BASE == CFG_NIOS_CPU_VEC_BASE)
641 #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + CFG_NIOS_CPU_VEC_SIZE)
643 #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 0x400000)
646 #define CFG_LOAD_ADDR CFG_SDRAM_BASE
650 #undef CFG_LOAD_ADDR /* force error break */
655 #if (CFG_SDRAM_SIZE != 0)
657 /* SDRAM begin to stack area (1MB stack) */
658 #if (CFG_SDRAM_BASE == CFG_NIOS_CPU_VEC_BASE)
660 #define CFG_MEMTEST_START (CFG_SDRAM_BASE + CFG_NIOS_CPU_VEC_SIZE)
662 #define CFG_MEMTEST_START (CFG_SDRAM_BASE + 0x400000)
665 #define CFG_MEMTEST_START CFG_SDRAM_BASE
668 #define CFG_MEMTEST_END (CFG_INIT_SP - (1024 * 1024))
669 #define CFG_MEMTEST_END (CFG_INIT_SP - (1024 * 1024))
672 #undef CFG_MEMTEST_START /* force error break */
673 #undef CFG_MEMTEST_END
677 #endif /* __CONFIG_H */