include/configs/[H-N]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_...
[platform/kernel/u-boot.git] / include / configs / GTH.h
1 /*
2   * Parameters for GTH board
3   * Based on FADS860T
4   * by thomas.lange@corelatus.com
5
6   * A collection of structures, addresses, and values associated with
7   * the Motorola 860T FADS board.  Copied from the MBX stuff.
8   * Magnus Damm added defines for 8xxrom and extended bd_info.
9   * Helmut Buchsbaum added bitvalues for BCSRx
10   *
11   * Copyright (c) 1998 Dan Malek (dmalek@jlc.net)
12   */
13
14 /*
15  * ff000000 -> ff00ffff : IMAP       internal in the cpu
16  * e0000000 -> ennnnnnn : pcmcia
17  * 98000000 -> 983nnnnn : FPGA 4MB
18  * 90000000 -> 903nnnnn : FPGA 4MB
19  * 80000000 -> 80nnnnnn : flash      connected to CS0, final ( real ) location
20  * 00000000 -> nnnnnnnn : sdram
21  */
22
23 /* ------------------------------------------------------------------------- */
24
25 /*
26  * board/config.h - configuration options, board specific
27  */
28
29 #ifndef __CONFIG_H
30 #define __CONFIG_H
31
32 /*
33  * High Level Configuration Options
34  * (easy to change)
35  */
36 #include <mpc8xx_irq.h>
37
38 #define CONFIG_MPC860           1
39 #define CONFIG_MPC860T          1
40 #define CONFIG_GTH              1
41
42 #define CONFIG_MISC_INIT_R      1
43
44 #define CONFIG_8xx_CONS_SMC1    1       /* Console is on SMC1           */
45 #undef  CONFIG_8xx_CONS_SMC2
46 #undef  CONFIG_8xx_CONS_NONE
47 #define CONFIG_BAUDRATE         9600
48 #define CONFIG_LOADS_ECHO       1       /* echo on for serial download  */
49
50 #define MPC8XX_FACT             3               /* Multiply by 3 */
51 #define MPC8XX_XIN              16384000        /* 16.384 MHz */
52 #define MPC8XX_HZ ((MPC8XX_XIN) * (MPC8XX_FACT))
53
54 #define CONFIG_BOOTDELAY        1       /* autoboot after 0 seconds     */
55
56 #define CONFIG_ENV_OVERWRITE 1 /* Allow change of ethernet address */
57
58 #define CONFIG_BOOT_RETRY_TIME 5 /* Retry boot in 5 secs */
59
60 #define CONFIG_RESET_TO_RETRY 1 /* If timeout waiting for command, perform a reset */
61
62 /* Only interrupt boot if space is pressed */
63 /* If a long serial cable is connected but */
64 /* other end is dead, garbage will be read */
65 #define CONFIG_AUTOBOOT_KEYED 1
66 #define CONFIG_AUTOBOOT_PROMPT "Press space to abort autoboot in %d second\n"
67 #define CONFIG_AUTOBOOT_DELAY_STR "d"
68 #define CONFIG_AUTOBOOT_STOP_STR " "
69
70 #if 0
71 /* Net boot */
72 /* Loads a tftp image and starts it */
73 #define CONFIG_BOOTCOMMAND      "bootp;bootm 100000"    /* autoboot command */
74 #define CONFIG_BOOTARGS         "panic=1"
75 #else
76 /* Compact flash boot */
77 #define CONFIG_BOOTARGS "panic=1 root=/dev/hda7"
78 #define CONFIG_BOOTCOMMAND "disk 100000 0:5;bootm 100000"
79 #endif
80
81 /* Enable watchdog */
82 #define CONFIG_WATCHDOG 1
83
84 /* choose SCC1 ethernet (10BASET on motherboard)
85  * or FEC ethernet (10/100 on daughterboard)
86  */
87 #if 1
88 #define CONFIG_SCC1_ENET        1       /* use SCC1 ethernet */
89 #undef  CONFIG_FEC_ENET                 /* disable FEC ethernet  */
90 #define CFG_DISCOVER_PHY
91 #else
92 #undef  CONFIG_SCC1_ENET                /* disable SCC1 ethernet */
93 #define CONFIG_FEC_ENET         1       /* use FEC ethernet  */
94 #define CFG_DISCOVER_PHY
95 #endif
96 #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
97 #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
98 #endif
99
100
101 /*
102  * Command line configuration.
103  */
104 #include <config_cmd_default.h>
105
106 #define CONFIG_CMD_IDE
107
108
109 #define CONFIG_MAC_PARTITION
110 #define CONFIG_DOS_PARTITION
111
112 /*
113  * Miscellaneous configurable options
114  */
115 #define CFG_PROMPT              "=>"    /* Monitor Command Prompt       */
116 #if defined(CONFIG_CMD_KGDB)
117 #define CFG_CBSIZE      1024            /* Console I/O Buffer Size      */
118 #else
119 #define CFG_CBSIZE      256             /* Console I/O Buffer Size      */
120 #endif
121 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
122 #define CFG_MAXARGS     16              /* max number of command args   */
123 #define CFG_BARGSIZE    CFG_CBSIZE      /* Boot Argument Buffer Size    */
124
125 #define CFG_MEMTEST_START       0x0100000       /* memtest works on     */
126 #define CFG_MEMTEST_END         0x0400000       /* 1 ... 4 MB in DRAM   */
127
128 /* Default location to load data from net */
129 #define CFG_LOAD_ADDR           0x100000
130
131 #define CFG_HZ          1000            /* decrementer freq: 1 ms ticks */
132
133 #define CFG_BAUDRATE_TABLE      { 9600, 19200, 38400 }
134
135 /*
136  * Low Level Configuration Settings
137  * (address mappings, register initial values, etc.)
138  * You should know what you are doing if you make changes here.
139  */
140 /*-----------------------------------------------------------------------
141  * Internal Memory Mapped Register
142  */
143 #define CFG_IMMR                        0xFF000000
144 #define CFG_IMMR_SIZE           ((uint)(64 * 1024))
145
146 /*-----------------------------------------------------------------------
147  * Definitions for initial stack pointer and data area (in DPRAM)
148  */
149 #define CFG_INIT_RAM_ADDR       CFG_IMMR
150 #define CFG_INIT_RAM_END        0x2F00  /* End of used area in DPRAM    */
151 #define CFG_GBL_DATA_SIZE       64  /* size in bytes reserved for initial data */
152 #define CFG_GBL_DATA_OFFSET     (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
153 #define CFG_INIT_SP_OFFSET      CFG_GBL_DATA_OFFSET
154
155 /*-----------------------------------------------------------------------
156  * Start addresses for the final memory configuration
157  * (Set up by the startup code)
158  * Please note that CFG_SDRAM_BASE _must_ start at 0
159  */
160 #define CFG_SDRAM_BASE          0x00000000
161
162 #define CFG_FLASH_BASE          0x80000000
163
164 #define CFG_FLASH_SIZE          ((uint)(8 * 1024 * 1024))       /* max 8Mbyte */
165
166 #define CFG_MONITOR_LEN         (384 << 10)     /* Reserve 384 kB for Monitor   */
167
168 #define CFG_MONITOR_BASE TEXT_BASE
169
170 #define CFG_MALLOC_LEN          (384 << 10)     /* Reserve 384 kB for malloc()  */
171
172 /*
173  * For booting Linux, the board info and command line data
174  * have to be in the first 8 MB of memory, since this is
175  * the maximum mapped by the Linux kernel during initialization.
176  */
177 #define CFG_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
178 /*-----------------------------------------------------------------------
179  * FLASH organization
180  */
181 #define CFG_MAX_FLASH_BANKS     1       /* max number of memory banks           */
182 #define CFG_MAX_FLASH_SECT      8       /* max number of sectors on one chip    */
183
184 #define CFG_FLASH_ERASE_TOUT    120000  /* Timeout for Flash Erase (in ms)      */
185 #define CFG_FLASH_WRITE_TOUT    500             /* Timeout for Flash Write (in ms)      */
186
187 #define CFG_ENV_IS_IN_FLASH 1
188 #undef CFG_ENV_IS_IN_EEPROM
189 #define CFG_ENV_OFFSET          0x000E0000
190 #define CFG_ENV_SIZE             0x4000         /* Total Size of Environment Sector     */
191
192 #define CFG_ENV_SECT_SIZE       0x50000 /* see README - env sector total size   */
193
194 /*-----------------------------------------------------------------------
195  * Cache Configuration
196  */
197 #define CFG_CACHELINE_SIZE      16      /* For all MPC8xx CPUs                  */
198 #if defined(CONFIG_CMD_KGDB)
199 #define CFG_CACHELINE_SHIFT     4       /* log base 2 of the above value        */
200 #endif
201
202 /*-----------------------------------------------------------------------
203  * SYPCR - System Protection Control                                    11-9
204  * SYPCR can only be written once after reset!
205  *-----------------------------------------------------------------------
206  * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
207  */
208 #if defined(CONFIG_WATCHDOG)
209 #define CFG_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
210                          SYPCR_SWE  | SYPCR_SWRI| SYPCR_SWP)
211 #else
212 #define CFG_SYPCR       (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
213 #endif
214
215 /*-----------------------------------------------------------------------
216  * SIUMCR - SIU Module Configuration                                    11-6
217  *-----------------------------------------------------------------------
218  * PCMCIA config., multi-function pin tri-state
219  */
220 #define CFG_SIUMCR      (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
221
222 /*-----------------------------------------------------------------------
223  * TBSCR - Time Base Status and Control                                 11-26
224  *-----------------------------------------------------------------------
225  * Clear Reference Interrupt Status, Timebase freezing enabled
226  */
227 #define CFG_TBSCR       (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
228
229 /*----------------------------------------------------------------------
230  * RTCSC - Real-Time Clock Status and Control Register          11-27
231  *-----------------------------------------------------------------------
232  */
233
234 /*FIXME dont use for now */
235 /*#define CFG_RTCSC     (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) */
236 /*#define CFG_RTCSC     (RTCSC_RTF) */
237
238 /*-----------------------------------------------------------------------
239  * PISCR - Periodic Interrupt Status and Control                11-31
240  *-----------------------------------------------------------------------
241  * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
242  */
243 #define CFG_PISCR       (PISCR_PS | PISCR_PITF)
244 /* PITE */
245 /*-----------------------------------------------------------------------
246  * PLPRCR - PLL, Low-Power, and Reset Control Register  15-30
247  *-----------------------------------------------------------------------
248  * set the PLL, the low-power modes and the reset control (15-29)
249  */
250 #define CFG_PLPRCR      (((MPC8XX_FACT-1) << PLPRCR_MF_SHIFT) | \
251                                 PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
252
253 /*-----------------------------------------------------------------------
254  * SCCR - System Clock and reset Control Register               15-27
255  *-----------------------------------------------------------------------
256  * Set clock output, timebase and RTC source and divider,
257  * power management and some other internal clocks
258  */
259
260 /* FIXME check values */
261 #define SCCR_MASK       SCCR_EBDF11
262 #define CFG_SCCR        (SCCR_TBS|SCCR_RTSEL|SCCR_COM00|SCCR_DFSYNC00|SCCR_DFBRG00|SCCR_DFNL000|SCCR_DFNH000|SCCR_DFLCD000|SCCR_DFALCD00)
263
264  /*-----------------------------------------------------------------------
265  *
266  *-----------------------------------------------------------------------
267  *
268  */
269 #define CFG_DER         0
270
271 /* Because of the way the 860 starts up and assigns CS0 the
272 * entire address space, we have to set the memory controller
273 * differently.  Normally, you write the option register
274 * first, and then enable the chip select by writing the
275 * base register.  For CS0, you must write the base register
276 * first, followed by the option register.
277 */
278
279 /*
280  * Init Memory Controller:
281  *
282  * BR0/1 and OR0/1 (FLASH)
283  */
284 /* the other CS:s are determined by looking at parameters in BCSRx */
285
286 #define FLASH_BASE0_PRELIM      CFG_FLASH_BASE  /* FLASH bank #0        */
287
288 #define CFG_REMAP_OR_AM         0xFF800000      /* 4 MB OR addr mask */
289 #define CFG_PRELIM_OR_AM        0xFF800000      /* OR addr mask */
290
291 #define FPGA_2_BASE 0x90000000
292 #define FPGA_3_BASE 0x98000000
293
294 /* FLASH timing: ACS = 10, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 0        */
295 #define CFG_OR_TIMING_FLASH     (OR_CSNT_SAM  | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX)
296
297 #define CFG_OR0_REMAP   (CFG_REMAP_OR_AM  | CFG_OR_TIMING_FLASH)
298
299
300 #define CFG_OR0_PRELIM  (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)   /* 1 Mbyte until detected and only 1 Mbyte is needed*/
301 #define CFG_BR0_PRELIM  ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V | BR_PS_16 )
302
303 /*
304  * Internal Definitions
305  *
306  * Boot Flags
307  */
308 #define BOOTFLAG_COLD   0x01            /* Normal Power-On: Boot from FLASH     */
309 #define BOOTFLAG_WARM   0x02            /* Software reboot                      */
310
311 #define CONFIG_ETHADDR          DE:AD:BE:EF:00:01    /* Ethernet address */
312
313 #ifdef CONFIG_MPC860T
314
315 /* Interrupt level assignments.
316 */
317 #define FEC_INTERRUPT   SIU_LEVEL1      /* FEC interrupt */
318
319 #endif /* CONFIG_MPC860T */
320
321 /* We don't use the 8259.
322 */
323 #define NR_8259_INTS    0
324
325 /* Machine type
326 */
327 #define _MACH_8xx (_MACH_gth)
328
329 #ifdef CONFIG_MPC860
330 #define PCMCIA_SLOT_A 1
331 #define CONFIG_PCMCIA_SLOT_A 1
332 #endif
333
334 #define CFG_PCMCIA_MEM_ADDR     (0xE0000000)
335 #define CFG_PCMCIA_MEM_SIZE     ( 64 << 20 )
336 #define CFG_PCMCIA_DMA_ADDR     (0xE4000000)
337 #define CFG_PCMCIA_DMA_SIZE     ( 64 << 20 )
338 #define CFG_PCMCIA_ATTRB_ADDR   (0xE8000000)
339 #define CFG_PCMCIA_ATTRB_SIZE   ( 64 << 20 )
340 #define CFG_PCMCIA_IO_ADDR      (0xEC000000)
341 #define CFG_PCMCIA_IO_SIZE      ( 64 << 20 )
342
343 #define CONFIG_IDE_8xx_PCCARD       1       /* Use IDE with PC Card Adapter */
344 #undef  CONFIG_IDE_8xx_DIRECT               /* Direct IDE    not supported  */
345 #undef  CONFIG_IDE_LED                  /* LED   for ide not supported  */
346 #undef  CONFIG_IDE_RESET                /* reset for ide not supported  */
347
348 #define CFG_IDE_MAXBUS          1       /* max. 1 IDE bus               */
349 #define CFG_IDE_MAXDEVICE       1       /* max. 1 drive per IDE bus     */
350
351 #define CFG_ATA_IDE0_OFFSET     0x0000
352 #define CFG_ATA_BASE_ADDR       CFG_PCMCIA_MEM_ADDR
353 /* Offset for data I/O                  */
354 #define CFG_ATA_DATA_OFFSET     (CFG_PCMCIA_MEM_SIZE + 0x320)
355 /* Offset for normal register accesses  */
356 #define CFG_ATA_REG_OFFSET      (2 * CFG_PCMCIA_MEM_SIZE + 0x320)
357 /* Offset for alternate registers       */
358 #define CFG_ATA_ALT_OFFSET      0x0100
359
360 #define CONFIG_8xx_GCLK_FREQ   MPC8XX_HZ       /* Force it - dont measure it */
361
362 #define PA_FRONT_LED ((u16)0x4) /* PA 13 */
363 #define PA_FL_CONFIG ((u16)0x20) /* PA 10 */
364 #define PA_FL_CE     ((u16)0x1000) /* PA 3 */
365
366 #define PB_ID_GND    ((u32)1) /* PB 31 */
367 #define PB_REV_1     ((u32)2) /* PB 30 */
368 #define PB_REV_0     ((u32)4) /* PB 29 */
369 #define PB_BLUE_LED  ((u32)0x400) /* PB 21 */
370 #define PB_EEPROM    ((u32)0x800) /* PB 20 */
371 #define PB_ID_3      ((u32)0x2000) /* PB 18 */
372 #define PB_ID_2      ((u32)0x4000) /* PB 17 */
373 #define PB_ID_1      ((u32)0x8000) /* PB 16 */
374 #define PB_ID_0      ((u32)0x10000) /* PB 15 */
375
376 /* NOTE. This is reset for 100Mbit port only */
377 #define PC_ENET100_RESET        ((ushort)0x0080) /* PC 8 */
378
379 #endif  /* __CONFIG_H */