blob: e4b5abb90dcafcb1a4e63c420bedd91dfdef128d [file] [log] [blame]
Thomas Chou7ffbbf52010-04-21 08:40:59 +08001/*
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>
5 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02006 * SPDX-License-Identifier: GPL-2.0+
Thomas Chou7ffbbf52010-04-21 08:40:59 +08007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12/*
13 * BOARD/CPU
14 */
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 */
Thomas Choucce3e752014-08-22 11:36:47 +080018#define CONFIG_DISPLAY_CPUINFO
Thomas Chou36b9c9a2015-10-14 08:43:31 +080019#define CONFIG_DISPLAY_BOARDINFO_LATE
Thomas Chou7ffbbf52010-04-21 08:40:59 +080020#define CONFIG_SYS_NIOS_SYSID_BASE CONFIG_SYS_SYSID_BASE
21
22/*
23 * SERIAL
24 */
Thomas Chou6917a5d2015-10-21 21:26:54 +080025#define CONFIG_BAUDRATE 115200
Thomas Chou7ffbbf52010-04-21 08:40:59 +080026#define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
27
28/*
Thomas Chou7ffbbf52010-04-21 08:40:59 +080029 * BOOTP options
30 */
31#define CONFIG_BOOTP_BOOTFILESIZE
32#define CONFIG_BOOTP_BOOTPATH
33#define CONFIG_BOOTP_GATEWAY
34#define CONFIG_BOOTP_HOSTNAME
35
36/*
Thomas Chou44d3cf42015-08-26 21:24:35 +080037 * FDT options
Thomas Chou7ffbbf52010-04-21 08:40:59 +080038 */
Thomas Chou2f8e2562014-08-30 17:45:23 +080039#define CONFIG_OF_LIBFDT
40#define CONFIG_OF_BOARD_SETUP
41#define CONFIG_LMB
42
Thomas Chou7ffbbf52010-04-21 08:40:59 +080043/*
44 * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
45 * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
46 * reset address, no? This will keep the environment in user region
47 * of flash. NOTE: the monitor length must be multiple of sector size
48 * (which is common practice).
49 */
50#define CONFIG_ENV_IS_IN_FLASH
51
Thomas Chou2f8e2562014-08-30 17:45:23 +080052#define CONFIG_ENV_SIZE 0x20000 /* 128k, 1 sector */
Thomas Chou7ffbbf52010-04-21 08:40:59 +080053#define CONFIG_ENV_OVERWRITE /* Serial change Ok */
54#define CONFIG_ENV_ADDR ((CONFIG_SYS_RESET_ADDR + \
55 CONFIG_SYS_MONITOR_LEN) | \
56 CONFIG_SYS_FLASH_BASE)
57
58/*
59 * MEMORY ORGANIZATION
Thomas Choufe06c182012-04-23 10:55:02 +080060 * -Monitor at top of sdram.
61 * -The heap is placed below the monitor
62 * -The stack is placed below the heap (&grows down).
Thomas Chou7ffbbf52010-04-21 08:40:59 +080063 */
64#define CONFIG_MONITOR_IS_IN_RAM
65#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
66#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
67 CONFIG_SYS_SDRAM_SIZE - \
68 CONFIG_SYS_MONITOR_LEN)
Thomas Chou7ffbbf52010-04-21 08:40:59 +080069#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000)
70#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \
71 CONFIG_SYS_MALLOC_LEN)
Thomas Choufe06c182012-04-23 10:55:02 +080072#define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE
Thomas Chou7ffbbf52010-04-21 08:40:59 +080073
74/*
75 * MISC
76 */
77#define CONFIG_SYS_LONGHELP /* Provide extended help */
Thomas Chou7ffbbf52010-04-21 08:40:59 +080078#define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
79#define CONFIG_SYS_MAXARGS 16 /* Max command args */
80#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
81#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
82 sizeof(CONFIG_SYS_PROMPT) + \
83 16) /* Print buf size */
84#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
85#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
86#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - 0x20000)
87#define CONFIG_CMDLINE_EDITING
Thomas Choufb1a4bf2015-10-21 21:33:45 +080088#define CONFIG_CMD_GPIO
Thomas Chou7ffbbf52010-04-21 08:40:59 +080089
Thomas Chou7ffbbf52010-04-21 08:40:59 +080090#endif /* __CONFIG_H */