]> git.sur5r.net Git - u-boot/blob - include/configs/MPC837XERDB.h
83xx: Add Vitesse VSC7385 firmware uploading
[u-boot] / include / configs / MPC837XERDB.h
1 /*
2  * Copyright (C) 2007 Freescale Semiconductor, Inc.
3  * Kevin Lam <kevin.lam@freescale.com>
4  * Joe D'Abbraccio <joe.d'abbraccio@freescale.com>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  * MA 02111-1307 USA
20  */
21
22 #ifndef __CONFIG_H
23 #define __CONFIG_H
24
25 /*
26  * High Level Configuration Options
27  */
28 #define CONFIG_E300             1 /* E300 family */
29 #define CONFIG_MPC83XX          1 /* MPC83XX family */
30 #define CONFIG_MPC837X          1 /* MPC837X CPU specific */
31 #define CONFIG_MPC837XERDB      1
32
33 #define CONFIG_PCI      1
34
35 #define CONFIG_MISC_INIT_R
36
37 /*
38  * On-board devices
39  */
40 #define CONFIG_TSEC_ENET                /* TSEC Ethernet support */
41 #define CONFIG_VSC7385_ENET
42
43 /*
44  * System Clock Setup
45  */
46 #ifdef CONFIG_PCISLAVE
47 #define CONFIG_83XX_PCICLK      66666667 /* in HZ */
48 #else
49 #define CONFIG_83XX_CLKIN       66666667 /* in Hz */
50 #define CONFIG_83XX_GENERIC_PCI 1
51 #endif
52
53 #ifndef CONFIG_SYS_CLK_FREQ
54 #define CONFIG_SYS_CLK_FREQ     CONFIG_83XX_CLKIN
55 #endif
56
57 /*
58  * Hardware Reset Configuration Word
59  */
60 #define CFG_HRCW_LOW (\
61         HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
62         HRCWL_DDR_TO_SCB_CLK_1X1 |\
63         HRCWL_SVCOD_DIV_2 |\
64         HRCWL_CSB_TO_CLKIN_5X1 |\
65         HRCWL_CORE_TO_CSB_2X1)
66
67 #ifdef CONFIG_PCISLAVE
68 #define CFG_HRCW_HIGH (\
69         HRCWH_PCI_AGENT |\
70         HRCWH_PCI1_ARBITER_DISABLE |\
71         HRCWH_CORE_ENABLE |\
72         HRCWH_FROM_0XFFF00100 |\
73         HRCWH_BOOTSEQ_DISABLE |\
74         HRCWH_SW_WATCHDOG_DISABLE |\
75         HRCWH_ROM_LOC_LOCAL_16BIT |\
76         HRCWH_RL_EXT_LEGACY |\
77         HRCWH_TSEC1M_IN_RGMII |\
78         HRCWH_TSEC2M_IN_RGMII |\
79         HRCWH_BIG_ENDIAN |\
80         HRCWH_LDP_CLEAR)
81 #else
82 #define CFG_HRCW_HIGH (\
83         HRCWH_PCI_HOST |\
84         HRCWH_PCI1_ARBITER_ENABLE |\
85         HRCWH_CORE_ENABLE |\
86         HRCWH_FROM_0X00000100 |\
87         HRCWH_BOOTSEQ_DISABLE |\
88         HRCWH_SW_WATCHDOG_DISABLE |\
89         HRCWH_ROM_LOC_LOCAL_16BIT |\
90         HRCWH_RL_EXT_LEGACY |\
91         HRCWH_TSEC1M_IN_RGMII |\
92         HRCWH_TSEC2M_IN_RGMII |\
93         HRCWH_BIG_ENDIAN |\
94         HRCWH_LDP_CLEAR)
95 #endif
96
97 /* System performance - define the value i.e. CFG_XXX
98 */
99
100 /* Arbiter Configuration Register */
101 #define CFG_ACR_PIPE_DEP        3       /* Arbiter pipeline depth (0-3) */
102 #define CFG_ACR_RPTCNT          3       /* Arbiter repeat count (0-7) */
103
104 /* System Priority Control Regsiter */
105 #define CFG_SPCR_TSECEP         3       /* eTSEC1&2 emergency priority (0-3) */
106
107 /* System Clock Configuration Register */
108 #define CFG_SCCR_TSEC1CM        1               /* eTSEC1 clock mode (0-3) */
109 #define CFG_SCCR_TSEC2CM        1               /* eTSEC2 clock mode (0-3) */
110 #define CFG_SCCR_SATACM         SCCR_SATACM_1   /* SATA1-4 clock mode (0-3) */
111
112 /*
113  * System IO Config
114  */
115 #define CFG_SICRH               0x08200000
116 #define CFG_SICRL               0x00000000
117
118 /*
119  * Output Buffer Impedance
120  */
121 #define CFG_OBIR                0x30100000
122
123 /*
124  * IMMR new address
125  */
126 #define CFG_IMMR                0xE0000000
127
128 /*
129  * Device configurations
130  */
131
132 /* Vitesse 7385 */
133
134 #ifdef CONFIG_VSC7385_ENET
135
136 #define CONFIG_TSEC2
137
138 /* The flash address and size of the VSC7385 firmware image */
139 #define CONFIG_VSC7385_IMAGE            0xFE7FE000
140 #define CONFIG_VSC7385_IMAGE_SIZE       8192
141
142 #endif
143
144 /*
145  * DDR Setup
146  */
147 #define CFG_DDR_BASE            0x00000000 /* DDR is system memory */
148 #define CFG_SDRAM_BASE          CFG_DDR_BASE
149 #define CFG_DDR_SDRAM_BASE      CFG_DDR_BASE
150 #define CFG_DDR_SDRAM_CLK_CNTL  0x03000000
151 #define CFG_83XX_DDR_USES_CS0
152
153 #define CFG_DDRCDR_VALUE        (DDRCDR_DHC_EN | DDRCDR_ODT | DDRCDR_Q_DRN)
154
155 #undef CONFIG_DDR_ECC           /* support DDR ECC function */
156 #undef CONFIG_DDR_ECC_CMD       /* Use DDR ECC user commands */
157
158 #undef CONFIG_NEVER_ASSERT_ODT_TO_CPU   /* Never assert ODT to internal IOs */
159
160 /*
161  * Manually set up DDR parameters
162  */
163 #define CFG_DDR_SIZE            256             /* MB */
164 #define CFG_DDR_CS0_BNDS        0x0000000f
165 #define CFG_DDR_CS0_CONFIG      (CSCONFIG_EN | CSCONFIG_ODT_WR_ACS \
166                                 | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10)
167
168 #define CFG_DDR_TIMING_3        0x00000000
169 #define CFG_DDR_TIMING_0        ((0 << TIMING_CFG0_RWT_SHIFT) \
170                                 | (0 << TIMING_CFG0_WRT_SHIFT) \
171                                 | (0 << TIMING_CFG0_RRT_SHIFT) \
172                                 | (0 << TIMING_CFG0_WWT_SHIFT) \
173                                 | (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) \
174                                 | (6 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) \
175                                 | (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) \
176                                 | (2 << TIMING_CFG0_MRS_CYC_SHIFT))
177                                 /* 0x00220802 */
178                                 /* 0x00260802 */ /* DDR400 */
179 #define CFG_DDR_TIMING_1        ((3 << TIMING_CFG1_PRETOACT_SHIFT) \
180                                 | (9 << TIMING_CFG1_ACTTOPRE_SHIFT) \
181                                 | (3 << TIMING_CFG1_ACTTORW_SHIFT) \
182                                 | (7 << TIMING_CFG1_CASLAT_SHIFT) \
183                                 | (13 << TIMING_CFG1_REFREC_SHIFT) \
184                                 | (3 << TIMING_CFG1_WRREC_SHIFT) \
185                                 | (2 << TIMING_CFG1_ACTTOACT_SHIFT) \
186                                 | (2 << TIMING_CFG1_WRTORD_SHIFT))
187                                 /* 0x3935d322 */
188                                 /* 0x3937d322 */
189 #define CFG_DDR_TIMING_2        0x02984cc8
190
191 #define CFG_DDR_INTERVAL        ((1545 << SDRAM_INTERVAL_REFINT_SHIFT) \
192                                 | (256 << SDRAM_INTERVAL_BSTOPRE_SHIFT))
193                                 /* 0x06090100 */
194
195 #if defined(CONFIG_DDR_2T_TIMING)
196 #define CFG_DDR_SDRAM_CFG               (SDRAM_CFG_SREN \
197                                 | 3 << SDRAM_CFG_SDRAM_TYPE_SHIFT \
198                                 | SDRAM_CFG_2T_EN \
199                                 | SDRAM_CFG_DBW_32)
200 #else
201 #define CFG_DDR_SDRAM_CFG               (SDRAM_CFG_SREN \
202                                 | 3 << SDRAM_CFG_SDRAM_TYPE_SHIFT)
203                                 /* 0x43000000 */
204 #endif
205 #define CFG_DDR_SDRAM_CFG2      0x00001000 /* 1 posted refresh */
206 #define CFG_DDR_MODE            ((0x0440 << SDRAM_MODE_ESD_SHIFT) \
207                                 | (0x0442 << SDRAM_MODE_SD_SHIFT))
208                                 /* 0x04400442 */ /* DDR400 */
209 #define CFG_DDR_MODE2           0x00000000;
210
211 /*
212  * Memory test
213  */
214 #undef CFG_DRAM_TEST            /* memory test, takes time */
215 #define CFG_MEMTEST_START       0x00040000 /* memtest region */
216 #define CFG_MEMTEST_END         0x0ef70010
217
218 /*
219  * The reserved memory
220  */
221 #define CFG_MONITOR_BASE        TEXT_BASE /* start of monitor */
222
223 #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
224 #define CFG_RAMBOOT
225 #else
226 #undef  CFG_RAMBOOT
227 #endif
228
229 #define CFG_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
230 #define CFG_MALLOC_LEN          (512 * 1024) /* Reserved for malloc */
231
232 /*
233  * Initial RAM Base Address Setup
234  */
235 #define CFG_INIT_RAM_LOCK       1
236 #define CFG_INIT_RAM_ADDR       0xE6000000 /* Initial RAM address */
237 #define CFG_INIT_RAM_END        0x1000 /* End of used area in RAM */
238 #define CFG_GBL_DATA_SIZE       0x100 /* num bytes initial data */
239 #define CFG_GBL_DATA_OFFSET     (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
240
241 /*
242  * Local Bus Configuration & Clock Setup
243  */
244 #define CFG_LCRR                (LCRR_DBYP | LCRR_CLKDIV_8)
245 #define CFG_LBC_LBCR            0x00000000
246
247 /*
248  * FLASH on the Local Bus
249  */
250 #define CFG_FLASH_CFI           /* use the Common Flash Interface */
251 #define CFG_FLASH_CFI_DRIVER    /* use the CFI driver */
252 #define CFG_FLASH_BASE          0xFE000000 /* FLASH base address */
253 #define CFG_FLASH_SIZE          8 /* max FLASH size is 32M */
254
255 #define CFG_FLASH_EMPTY_INFO                    /* display empty sectors */
256 #define CFG_FLASH_USE_BUFFER_WRITE              /* buffer up multiple bytes */
257
258 #define CFG_LBLAWBAR0_PRELIM    CFG_FLASH_BASE /* Window base at flash base */
259 #define CFG_LBLAWAR0_PRELIM     0x80000016      /* 8 MB window size */
260
261 #define CFG_BR0_PRELIM          (CFG_FLASH_BASE | /* Flash Base address */ \
262                                 (2 << BR_PS_SHIFT) | /* 16 bit port size */ \
263                                 BR_V) /* valid */
264 #define CFG_OR0_PRELIM          (0xFF800000             /* 8 MByte */ \
265                                 | OR_GPCM_XACS \
266                                 | OR_GPCM_SCY_9 \
267                                 | OR_GPCM_EHTR \
268                                 | OR_GPCM_EAD)
269                                 /* 0xFF806FF7   TODO SLOW 8 MB flash size */
270
271 #define CFG_MAX_FLASH_BANKS     1 /* number of banks */
272 #define CFG_MAX_FLASH_SECT      256 /* max sectors per device */
273
274 #undef  CFG_FLASH_CHECKSUM
275 #define CFG_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms) */
276 #define CFG_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */
277
278 /* Vitesse 7385 */
279
280 #define CFG_VSC7385_BASE        0xF0000000
281
282 #ifdef CONFIG_VSC7385_ENET
283
284 #define CFG_BR2_PRELIM          0xf0000801              /* Base address */
285 #define CFG_OR2_PRELIM          0xfffe09ff              /* 128K bytes*/
286 #define CFG_LBLAWBAR2_PRELIM    CFG_VSC7385_BASE        /* Access Base */
287 #define CFG_LBLAWAR2_PRELIM     0x80000010              /* Access Size 128K */
288
289 #endif
290
291 /*
292  * Serial Port
293  */
294 #define CONFIG_CONS_INDEX       1
295 #undef  CONFIG_SERIAL_SOFTWARE_FIFO
296 #define CFG_NS16550
297 #define CFG_NS16550_SERIAL
298 #define CFG_NS16550_REG_SIZE    1
299 #define CFG_NS16550_CLK         get_bus_freq(0)
300
301 #define CFG_BAUDRATE_TABLE \
302         {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
303
304 #define CFG_NS16550_COM1        (CFG_IMMR+0x4500)
305 #define CFG_NS16550_COM2        (CFG_IMMR+0x4600)
306
307 /* Use the HUSH parser */
308 #define CFG_HUSH_PARSER
309 #ifdef  CFG_HUSH_PARSER
310 #define CFG_PROMPT_HUSH_PS2 "> "
311 #endif
312
313 /* Pass open firmware flat tree */
314 #define CONFIG_OF_LIBFDT        1
315 #define CONFIG_OF_BOARD_SETUP   1
316
317 /* I2C */
318 #define CONFIG_HARD_I2C         /* I2C with hardware support */
319 #undef  CONFIG_SOFT_I2C         /* I2C bit-banged */
320 #define CONFIG_FSL_I2C
321 #define CFG_I2C_SPEED           400000 /* I2C speed and slave address */
322 #define CFG_I2C_SLAVE           0x7F
323 #define CFG_I2C_NOPROBES        {0x51} /* Don't probe these addrs */
324 #define CFG_I2C_OFFSET          0x3000
325 #define CFG_I2C2_OFFSET         0x3100
326
327 /*
328  * Config on-board RTC
329  */
330 #define CONFIG_RTC_DS1374       /* use ds1374 rtc via i2c */
331 #define CFG_I2C_RTC_ADDR        0x68 /* at address 0x68 */
332
333 /*
334  * General PCI
335  * Addresses are mapped 1-1.
336  */
337 #define CFG_PCI_MEM_BASE        0x80000000
338 #define CFG_PCI_MEM_PHYS        CFG_PCI_MEM_BASE
339 #define CFG_PCI_MEM_SIZE        0x10000000 /* 256M */
340 #define CFG_PCI_MMIO_BASE       0x90000000
341 #define CFG_PCI_MMIO_PHYS       CFG_PCI_MMIO_BASE
342 #define CFG_PCI_MMIO_SIZE       0x10000000 /* 256M */
343 #define CFG_PCI_IO_BASE         0xE0300000
344 #define CFG_PCI_IO_PHYS         0xE0300000
345 #define CFG_PCI_IO_SIZE         0x100000 /* 1M */
346
347 #define CFG_PCI_SLV_MEM_LOCAL   CFG_SDRAM_BASE
348 #define CFG_PCI_SLV_MEM_BUS     0x00000000
349 #define CFG_PCI_SLV_MEM_SIZE    0x80000000
350
351 #ifdef CONFIG_PCI
352 #define CONFIG_NET_MULTI
353 #define CONFIG_PCI_PNP          /* do pci plug-and-play */
354
355 #undef CONFIG_PCI_SCAN_SHOW     /* show pci devices on startup */
356 #define CFG_PCI_SUBSYS_VENDORID 0x1957  /* Freescale */
357 #endif  /* CONFIG_PCI */
358
359 /*
360  * TSEC
361  */
362 #ifdef CONFIG_TSEC_ENET
363
364 #define CONFIG_NET_MULTI
365 #define CONFIG_GMII                     /* MII PHY management */
366
367 #define CONFIG_TSEC1
368
369 #ifdef CONFIG_TSEC1
370 #define CONFIG_HAS_ETH0
371 #define CONFIG_TSEC1_NAME               "TSEC0"
372 #define CFG_TSEC1_OFFSET                0x24000
373 #define TSEC1_PHY_ADDR                  2
374 #define TSEC1_FLAGS                     (TSEC_GIGABIT | TSEC_REDUCED)
375 #define TSEC1_PHYIDX                    0
376 #endif
377
378 #ifdef CONFIG_TSEC2
379 #define CONFIG_HAS_ETH1
380 #define CONFIG_TSEC2_NAME               "TSEC1"
381 #define CFG_TSEC2_OFFSET                0x25000
382 #define TSEC2_PHY_ADDR                  0x1c
383 #define TSEC2_FLAGS                     (TSEC_GIGABIT | TSEC_REDUCED)
384 #define TSEC2_PHYIDX                    0
385 #endif
386
387 /* Options are: TSEC[0-1] */
388 #define CONFIG_ETHPRIME                 "TSEC0"
389
390 #endif
391
392 /*
393  * Environment
394  */
395 #ifndef CFG_RAMBOOT
396         #define CFG_ENV_IS_IN_FLASH     1
397         #define CFG_ENV_ADDR            (CFG_MONITOR_BASE+CFG_MONITOR_LEN)
398         #define CFG_ENV_SECT_SIZE       0x10000 /* 64K (one sector) for env */
399         #define CFG_ENV_SIZE            0x4000
400 #else
401         #define CFG_NO_FLASH            1       /* Flash is not usable now */
402         #define CFG_ENV_IS_NOWHERE      1       /* Store ENV in memory only */
403         #define CFG_ENV_ADDR            (CFG_MONITOR_BASE-0x1000)
404         #define CFG_ENV_SIZE            0x2000
405 #endif
406
407 #define CONFIG_LOADS_ECHO       1       /* echo on for serial download */
408 #define CFG_LOADS_BAUD_CHANGE   1       /* allow baudrate change */
409
410 /*
411  * BOOTP options
412  */
413 #define CONFIG_BOOTP_BOOTFILESIZE
414 #define CONFIG_BOOTP_BOOTPATH
415 #define CONFIG_BOOTP_GATEWAY
416 #define CONFIG_BOOTP_HOSTNAME
417
418
419 /*
420  * Command line configuration.
421  */
422 #include <config_cmd_default.h>
423
424 #define CONFIG_CMD_PING
425 #define CONFIG_CMD_I2C
426 #define CONFIG_CMD_MII
427 #define CONFIG_CMD_DATE
428
429 #if defined(CONFIG_PCI)
430 #define CONFIG_CMD_PCI
431 #endif
432
433 #if defined(CFG_RAMBOOT)
434 #undef CONFIG_CMD_ENV
435 #undef CONFIG_CMD_LOADS
436 #endif
437
438 #define CONFIG_CMDLINE_EDITING  1       /* add command line history */
439
440 #undef CONFIG_WATCHDOG          /* watchdog disabled */
441
442 /*
443  * Miscellaneous configurable options
444  */
445 #define CFG_LONGHELP            /* undef to save memory */
446 #define CFG_LOAD_ADDR           0x2000000 /* default load address */
447 #define CFG_PROMPT              "=> "   /* Monitor Command Prompt */
448
449 #if defined(CONFIG_CMD_KGDB)
450         #define CFG_CBSIZE      1024 /* Console I/O Buffer Size */
451 #else
452         #define CFG_CBSIZE      256 /* Console I/O Buffer Size */
453 #endif
454
455 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
456 #define CFG_MAXARGS     16              /* max number of command args */
457 #define CFG_BARGSIZE    CFG_CBSIZE      /* Boot Argument Buffer Size */
458 #define CFG_HZ          1000            /* decrementer freq: 1ms ticks */
459
460 /*
461  * For booting Linux, the board info and command line data
462  * have to be in the first 8 MB of memory, since this is
463  * the maximum mapped by the Linux kernel during initialization.
464  */
465 #define CFG_BOOTMAPSZ           (8 << 20) /* Initial Memory map for Linux */
466
467 /*
468  * Core HID Setup
469  */
470 #define CFG_HID0_INIT           0x000000000
471 #define CFG_HID0_FINAL          HID0_ENABLE_MACHINE_CHECK
472 #define CFG_HID2                HID2_HBE
473
474 /*
475  * MMU Setup
476  */
477
478 /* DDR: cache cacheable */
479 #define CFG_SDRAM_LOWER         CFG_SDRAM_BASE
480 #define CFG_SDRAM_UPPER         (CFG_SDRAM_BASE + 0x10000000)
481
482 #define CFG_IBAT0L      (CFG_SDRAM_LOWER | BATL_PP_10 | BATL_MEMCOHERENCE)
483 #define CFG_IBAT0U      (CFG_SDRAM_LOWER | BATU_BL_256M | BATU_VS | BATU_VP)
484 #define CFG_DBAT0L      CFG_IBAT0L
485 #define CFG_DBAT0U      CFG_IBAT0U
486
487 #define CFG_IBAT1L      (CFG_SDRAM_UPPER | BATL_PP_10 | BATL_MEMCOHERENCE)
488 #define CFG_IBAT1U      (CFG_SDRAM_UPPER | BATU_BL_256M | BATU_VS | BATU_VP)
489 #define CFG_DBAT1L      CFG_IBAT1L
490 #define CFG_DBAT1U      CFG_IBAT1U
491
492 /* IMMRBAR, PCI IO and NAND: cache-inhibit and guarded */
493 #define CFG_IBAT2L      (CFG_IMMR | BATL_PP_10 | \
494                         BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
495 #define CFG_IBAT2U      (CFG_IMMR | BATU_BL_8M | BATU_VS | BATU_VP)
496 #define CFG_DBAT2L      CFG_IBAT2L
497 #define CFG_DBAT2U      CFG_IBAT2U
498
499 /* L2 Switch: cache-inhibit and guarded */
500 #define CFG_IBAT3L      (CFG_VSC7385_BASE | BATL_PP_10 | \
501                         BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
502 #define CFG_IBAT3U      (CFG_VSC7385_BASE | BATU_BL_128K | BATU_VS | BATU_VP)
503 #define CFG_DBAT3L      CFG_IBAT3L
504 #define CFG_DBAT3U      CFG_IBAT3U
505
506 /* FLASH: icache cacheable, but dcache-inhibit and guarded */
507 #define CFG_IBAT4L      (CFG_FLASH_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
508 #define CFG_IBAT4U      (CFG_FLASH_BASE | BATU_BL_32M | BATU_VS | BATU_VP)
509 #define CFG_DBAT4L      (CFG_FLASH_BASE | BATL_PP_10 | \
510                         BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
511 #define CFG_DBAT4U      CFG_IBAT4U
512
513 /* Stack in dcache: cacheable, no memory coherence */
514 #define CFG_IBAT5L      (CFG_INIT_RAM_ADDR | BATL_PP_10)
515 #define CFG_IBAT5U      (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP)
516 #define CFG_DBAT5L      CFG_IBAT5L
517 #define CFG_DBAT5U      CFG_IBAT5U
518
519 #ifdef CONFIG_PCI
520 /* PCI MEM space: cacheable */
521 #define CFG_IBAT6L      (CFG_PCI_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE)
522 #define CFG_IBAT6U      (CFG_PCI_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
523 #define CFG_DBAT6L      CFG_IBAT6L
524 #define CFG_DBAT6U      CFG_IBAT6U
525 /* PCI MMIO space: cache-inhibit and guarded */
526 #define CFG_IBAT7L      (CFG_PCI_MMIO_PHYS | BATL_PP_10 | \
527                         BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
528 #define CFG_IBAT7U      (CFG_PCI_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
529 #define CFG_DBAT7L      CFG_IBAT7L
530 #define CFG_DBAT7U      CFG_IBAT7U
531 #else
532 #define CFG_IBAT6L      (0)
533 #define CFG_IBAT6U      (0)
534 #define CFG_IBAT7L      (0)
535 #define CFG_IBAT7U      (0)
536 #define CFG_DBAT6L      CFG_IBAT6L
537 #define CFG_DBAT6U      CFG_IBAT6U
538 #define CFG_DBAT7L      CFG_IBAT7L
539 #define CFG_DBAT7U      CFG_IBAT7U
540 #endif
541
542 /*
543  * Internal Definitions
544  *
545  * Boot Flags
546  */
547 #define BOOTFLAG_COLD   0x01 /* Normal Power-On: Boot from FLASH */
548 #define BOOTFLAG_WARM   0x02 /* Software reboot */
549
550 #if defined(CONFIG_CMD_KGDB)
551 #define CONFIG_KGDB_BAUDRATE    230400  /* speed of kgdb serial port */
552 #define CONFIG_KGDB_SER_INDEX   2       /* which serial port to use */
553 #endif
554
555 /*
556  * Environment Configuration
557  */
558 #define CONFIG_ENV_OVERWRITE
559
560 #ifdef CONFIG_HAS_ETH0
561 #define CONFIG_ETHADDR          00:04:9f:ef:04:01
562 #endif
563
564 #ifdef CONFIG_HAS_ETH1
565 #define CONFIG_ETH1ADDR         00:04:9f:ef:04:02
566 #endif
567
568 #define CONFIG_IPADDR           10.0.0.2
569 #define CONFIG_SERVERIP         10.0.0.1
570 #define CONFIG_GATEWAYIP        10.0.0.1
571 #define CONFIG_NETMASK          255.0.0.0
572 #define CONFIG_NETDEV           eth1
573
574 #define CONFIG_HOSTNAME         mpc837x_rdb
575 #define CONFIG_ROOTPATH         /nfsroot
576 #define CONFIG_RAMDISKFILE      rootfs.ext2.gz.uboot
577 #define CONFIG_BOOTFILE         uImage
578 #define CONFIG_UBOOTPATH        u-boot.bin      /* U-Boot image on TFTP server */
579 #define CONFIG_FDTFILE          mpc8379_rdb.dtb
580
581 #define CONFIG_LOADADDR         200000  /* default location for tftp and bootm */
582 #define CONFIG_BOOTDELAY        -1      /* -1 disables auto-boot */
583 #define CONFIG_BAUDRATE         115200
584
585 #define XMK_STR(x)      #x
586 #define MK_STR(x)       XMK_STR(x)
587
588 #define CONFIG_EXTRA_ENV_SETTINGS \
589         "netdev=" MK_STR(CONFIG_NETDEV) "\0"                            \
590         "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"                          \
591         "tftpflash=tftp $loadaddr $uboot;"                              \
592                 "protect off " MK_STR(TEXT_BASE) " +$filesize; "        \
593                 "erase " MK_STR(TEXT_BASE) " +$filesize; "              \
594                 "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; "      \
595                 "protect on " MK_STR(TEXT_BASE) " +$filesize; "         \
596                 "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0"     \
597         "fdtaddr=400000\0"                                              \
598         "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0"                          \
599         "ramdiskaddr=1000000\0"                                         \
600         "ramdiskfile=" MK_STR(CONFIG_RAMDISKFILE) "\0"                  \
601         "console=ttyS0\0"                                               \
602         "setbootargs=setenv bootargs "                                  \
603                 "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
604         "setipargs=setenv bootargs nfsroot=$serverip:$rootpath "        \
605                 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
606                 "root=$rootdev rw console=$console,$baudrate $othbootargs\0"
607
608 #define CONFIG_NFSBOOTCOMMAND                                           \
609         "setenv rootdev /dev/nfs;"                                      \
610         "run setbootargs;"                                              \
611         "run setipargs;"                                                \
612         "tftp $loadaddr $bootfile;"                                     \
613         "tftp $fdtaddr $fdtfile;"                                       \
614         "bootm $loadaddr - $fdtaddr"
615
616 #define CONFIG_RAMBOOTCOMMAND                                           \
617         "setenv rootdev /dev/ram;"                                      \
618         "run setbootargs;"                                              \
619         "tftp $ramdiskaddr $ramdiskfile;"                               \
620         "tftp $loadaddr $bootfile;"                                     \
621         "tftp $fdtaddr $fdtfile;"                                       \
622         "bootm $loadaddr $ramdiskaddr $fdtaddr"
623
624 #undef MK_STR
625 #undef XMK_STR
626
627 #endif  /* __CONFIG_H */