2 * (C) Copyright 2005, Psyent Corporation <www.psyent.com>
3 * Scott McNutt <smcnutt@psyent.com>
4 * (C) Copyright 2010, Thomas Chou <thomas@wytron.com.tw>
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 #include "../board/altera/nios2-generic/custom_fpga.h" /* fpga parameters */
32 #define CONFIG_BOARD_NAME "nios2-generic" /* custom board name */
33 #define CONFIG_BOARD_EARLY_INIT_F /* enable early board-spec. init */
34 #define CONFIG_SYS_NIOS_SYSID_BASE CONFIG_SYS_SYSID_BASE
39 #define CONFIG_ALTERA_UART
40 #if defined(CONFIG_ALTERA_JTAG_UART)
41 # define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_JTAG_UART_BASE
43 # define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_UART_BASE
46 #define CONFIG_ALTERA_JTAG_UART_BYPASS
47 #define CONFIG_SYS_NIOS_FIXEDBAUD
48 #define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
49 #define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
50 #define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
55 #define CONFIG_SYS_LOW_RES_TIMER
56 #define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_TIMER_BASE
57 #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_TIMER_IRQ
58 #define CONFIG_SYS_HZ 1000 /* Always 1000 */
59 #define CONFIG_SYS_NIOS_TMRMS 10 /* Desired period (msec)*/
60 #define CONFIG_SYS_NIOS_TMRCNT \
61 (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_TIMER_FREQ / 1000) - 1)
66 #define CONFIG_STATUS_LED /* Enable status driver */
67 #define CONFIG_GPIO_LED /* Enable GPIO LED driver */
68 #define CONFIG_GPIO /* Enable GPIO driver */
70 #define STATUS_LED_BIT 0 /* Bit-0 on GPIO */
71 #define STATUS_LED_STATE 1 /* Blinking */
72 #define STATUS_LED_PERIOD (500 / CONFIG_SYS_NIOS_TMRMS) /* 500 msec */
77 #define CONFIG_BOOTP_BOOTFILESIZE
78 #define CONFIG_BOOTP_BOOTPATH
79 #define CONFIG_BOOTP_GATEWAY
80 #define CONFIG_BOOTP_HOSTNAME
83 * Command line configuration.
85 #include <config_cmd_default.h>
86 #undef CONFIG_CMD_BOOTD
87 #undef CONFIG_CMD_FPGA
88 #undef CONFIG_CMD_IMLS
89 #undef CONFIG_CMD_ITEST
91 #undef CONFIG_CMD_SETGETDCR
92 #undef CONFIG_CMD_XIMG
95 # define CONFIG_NET_MULTI
96 # define CONFIG_CMD_DHCP
97 # define CONFIG_CMD_PING
101 * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
102 * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
103 * reset address, no? This will keep the environment in user region
104 * of flash. NOTE: the monitor length must be multiple of sector size
105 * (which is common practice).
107 #define CONFIG_ENV_IS_IN_FLASH
109 #define CONFIG_ENV_SIZE 0x10000 /* 64k, 1 sector */
110 #define CONFIG_ENV_OVERWRITE /* Serial change Ok */
111 #define CONFIG_ENV_ADDR ((CONFIG_SYS_RESET_ADDR + \
112 CONFIG_SYS_MONITOR_LEN) | \
113 CONFIG_SYS_FLASH_BASE)
116 * MEMORY ORGANIZATION
117 * -Monitor at top of sdram.
118 * -The heap is placed below the monitor
119 * -Global data is placed below the heap.
120 * -The stack is placed below global data (&grows down).
122 #define CONFIG_MONITOR_IS_IN_RAM
123 #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
124 #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
125 CONFIG_SYS_SDRAM_SIZE - \
126 CONFIG_SYS_MONITOR_LEN)
127 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000)
128 #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \
129 CONFIG_SYS_MALLOC_LEN)
130 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_MALLOC_BASE - \
131 GENERATED_GBL_DATA_SIZE)
132 #define CONFIG_SYS_INIT_SP CONFIG_SYS_GBL_DATA_OFFSET
137 #define CONFIG_SYS_LONGHELP /* Provide extended help */
138 #define CONFIG_SYS_PROMPT "==> " /* Command prompt */
139 #define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
140 #define CONFIG_SYS_MAXARGS 16 /* Max command args */
141 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
142 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
143 sizeof(CONFIG_SYS_PROMPT) + \
144 16) /* Print buf size */
145 #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
146 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
147 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - 0x20000)
148 #define CONFIG_CMDLINE_EDITING
150 #define CONFIG_SYS_HUSH_PARSER
151 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
153 #endif /* __CONFIG_H */