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 * SPDX-License-Identifier: GPL-2.0+
15 #include "../board/altera/nios2-generic/custom_fpga.h" /* fpga parameters */
16 #define CONFIG_BOARD_NAME "nios2-generic" /* custom board name */
17 #define CONFIG_BOARD_EARLY_INIT_F /* enable early board-spec. init */
18 #define CONFIG_DISPLAY_CPUINFO
19 #define CONFIG_DISPLAY_BOARDINFO
20 #define CONFIG_SYS_NIOS_SYSID_BASE CONFIG_SYS_SYSID_BASE
25 #define CONFIG_ALTERA_UART
26 #if defined(CONFIG_ALTERA_JTAG_UART)
27 # define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_JTAG_UART_BASE
29 # define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_UART_BASE
32 #define CONFIG_ALTERA_JTAG_UART_BYPASS
33 #define CONFIG_SYS_NIOS_FIXEDBAUD
34 #define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
35 #define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
36 #define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
41 #define CONFIG_SYS_LOW_RES_TIMER
42 #define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_TIMER_BASE
43 #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_TIMER_IRQ
44 #define CONFIG_SYS_NIOS_TMRMS 10 /* Desired period (msec)*/
45 #define CONFIG_SYS_NIOS_TMRCNT \
46 (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_TIMER_FREQ / 1000) - 1)
51 #define CONFIG_ALTERA_PIO
52 #define CONFIG_SYS_ALTERA_PIO_NUM 1
53 #define CONFIG_SYS_ALTERA_PIO_GPIO_NUM LED_PIO_WIDTH
55 #define CONFIG_STATUS_LED /* Enable status driver */
56 #define CONFIG_BOARD_SPECIFIC_LED
57 #define CONFIG_GPIO_LED /* Enable GPIO LED driver */
58 #define CONFIG_GPIO /* Enable GPIO driver */
60 #define STATUS_LED_BIT 0 /* Bit-0 on GPIO */
61 #define STATUS_LED_STATE 1 /* Blinking */
62 #define STATUS_LED_PERIOD (500 / CONFIG_SYS_NIOS_TMRMS) /* 500 msec */
67 #define CONFIG_BOOTP_BOOTFILESIZE
68 #define CONFIG_BOOTP_BOOTPATH
69 #define CONFIG_BOOTP_GATEWAY
70 #define CONFIG_BOOTP_HOSTNAME
73 * Command line configuration.
75 #include <config_cmd_default.h>
76 #undef CONFIG_CMD_BOOTD
77 #undef CONFIG_CMD_FPGA
78 #undef CONFIG_CMD_IMLS
79 #undef CONFIG_CMD_ITEST
81 #undef CONFIG_CMD_SETGETDCR
82 #undef CONFIG_CMD_XIMG
85 # define CONFIG_CMD_DHCP
86 # define CONFIG_CMD_PING
90 * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
91 * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
92 * reset address, no? This will keep the environment in user region
93 * of flash. NOTE: the monitor length must be multiple of sector size
94 * (which is common practice).
96 #define CONFIG_ENV_IS_IN_FLASH
98 #define CONFIG_ENV_SIZE 0x10000 /* 64k, 1 sector */
99 #define CONFIG_ENV_OVERWRITE /* Serial change Ok */
100 #define CONFIG_ENV_ADDR ((CONFIG_SYS_RESET_ADDR + \
101 CONFIG_SYS_MONITOR_LEN) | \
102 CONFIG_SYS_FLASH_BASE)
105 * MEMORY ORGANIZATION
106 * -Monitor at top of sdram.
107 * -The heap is placed below the monitor
108 * -The stack is placed below the heap (&grows down).
110 #define CONFIG_MONITOR_IS_IN_RAM
111 #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
112 #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
113 CONFIG_SYS_SDRAM_SIZE - \
114 CONFIG_SYS_MONITOR_LEN)
115 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000)
116 #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \
117 CONFIG_SYS_MALLOC_LEN)
118 #define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE
123 #define CONFIG_SYS_LONGHELP /* Provide extended help */
124 #define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
125 #define CONFIG_SYS_MAXARGS 16 /* Max command args */
126 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
127 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
128 sizeof(CONFIG_SYS_PROMPT) + \
129 16) /* Print buf size */
130 #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
131 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
132 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - 0x20000)
133 #define CONFIG_CMDLINE_EDITING
135 #define CONFIG_SYS_HUSH_PARSER
137 #endif /* __CONFIG_H */