include/configs/[H-N]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_...
[platform/kernel/u-boot.git] / include / configs / ERIC.h
1 /*
2  * (C) Copyright 2001
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
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 /*
25  * board/config.h - configuration options, board specific
26  */
27
28 #ifndef __CONFIG_H
29 #define __CONFIG_H
30
31 /*
32  * High Level Configuration Options
33  * (easy to change)
34  */
35
36 #define CONFIG_405GP            1       /* This is a PPC405 CPU         */
37 #define CONFIG_4xx              1       /* ...member of PPC4xx family   */
38 #define CONFIG_ERIC             1       /* ...on a ERIC board   */
39
40 #define CONFIG_BOARD_EARLY_INIT_F 1     /* run board_early_init_f() */
41
42 #define CONFIG_SYS_CLK_FREQ     33333333 /* external frequency to pll   */
43
44 #if 1
45 #define CFG_ENV_IS_IN_FLASH     1       /* use FLASH for environment vars       */
46 #endif
47 #if 0
48 #define CFG_ENV_IS_IN_NVRAM     1       /* use NVRAM for environment vars       */
49 #endif
50 #if 0
51 #define CFG_ENV_IS_IN_EEPROM    1       /* use I2C RTC X1240 for environment vars */
52 #define CFG_ENV_OFFSET          0x000   /* environment starts at the beginning of the EEPROM */
53 #define CFG_ENV_SIZE            0x800   /* 2048 bytes may be used for env vars */
54 #endif                                  /* total size of a X1240 is 2048 bytes */
55
56 #define CONFIG_HARD_I2C         1       /* I2C with hardware support */
57 #define CFG_I2C_SPEED           400000  /* I2C speed and slave address */
58 #define CFG_I2C_SLAVE           0x7F
59
60 #define CFG_I2C_EEPROM_ADDR     0x57    /* X1240 has two I2C slave addresses, one for EEPROM */
61 #define CFG_I2C_EEPROM_ADDR_LEN 2       /* address length for the eeprom */
62 #define CONFIG_I2C_RTC          1       /* we have a Xicor X1240 RTC */
63 #define CFG_I2C_RTC_ADDR        0x6F    /*                                and one for RTC */
64
65 #ifdef CFG_ENV_IS_IN_FLASH
66 #undef CFG_ENV_IS_IN_NVRAM
67 #undef CFG_ENV_IS_IN_EEPROM
68 #else
69 #ifdef CFG_ENV_IS_IN_NVRAM
70 #undef CFG_ENV_IS_IN_FLASH
71 #undef CFG_ENV_IS_IN_EEPROM
72 #else
73 #ifdef CFG_ENV_IS_IN_EEPROM
74 #undef CFG_ENV_IS_IN_NVRAM
75 #undef CFG_ENV_IS_IN_FLASH
76 #endif
77 #endif
78 #endif
79
80 #define CONFIG_BAUDRATE         115200
81 #define CONFIG_BOOTDELAY        3       /* autoboot after 3 seconds     */
82
83 #if 1
84 #define CONFIG_BOOTCOMMAND      "bootm ffc00000" /* autoboot command    */
85 #else
86 #define CONFIG_BOOTCOMMAND      "bootp" /* autoboot command             */
87 #endif
88
89 #define CONFIG_BOOTARGS         "console=ttyS0,115200 root=/dev/nfs "   \
90                                 "nfsroot=192.168.1.2:/eric_root_devel " \
91                                 "ip=192.168.1.22:192.168.1.2"
92
93 #define CONFIG_LOADS_ECHO       1       /* echo on for serial download  */
94 #define CFG_LOADS_BAUD_CHANGE   1       /* allow baudrate change        */
95
96 #define CONFIG_MII              1       /* MII PHY management           */
97 #define CONFIG_PHY_ADDR         1       /* PHY address                  */
98
99
100 /*
101  * Command line configuration.
102  */
103 #include <config_cmd_default.h>
104
105 #define CONFIG_CMD_PCI
106 #define CONFIG_CMD_IRQ
107 #define CONFIG_CMD_ENV
108 #define CONFIG_CMD_FLASH
109
110
111 #undef CONFIG_WATCHDOG                  /* watchdog disabled            */
112
113 /*
114  * Miscellaneous configurable options
115  */
116 #undef  CFG_LONGHELP                    /* undef to save memory         */
117 #define CFG_PROMPT      "=> "           /* Monitor Command Prompt       */
118 #if defined(CONFIG_CMD_KGDB)
119 #define CFG_CBSIZE      1024            /* Console I/O Buffer Size      */
120 #else
121 #define CFG_CBSIZE      256             /* Console I/O Buffer Size      */
122 #endif
123 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
124 #define CFG_MAXARGS     16              /* max number of command args   */
125 #define CFG_BARGSIZE    CFG_CBSIZE      /* Boot Argument Buffer Size    */
126
127 #define CFG_MEMTEST_START       0x0400000       /* memtest works on     */
128 #define CFG_MEMTEST_END         0x0C00000       /* 4 ... 12 MB in DRAM  */
129
130 #define  CFG_EXT_SERIAL_CLOCK    14318180
131
132 /* The following table includes the supported baudrates */
133 #define CFG_BAUDRATE_TABLE      \
134         { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400,     \
135          57600, 115200, 230400, 460800, 921600 }
136
137 #define CFG_LOAD_ADDR           0x100000        /* default load address */
138 #define CFG_EXTBDINFO           1       /* To use extended board_into (bd_t) */
139
140 #define CFG_HZ          1000            /* decrementer freq: 1 ms ticks */
141
142 /*-----------------------------------------------------------------------
143  * PCI stuff
144  *-----------------------------------------------------------------------
145  */
146 #define PCI_HOST_ADAPTER 0              /* configure ar pci adapter     */
147 #define PCI_HOST_FORCE  1               /* configure as pci host        */
148 #define PCI_HOST_AUTO   2               /* detected via arbiter enable  */
149
150 #define CONFIG_PCI                      /* include pci support          */
151 #define CONFIG_PCI_HOST PCI_HOST_FORCE  /* select pci host function     */
152 #undef  CONFIG_PCI_PNP                  /* no pci plug-and-play         */
153                                         /* resource configuration       */
154
155 #define CFG_PCI_SUBSYS_VENDORID 0x1743  /* PCI Vendor ID: Peppercon AG  */
156 #define CFG_PCI_SUBSYS_DEVICEID 0x0405  /* PCI Device ID: 405GP         */
157 #define CFG_PCI_PTM1LA  0xFFFC0000      /* point to flash               */
158 #define CFG_PCI_PTM1MS  0xFFFFF001      /* 4kB, enable hard-wired to 1  */
159 #define CFG_PCI_PTM1PCI 0x00000000      /* Host: use this pci address   */
160 #define CFG_PCI_PTM2LA  0x00000000      /* disabled                     */
161 #define CFG_PCI_PTM2MS  0x00000000      /* disabled                     */
162 #define CFG_PCI_PTM2PCI 0x04000000      /* Host: use this pci address   */
163
164 /*-----------------------------------------------------------------------
165  * External peripheral base address
166  *-----------------------------------------------------------------------
167  */
168 /*      Bank 0 - Flash/SRAM            0xFF000000 16MB  16 Bit */
169 /*      Bank 1 - NVRAM/RTC             0xF0000000  1MB   8 Bit */
170 /*      Bank 2 - A/D converter         0xF0100000  1MB   8 Bit */
171 /*      Bank 3 - Ethernet PHY Reset    0xF0200000  1MB   8 Bit */
172 /*      Bank 4 - PC-MIP PRSNT1#        0xF0300000  1MB   8 Bit */
173 /*      Bank 5 - PC-MIP PRSNT2#        0xF0400000  1MB   8 Bit */
174 /*      Bank 6 - CPU LED0              0xF0500000  1MB   8 Bit */
175 /*      Bank 7 - CPU LED1              0xF0600000  1MB   8 Bit */
176
177 /* ----------------------------------------------------------------------- */
178 /*  Memory Bank 0 (Flash) initialization */
179 /* ----------------------------------------------------------------------- */
180 #define CS0_AP  0x9B015480
181 #define CS0_CR  0xFF87A000 /*  BAS=0xFF8,BS=(8MB),BU=0x3(R/W), BW=(16 bits) */
182 /* ----------------------------------------------------------------------- */
183 /*  Memory Bank 1 (NVRAM/RTC) initialization */
184 /* ----------------------------------------------------------------------- */
185 #define CS1_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
186 #define CS1_CR  0xF0018000 /* BAS=0xF00,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
187  /* ----------------------------------------------------------------------- */
188  /*  Memory Bank 2 (A/D converter) initialization */
189  /* ----------------------------------------------------------------------- */
190 #define CS2_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
191 #define CS2_CR  0xF0118000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
192 /* ----------------------------------------------------------------------- */
193 /*  Memory Bank 3 (Ethernet PHY Reset) initialization */
194 /* ----------------------------------------------------------------------- */
195 #define CS3_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
196 #define CS3_CR  0xF0218000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
197 /* ----------------------------------------------------------------------- */
198 /*  Memory Bank 4 (PC-MIP PRSNT1#) initialization */
199 /* ----------------------------------------------------------------------- */
200 #define CS4_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
201 #define CS4_CR  0xF0318000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
202 /* ----------------------------------------------------------------------- */
203 /*  Memory Bank 5 (PC-MIP PRSNT2#) initialization */
204 /* ----------------------------------------------------------------------- */
205 #define CS5_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
206 #define CS5_CR  0xF0418000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
207 /* ----------------------------------------------------------------------- */
208 /*  Memory Bank 6 (CPU LED0) initialization */
209 /* ----------------------------------------------------------------------- */
210 #define CS6_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
211 #define CS6_CR  0xF0518000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
212 /* ----------------------------------------------------------------------- */
213 /*  Memory Bank 7 (CPU LED1) initialization */
214 /* ----------------------------------------------------------------------- */
215 #define CS7_AP  0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
216 #define CS7_CR  0xF0618000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
217
218 #define CFG_NVRAM_REG_BASE_ADDR  0xF0000000
219 #define CFG_RTC_REG_BASE_ADDR    (0xF0000000 + 0x7F8)
220 #define CFG_ADC_REG_BASE_ADDR    0xF0100000
221 #define CFG_PHYRES_REG_BASE_ADDR 0xF0200000
222 #define CFG_PRSNT1_REG_BASE_ADDR 0xF0300000
223 #define CFG_PRSNT2_REG_BASE_ADDR 0xF0400000
224 #define CFG_LED0_REG_BASE_ADDR   0xF0500000
225 #define CFG_LED1_REG_BASE_ADDR   0xF0600000
226
227
228 /*  SDRAM CONFIG */
229 #define CFG_SDRAM_MANUALLY    1
230 #define CFG_SDRAM_SINGLE_BANK 1
231
232 #ifdef CFG_SDRAM_MANUALLY
233 /*-----------------------------------------------------------------------
234  * Set MB0CF for bank 0. (0-32MB) Address Mode 4 since 12x8(2)
235  *----------------------------------------------------------------------*/
236 #define MB0CF   0x00062001 /*  32MB @ 0 */
237 /*-----------------------------------------------------------------------
238  * Set MB1CF for bank 1. (32MB-64MB) Address Mode 4 since 12x8(2)
239  *----------------------------------------------------------------------*/
240 #ifdef CFG_SDRAM_SINGLE_BANK
241 #define MB1CF   0x0 /*  0MB @ 32MB */
242 #else
243 #define MB1CF   0x02062001 /*  32MB @ 32MB */
244 #endif
245 /*-----------------------------------------------------------------------
246  * Set MB2CF for bank 2. off
247  *----------------------------------------------------------------------*/
248 #define MB2CF   0x0 /*  0MB */
249 /*-----------------------------------------------------------------------
250  * Set MB3CF for bank 3. off
251  *----------------------------------------------------------------------*/
252 #define MB3CF   0x0 /*  0MB */
253
254 #define SDTR_100    0x0086400D
255 #define RTR_100     0x05F0
256 #define SDTR_66     0x00854006  /* orig U-Boot-wallnut says 0x00854006 */
257 #define RTR_66      0x03f8
258
259 #endif   /* CFG_SDRAM_MANUALLY */
260
261
262 /*-----------------------------------------------------------------------
263  * Start addresses for the final memory configuration
264  * (Set up by the startup code)
265  * Please note that CFG_SDRAM_BASE _must_ start at 0
266  */
267 #define CFG_SDRAM_BASE          0x00000000
268 #define CFG_SDRAM_SIZE          32
269 #define CFG_FLASH_BASE          0xFF800000      /* 8 MByte Flash */
270 #define CFG_MONITOR_BASE        0xFFFE0000      /* last 128kByte within Flash */
271 /*#define CFG_MONITOR_LEN               (192 * 1024)*/  /* Reserve 196 kB for Monitor   */
272 #define CFG_MONITOR_LEN         (128 * 1024)    /* Reserve 128 kB for Monitor   */
273 #define CFG_MALLOC_LEN          (128 * 1024)    /* Reserve 128 kB for malloc()  */
274
275 /*
276  * For booting Linux, the board info and command line data
277  * have to be in the first 8 MB of memory, since this is
278  * the maximum mapped by the Linux kernel during initialization.
279  */
280 #define CFG_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
281 /*-----------------------------------------------------------------------
282  * FLASH organization
283  */
284 #define CFG_MAX_FLASH_BANKS     1       /* max number of memory banks           */
285 #define CFG_MAX_FLASH_SECT      64      /* max number of sectors on one chip    */
286 #define CFG_FLASH_16BIT         1       /* Rom 16 bit data bus                  */
287
288 #define CFG_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
289 #define CFG_FLASH_WRITE_TOUT    500     /* Timeout for Flash Write (in ms)      */
290
291 /* BEG ENVIRONNEMENT FLASH */
292 #ifdef CFG_ENV_IS_IN_FLASH
293 #define CFG_ENV_SECT_SIZE       (128*1024)
294
295 #if 0  /* force ENV to be NOT embedded */
296 #define CFG_ENV_ADDR            0xfffa0000
297 #else  /* force ENV to be embedded */
298 #define CFG_ENV_SIZE            (2 * 1024) /* Total Size of Environment Sector 2k */
299 #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + CFG_MONITOR_LEN - CFG_ENV_SIZE - 0x10) /* let space for reset vector */
300 /* #define CFG_ENV_ADDR            (CFG_MONITOR_BASE)*/
301 #define CFG_ENV_OFFSET          (CFG_ENV_ADDR - CFG_FLASH_BASE)
302 #endif
303
304 #endif
305 /* END ENVIRONNEMENT FLASH */
306 /*-----------------------------------------------------------------------
307  * NVRAM organization
308  */
309 #define CFG_NVRAM_BASE_ADDR     CFG_NVRAM_REG_BASE_ADDR /* NVRAM base address   */
310 #define CFG_NVRAM_SIZE          0x7F8           /* NVRAM size 2kByte - 8 Byte for RTC */
311
312 #ifdef CFG_ENV_IS_IN_NVRAM
313 #define CFG_ENV_SIZE            0x7F8           /* Size of Environment vars     */
314 #define CFG_ENV_ADDR            \
315         (CFG_NVRAM_BASE_ADDR+CFG_NVRAM_SIZE-CFG_ENV_SIZE)       /* Env  */
316 #endif
317 /*-----------------------------------------------------------------------
318  * Cache Configuration
319  */
320 #define CFG_DCACHE_SIZE         8192    /* For AMCC 405 CPUs                    */
321 #define CFG_CACHELINE_SIZE      32      /* ...                  */
322 #if defined(CONFIG_CMD_KGDB)
323 #define CFG_CACHELINE_SHIFT     5       /* log base 2 of the above value        */
324 #endif
325
326 /*
327  * Init Memory Controller:
328  *
329  * BR0/1 and OR0/1 (FLASH)
330  */
331
332 #define FLASH_BASE0_PRELIM      0xFF800000      /* FLASH bank #0 8MB    */
333 #define FLASH_BASE1_PRELIM      0               /* FLASH bank #1        */
334
335
336 /* Configuration Port location */
337 /*  #define CONFIG_PORT_ADDR    0xF0000500 */
338
339 /*-----------------------------------------------------------------------
340  * Definitions for initial stack pointer and data area (in DPRAM)
341  */
342 #define CFG_INIT_RAM_ADDR       0x00df0000  /* inside of SDRAM                 */
343 #define CFG_INIT_RAM_END        0x0f00  /* End of used area in RAM             */
344 #define CFG_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
345 #define CFG_GBL_DATA_OFFSET     (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
346 #define CFG_INIT_SP_OFFSET      CFG_GBL_DATA_OFFSET
347
348 /*-----------------------------------------------------------------------
349  * Definitions for Serial Presence Detect EEPROM address
350  * (to get SDRAM settings)
351  */
352 #define SPD_EEPROM_ADDRESS      0x50
353
354 /*
355  * Internal Definitions
356  *
357  * Boot Flags
358  */
359 #define BOOTFLAG_COLD   0x01            /* Normal Power-On: Boot from FLASH     */
360 #define BOOTFLAG_WARM   0x02            /* Software reboot                      */
361
362 #if defined(CONFIG_CMD_KGDB)
363 #define CONFIG_KGDB_BAUDRATE    230400  /* speed to run kgdb serial port */
364 #define CONFIG_KGDB_SER_INDEX   2       /* which serial port to use */
365 #endif
366 #endif  /* __CONFIG_H */