* Patches by Stephan Linz, 3 Nov 2003:
[oweals/u-boot.git] / include / configs / DK1C20.h
1 /*
2  * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
3  * Scott McNutt <smcnutt@psyent.com>
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
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.
12  *
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.
17  *
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,
21  * MA 02111-1307 USA
22  */
23
24 #ifndef __CONFIG_H
25 #define __CONFIG_H
26
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    */
33
34 /*------------------------------------------------------------------------
35  * BASE ADDRESSES
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    */
43
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
49  * appropriately).
50  *
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)
59
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
64
65 /*------------------------------------------------------------------------
66  * FLASH
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) */
72
73 /*------------------------------------------------------------------------
74  * ENVIRONMENT
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 */
79
80 /*------------------------------------------------------------------------
81  * CONSOLE
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
87
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
95
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    */
103
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
108
109 /*------------------------------------------------------------------------
110  * COMMANDS
111  *----------------------------------------------------------------------*/
112 #define CONFIG_COMMANDS         (CFG_CMD_ALL & ~( \
113                                  CFG_CMD_ASKENV | \
114                                  CFG_CMD_BEDBUG | \
115                                  CFG_CMD_BMP    | \
116                                  CFG_CMD_BSP    | \
117                                  CFG_CMD_CACHE  | \
118                                  CFG_CMD_DATE   | \
119                                  CFG_CMD_DOC    | \
120                                  CFG_CMD_DTT    | \
121                                  CFG_CMD_EEPROM | \
122                                  CFG_CMD_ELF    | \
123                                  CFG_CMD_FAT    | \
124                                  CFG_CMD_FDC    | \
125                                  CFG_CMD_FDOS   | \
126                                  CFG_CMD_HWFLOW | \
127                                  CFG_CMD_IDE    | \
128                                  CFG_CMD_I2C    | \
129                                  CFG_CMD_JFFS2  | \
130                                  CFG_CMD_KGDB   | \
131                                  CFG_CMD_NAND   | \
132                                  CFG_CMD_MMC    | \
133                                  CFG_CMD_MII    | \
134                                  CFG_CMD_PCI    | \
135                                  CFG_CMD_PCMCIA | \
136                                  CFG_CMD_SCSI   | \
137                                  CFG_CMD_SPI    | \
138                                  CFG_CMD_VFD    | \
139                                  CFG_CMD_USB    ) )
140
141
142 #include <cmd_confdefs.h>
143
144 /*------------------------------------------------------------------------
145  * KGDB
146  *----------------------------------------------------------------------*/
147 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
148 #define CONFIG_KGDB_BAUDRATE    9600
149 #endif
150
151 /*------------------------------------------------------------------------
152  * MISC
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 */
163
164 #define CFG_MEMTEST_START       0x00000000
165 #define CFG_MEMTEST_END         0x00000000
166
167
168 #endif  /* __CONFIG_H */