2 * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
3 * Scott McNutt <smcnutt@psyent.com>
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 * BOARD/CPU -- TOP-LEVEL
29 *----------------------------------------------------------------------*/
30 #define CONFIG_NIOS 1 /* NIOS-32 core */
31 #define CONFIG_DK1C20 1 /* Cyclone DK-1C20 board*/
32 #define CONFIG_SYS_CLK_FREQ 50000000 /* 50 MHz core clock */
34 /*------------------------------------------------------------------------
36 *----------------------------------------------------------------------*/
37 #define CFG_FLASH_BASE 0x00000000 /* Flash memory base */
38 #define CFG_SRAM_BASE 0x00800000 /* External SRAM */
39 #define CFG_SRAM_SIZE 0x00100000 /* 1 MByte */
40 #define CFG_SDRAM_BASE 0x01000000 /* SDRAM base addr */
41 #define CFG_SDRAM_SIZE 0x01000000 /* 16 MByte */
42 #define CFG_VECT_BASE 0x008fff00 /* Vector table addr */
44 /*------------------------------------------------------------------------
45 * MEMORY ORGANIZATION - For the most part, you can put things pretty
46 * much anywhere. This is pretty flexible for Nios. So here we make some
47 * arbitrary choices & assume that the monitor is placed at the end of
48 * a memory resource (so you must make sure TEXT_BASE is chosen
51 * -The heap is placed below the monitor.
52 * -Global data is placed below the heap.
53 * -The stack is placed below global data (&grows down).
54 *----------------------------------------------------------------------*/
55 #define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256k */
56 #define CFG_ENV_SIZE 0x10000 /* 64 KByte (1 sector) */
57 #define CFG_GBL_DATA_SIZE 128 /* Global data size rsvd*/
58 #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
60 #define CFG_MONITOR_BASE TEXT_BASE
61 #define CFG_MALLOC_BASE (CFG_MONITOR_BASE - CFG_MALLOC_LEN)
62 #define CFG_GBL_DATA_OFFSET (CFG_MALLOC_BASE -CFG_GBL_DATA_SIZE)
63 #define CFG_INIT_SP CFG_GBL_DATA_OFFSET
65 /*------------------------------------------------------------------------
67 *----------------------------------------------------------------------*/
68 #define CFG_MAX_FLASH_SECT 128 /* Max # sects per bank */
69 #define CFG_MAX_FLASH_BANKS 1 /* Max # of flash banks */
70 #define CFG_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */
71 #define CFG_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */
73 /*------------------------------------------------------------------------
75 *----------------------------------------------------------------------*/
76 #define CFG_ENV_IS_IN_FLASH 1 /* Environment in flash */
77 #define CFG_ENV_ADDR 0x00000000 /* Mem addr of env */
78 #define CONFIG_ENV_OVERWRITE /* Serial/eth change Ok */
80 /*------------------------------------------------------------------------
82 *----------------------------------------------------------------------*/
83 #define CFG_NIOS_CONSOLE 0x00920900 /* Cons uart base addr */
84 #define CFG_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */
85 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
86 #define CONFIG_BAUDRATE 115200
88 /*------------------------------------------------------------------------
89 * TIMER FOR TIMEBASE -- Nios doesn't have the equivalent of ppc PIT,
90 * so an avalon bus timer is required.
91 *----------------------------------------------------------------------*/
92 #define CFG_NIOS_TMRBASE 0x009209e0
93 #define CFG_NIOS_TMRIRQ 50
94 #define CFG_NIOS_TMRMS 10
96 /*------------------------------------------------------------------------
97 * Ethernet -- needs work!
98 *----------------------------------------------------------------------*/
99 #define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
100 #define CONFIG_SMC91111_BASE 0x00910300 /* Base address */
101 #undef CONFIG_SMC91111_EXT_PHY /* Internal PHY */
102 #define CONFIG_SMC_USE_32_BIT /* 32-bit data rd/wr */
104 #define CONFIG_ETHADDR 08:00:3e:26:0a:5b
105 #define CONFIG_NETMASK 255.255.255.0
106 #define CONFIG_IPADDR 192.168.2.21
107 #define CONFIG_SERVERIP 192.168.2.16
109 /*------------------------------------------------------------------------
111 *----------------------------------------------------------------------*/
112 #define CONFIG_COMMANDS (CFG_CMD_ALL & ~( \
142 #include <cmd_confdefs.h>
144 /*------------------------------------------------------------------------
146 *----------------------------------------------------------------------*/
147 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
148 #define CONFIG_KGDB_BAUDRATE 9600
151 /*------------------------------------------------------------------------
153 *----------------------------------------------------------------------*/
154 #define CFG_LONGHELP /* undef to save memory */
155 #define CFG_PROMPT "==> " /* Monitor Command Prompt */
156 #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
157 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
158 #define CFG_MAXARGS 16 /* max number of command args */
159 #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
160 #undef CFG_CLKS_IN_HZ
161 #define CFG_HZ 1000 /* decr freq: 1ms ticks */
162 #define CFG_LOAD_ADDR 0x00800000 /* Default load address */
164 #define CFG_MEMTEST_START 0x00000000
165 #define CFG_MEMTEST_END 0x00000000
168 #endif /* __CONFIG_H */