]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/TQM85xx.h
TQM8548: PCI express support
[karo-tx-uboot.git] / include / configs / TQM85xx.h
1 /*
2  * (C) Copyright 2007
3  * Thomas Waehner, TQ-System GmbH, thomas.waehner@tqs.de.
4  *
5  * (C) Copyright 2005
6  * Stefan Roese, DENX Software Engineering, sr@denx.de.
7  *
8  * Wolfgang Denk <wd@denx.de>
9  * Copyright 2004 Freescale Semiconductor.
10  * (C) Copyright 2002,2003 Motorola,Inc.
11  * Xianghua Xiao <X.Xiao@motorola.com>
12  *
13  * See file CREDITS for list of people who contributed to this
14  * project.
15  *
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License as
18  * published by the Free Software Foundation; either version 2 of
19  * the License, or (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, write to the Free Software
28  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29  * MA 02111-1307 USA
30  */
31
32 /*
33  * TQM85xx (8560/40/55/41/48) board configuration file
34  */
35
36 #ifndef __CONFIG_H
37 #define __CONFIG_H
38
39 /* High Level Configuration Options */
40 #define CONFIG_BOOKE            1       /* BOOKE                        */
41 #define CONFIG_E500             1       /* BOOKE e500 family            */
42 #define CONFIG_MPC85xx          1       /* MPC8540/60/55/41             */
43
44 #define CONFIG_PCI
45 #define CONFIG_FSL_PCI_INIT     1       /* Use common FSL init code     */
46 #define CONFIG_PCIX_CHECK               /* PCIX olny works at 66 MHz    */
47 #ifdef CONFIG_TQM8548
48 #define CONFIG_PCI1
49 #define CONFIG_PCIE1
50 #define CONFIG_FSL_PCIE_RESET   1       /* need PCIe reset errata       */
51 #endif
52
53 #define CONFIG_TSEC_ENET                /* tsec ethernet support        */
54
55 #define CONFIG_MISC_INIT_R      1       /* Call misc_init_r             */
56
57 /*
58  * MPC8540 and MPC8548 don't have CPM module
59  */
60 #if !defined(CONFIG_MPC8540) && !defined(CONFIG_MPC8548)
61 #define CONFIG_CPM2             1       /* has CPM2                     */
62 #endif
63
64 #define CONFIG_FSL_LAW          1       /* Use common FSL init code     */
65
66 #undef  CONFIG_CAN_DRIVER               /* CAN Driver support           */
67
68 /*
69  * sysclk for MPC85xx
70  *
71  * Two valid values are:
72  *    33333333
73  *    66666666
74  *
75  * Most PCI cards are still 33Mhz, so in the presence of PCI, 33MHz
76  * is likely the desired value here, so that is now the default.
77  * The board, however, can run at 66MHz.  In any event, this value
78  * must match the settings of some switches.  Details can be found
79  * in the README.mpc85xxads.
80  */
81
82 #ifndef CONFIG_SYS_CLK_FREQ
83 #define CONFIG_SYS_CLK_FREQ     33333333
84 #endif
85
86 /*
87  * These can be toggled for performance analysis, otherwise use default.
88  */
89 #define CONFIG_L2_CACHE                 /* toggle L2 cache              */
90 #define CONFIG_BTB                      /* toggle branch predition      */
91 #define CONFIG_ADDR_STREAMING           /* toggle addr streaming        */
92
93 #define CFG_INIT_DBCR DBCR_IDM          /* Enable Debug Exceptions      */
94
95 #undef  CFG_DRAM_TEST                   /* memory test, takes time      */
96 #define CFG_MEMTEST_START       0x00000000
97 #define CFG_MEMTEST_END         0x10000000
98
99 /*
100  * Base addresses -- Note these are effective addresses where the
101  * actual resources get mapped (not physical addresses)
102  */
103 #define CFG_CCSRBAR_DEFAULT     0xFF700000      /* CCSRBAR Default      */
104 #define CFG_CCSRBAR             0xE0000000      /* relocated CCSRBAR    */
105 #define CFG_CCSRBAR_PHYS        CFG_CCSRBAR     /* physical addr of CCSRBAR */
106 #define CFG_IMMR                CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
107
108 #define CFG_PCI1_ADDR           (CFG_CCSRBAR + 0x8000)
109 #define CFG_PCI2_ADDR           (CFG_CCSRBAR + 0x9000)
110 #define CFG_PCIE1_ADDR          (CFG_CCSRBAR + 0xa000)
111
112 /*
113  * DDR Setup
114  */
115 #define CFG_DDR_SDRAM_BASE      0x00000000      /* DDR is system memory */
116 #define CFG_SDRAM_BASE          CFG_DDR_SDRAM_BASE
117
118 #if defined(CONFIG_TQM8540) || defined(CONFIG_TQM8560)
119 /* TQM8540 & 8560 need DLL-override */
120 #define CONFIG_DDR_DLL                          /* DLL fix needed       */
121 #define CONFIG_DDR_DEFAULT_CL   25              /* CAS latency 2,5      */
122 #endif /* CONFIG_TQM8540 || CONFIG_TQM8560 */
123
124 #if defined(CONFIG_TQM8541) || defined(CONFIG_TQM8555) || \
125     defined(CONFIG_TQM8548)
126 #define CONFIG_DDR_DEFAULT_CL   30              /* CAS latency 3        */
127 #endif /* CONFIG_TQM8541 || CONFIG_TQM8555 || CONFIG_TQM8548 */
128
129 /*
130  * Old TQM85xx boards have 'M' type Spansion Flashes from the S29GLxxxM
131  * series while new boards have 'N' type Flashes from the S29GLxxxN
132  * series, which have bigger sectors: 2 x 128 instead of 2 x 64 KB.
133  */
134 #ifdef CONFIG_TQM8548
135 #define CONFIG_TQM_FLASH_N_TYPE
136 #endif /* CONFIG_TQM8548 */
137
138 /*
139  * Flash on the Local Bus
140  */
141 #define CFG_FLASH0              0xFC000000
142 #define CFG_FLASH1              0xF8000000
143 #define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }
144
145 #define CFG_LBC_FLASH_BASE      CFG_FLASH1      /* Localbus flash start */
146 #define CFG_FLASH_BASE          CFG_LBC_FLASH_BASE  /* start of FLASH   */
147
148 /* Default ORx timings are for <= 41.7 MHz Local Bus Clock.
149  *
150  * Note: According to timing specifications external addr latch delay
151  * (EAD, bit #0) must be set if Local Bus Clock is > 83 MHz.
152  *
153  * For other Local Bus Clocks see following table:
154  *
155  * Clock/MHz   CFG_ORx_PRELIM
156  * 166         0x.....CA5
157  * 133         0x.....C85
158  * 100         0x.....C65
159  *  83         0x.....FA2
160  *  66         0x.....C82
161  *  50         0x.....C60
162  *  42         0x.....040
163  *  33         0x.....030
164  *  25         0x.....020
165  *
166  */
167 #define CFG_BR0_PRELIM          0xfc001801      /* port size 32bit      */
168 #define CFG_OR0_PRELIM          0xfc000040      /* 64MB Flash           */
169 #define CFG_BR1_PRELIM          0xf8001801      /* port size 32bit      */
170 #define CFG_OR1_PRELIM          0xfc000040      /* 64MB Flash           */
171
172 #define CFG_FLASH_CFI                   /* flash is CFI compat.         */
173 #define CFG_FLASH_CFI_DRIVER            /* Use common CFI driver        */
174 #define CFG_FLASH_EMPTY_INFO            /* print 'E' for empty sector   */
175 #define CFG_FLASH_QUIET_TEST    1       /* don't warn upon unknown flash*/
176 #define CFG_FLASH_USE_BUFFER_WRITE      1 /* speed up output to Flash   */
177
178 #define CFG_MAX_FLASH_BANKS     2       /* number of banks              */
179 #define CFG_MAX_FLASH_SECT      512     /* sectors per device           */
180 #undef  CFG_FLASH_CHECKSUM
181 #define CFG_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms)     */
182 #define CFG_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms)     */
183
184 #define CFG_MONITOR_BASE        TEXT_BASE       /* start of monitor     */
185
186 /*
187  * Note: when changing the Local Bus clock divider you have to
188  * change the timing values in CFG_ORx_PRELIM.
189  *
190  * LCRR[00:03] CLKDIV: System (CCB) clock divider. Valid values are 2, 4, 8.
191  * LCRR[16:17] EADC  : External address delay cycles. It should be set to 2
192  *                     for Local Bus Clock > 83.3 MHz.
193  */
194 #define CFG_LBC_LCRR            0x00030008      /* LB clock ratio reg   */
195 #define CFG_LBC_LBCR            0x00000000      /* LB config reg        */
196 #define CFG_LBC_LSRT            0x20000000      /* LB sdram refresh timer */
197 #define CFG_LBC_MRTPR           0x20000000      /* LB refresh timer presc.*/
198
199 #define CONFIG_L1_INIT_RAM
200 #define CFG_INIT_RAM_LOCK       1
201 #define CFG_INIT_RAM_ADDR       0xe4010000      /* Initial RAM address  */
202 #define CFG_INIT_RAM_END        0x4000          /* End used area in RAM */
203
204 #define CFG_GBL_DATA_SIZE       128     /* num bytes initial data       */
205 #define CFG_GBL_DATA_OFFSET     (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
206 #define CFG_INIT_SP_OFFSET      CFG_GBL_DATA_OFFSET
207
208 #define CFG_MONITOR_LEN         (256 * 1024)    /* Reserve 256kB for Mon */
209 #define CFG_MALLOC_LEN          (256 * 1024)    /* Reserved for malloc  */
210
211 /* Serial Port */
212 #if defined(CONFIG_TQM8560)
213
214 #define CONFIG_CONS_ON_SCC      /* define if console on SCC             */
215 #undef  CONFIG_CONS_NONE        /* define if console on something else  */
216 #define CONFIG_CONS_INDEX       1 /* which serial channel for console   */
217
218 #else /* !CONFIG_TQM8560 */
219
220 #define CONFIG_CONS_INDEX     1
221 #undef  CONFIG_SERIAL_SOFTWARE_FIFO
222 #define CFG_NS16550
223 #define CFG_NS16550_SERIAL
224 #define CFG_NS16550_REG_SIZE    1
225 #define CFG_NS16550_CLK         get_bus_freq(0)
226
227 #define CFG_NS16550_COM1        (CFG_CCSRBAR+0x4500)
228 #define CFG_NS16550_COM2        (CFG_CCSRBAR+0x4600)
229
230 /* PS/2 Keyboard */
231 #define CONFIG_PS2KBD                   /* AT-PS/2 Keyboard             */
232 #define CONFIG_PS2MULT                  /* .. on PS/2 Multiplexer       */
233 #define CONFIG_PS2SERIAL        2       /* .. on DUART2                 */
234 #define CONFIG_PS2MULT_DELAY    (CFG_HZ/2)      /* Initial delay        */
235 #define CONFIG_BOARD_EARLY_INIT_R       1
236
237 #endif /* CONFIG_TQM8560 */
238
239 #define CONFIG_BAUDRATE         115200
240
241 #define CFG_BAUDRATE_TABLE      \
242         {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
243
244 #define CONFIG_CMDLINE_EDITING  1       /* add command line history     */
245 #define CFG_HUSH_PARSER         1       /* Use the HUSH parser          */
246 #ifdef  CFG_HUSH_PARSER
247 #define CFG_PROMPT_HUSH_PS2     "> "
248 #endif
249
250 /* pass open firmware flat tree */
251 #define CONFIG_OF_LIBFDT                1
252 #define CONFIG_OF_BOARD_SETUP           1
253 #define CONFIG_OF_STDOUT_VIA_ALIAS      1
254
255 /* CAN */
256 #ifdef CONFIG_CAN_DRIVER
257 #define CFG_CAN_BASE            0xE3000000      /* CAN base address     */
258 #define CFG_CAN_OR_AM           0xFFFF8000      /* 32 KiB address mask  */
259 #define CFG_OR2_CAN             (CFG_CAN_OR_AM | OR_UPM_BI)
260 #define CFG_BR2_CAN             ((CFG_CAN_BASE & BR_BA) | \
261                                  BR_PS_8 | BR_MS_UPMC | BR_V)
262 #endif /* CONFIG_CAN_DRIVER */
263
264 /*
265  * I2C
266  */
267 #define CONFIG_FSL_I2C                  /* Use FSL common I2C driver    */
268 #define CONFIG_HARD_I2C                 /* I2C with hardware support    */
269 #undef  CONFIG_SOFT_I2C                 /* I2C bit-banged               */
270 #define CFG_I2C_SPEED           400000  /* I2C speed and slave address  */
271 #define CFG_I2C_SLAVE           0x7F
272 #define CFG_I2C_NOPROBES        {0x48}  /* Don't probe these addrs      */
273 #define CFG_I2C_OFFSET          0x3000
274
275 /* I2C RTC */
276 #define CONFIG_RTC_DS1337               /* Use ds1337 rtc via i2c       */
277 #define CFG_I2C_RTC_ADDR        0x68    /* at address 0x68              */
278
279 /* I2C EEPROM */
280 /*
281  * EEPROM configuration for onboard EEPROM M24C32 (M24C64 should work also).
282  */
283 #define CFG_I2C_EEPROM_ADDR             0x50    /* 1010000x             */
284 #define CFG_I2C_EEPROM_ADDR_LEN         2
285 #define CFG_EEPROM_PAGE_WRITE_BITS      5       /* =32 Bytes per write  */
286 #define CFG_EEPROM_PAGE_WRITE_ENABLE
287 #define CFG_EEPROM_PAGE_WRITE_DELAY_MS  20
288 #define CFG_I2C_MULTI_EEPROMS           1       /* more than one eeprom */
289
290 /* I2C SYSMON (LM75) */
291 #define CONFIG_DTT_LM75         1               /* ON Semi's LM75       */
292 #define CONFIG_DTT_SENSORS      {0}             /* Sensor addresses     */
293 #define CFG_DTT_MAX_TEMP        70
294 #define CFG_DTT_LOW_TEMP        -30
295 #define CFG_DTT_HYSTERESIS      3
296
297 #ifndef CONFIG_PCIE1
298 /* RapidIO MMU */
299 #define CFG_RIO_MEM_BASE        0xc0000000      /* base address         */
300 #define CFG_RIO_MEM_PHYS        CFG_RIO_MEM_BASE
301 #define CFG_RIO_MEM_SIZE        0x20000000      /* 512M                 */
302 #endif /* CONFIG_PCIE1 */
303
304 /*
305  * General PCI
306  * Addresses are mapped 1-1.
307  */
308 #define CFG_PCI1_MEM_BASE       0x80000000
309 #define CFG_PCI1_MEM_PHYS       CFG_PCI1_MEM_BASE
310 #define CFG_PCI1_MEM_SIZE       0x20000000      /* 512M                 */
311 #define CFG_PCI1_IO_BASE        0xe2000000
312 #define CFG_PCI1_IO_PHYS        CFG_PCI1_IO_BASE
313 #define CFG_PCI1_IO_SIZE        0x1000000       /*  16M                 */
314
315 /* PCI view of System Memory */
316 #define CFG_PCI_MEMORY_BUS      0x00000000
317 #define CFG_PCI_MEMORY_PHYS     0x00000000
318 #define CFG_PCI_MEMORY_SIZE     0x80000000
319
320 #ifdef CONFIG_PCIE1
321 /*
322  * General PCI express
323  * Addresses are mapped 1-1.
324  */
325 #define CFG_PCIE1_MEM_BASE      0xc0000000
326 #define CFG_PCIE1_MEM_PHYS      CFG_PCIE1_MEM_BASE
327 #define CFG_PCIE1_MEM_SIZE      0x20000000      /* 512M                 */
328 #define CFG_PCIE1_IO_BASE       0xef000000
329 #define CFG_PCIE1_IO_PHYS       CFG_PCIE1_IO_BASE
330 #define CFG_PCIE1_IO_SIZE       0x1000000       /* 16M                  */
331
332 #endif /* CONFIG_PCIE1 */
333
334 #if defined(CONFIG_PCI)
335
336 #define CONFIG_PCI_PNP                  /* do pci plug-and-play         */
337
338 #define CONFIG_EEPRO100
339 #undef CONFIG_TULIP
340
341 #undef CONFIG_PCI_SCAN_SHOW             /* show pci devices on startup  */
342 #define CFG_PCI_SUBSYS_VENDORID 0x1057  /* Motorola                     */
343
344 #endif /* CONFIG_PCI */
345
346 #define CONFIG_NET_MULTI        1
347
348 #define CONFIG_MII              1       /* MII PHY management           */
349 #define CONFIG_TSEC1    1
350 #define CONFIG_TSEC1_NAME       "TSEC0"
351 #define CONFIG_TSEC2    1
352 #define CONFIG_TSEC2_NAME       "TSEC1"
353 #define TSEC1_PHY_ADDR          2
354 #define TSEC2_PHY_ADDR          1
355 #define TSEC1_PHYIDX            0
356 #define TSEC2_PHYIDX            0
357 #define TSEC1_FLAGS             TSEC_GIGABIT
358 #define TSEC2_FLAGS             TSEC_GIGABIT
359 #define FEC_PHY_ADDR            3
360 #define FEC_PHYIDX              0
361 #define FEC_FLAGS               0
362 #define CONFIG_HAS_ETH0
363 #define CONFIG_HAS_ETH1
364 #define CONFIG_HAS_ETH2
365
366 #ifdef CONFIG_TQM8548
367 /*
368  * TQM8548 has 4 ethernet ports. 4 ETSEC's.
369  *
370  * On the STK85xx Starterkit the ETSEC3/4 ports are on an
371  * additional adapter (AIO) between module and Starterkit.
372  */
373 #define CONFIG_TSEC3    1
374 #define CONFIG_TSEC3_NAME       "TSEC2"
375 #define CONFIG_TSEC4    1
376 #define CONFIG_TSEC4_NAME       "TSEC3"
377 #define TSEC3_PHY_ADDR          4
378 #define TSEC4_PHY_ADDR          5
379 #define TSEC3_PHYIDX            0
380 #define TSEC4_PHYIDX            0
381 #define TSEC3_FLAGS             (TSEC_GIGABIT | TSEC_REDUCED)
382 #define TSEC4_FLAGS             (TSEC_GIGABIT | TSEC_REDUCED)
383 #define CONFIG_HAS_ETH3
384 #define CONFIG_HAS_ETH4
385 #endif  /* CONFIG_TQM8548 */
386
387 /* Options are TSEC[0-1], FEC */
388 #define CONFIG_ETHPRIME         "TSEC0"
389
390 #if defined(CONFIG_TQM8540)
391 /*
392  * TQM8540 has 3 ethernet ports. 2 TSEC's and one FEC.
393  * The FEC port is connected on the same signals as the FCC3 port
394  * of the TQM8560 to the baseboard (STK85xx Starterkit).
395  *
396  * On the STK85xx Starterkit the X47/X50 jumper has to be set to
397  * a - d (X50.2 - 3) to enable the FEC port.
398  */
399 #define CONFIG_MPC85XX_FEC      1
400 #define CONFIG_MPC85XX_FEC_NAME "FEC"
401 #endif
402
403 #if defined(CONFIG_TQM8541) || defined(CONFIG_TQM8555)
404 /*
405  * TQM8541/55 have 4 ethernet ports. 2 TSEC's and 2 FCC's. Only one FCC port
406  * can be used at once, since only one FCC port is available on the STK85xx
407  * Starterkit.
408  *
409  * To use this port you have to configure U-Boot to use the FCC port 1...2
410  * and set the X47/X50 jumper to:
411  * FCC1: a - b (X47.2 - X50.2)
412  * FCC2: a - c (X50.2 - 1)
413  */
414 #define CONFIG_ETHER_ON_FCC
415 #define CONFIG_ETHER_INDEX    1 /* FCC channel for ethernet     */
416 #endif
417
418 #if defined(CONFIG_TQM8560)
419 /*
420  * TQM8560 has 5 ethernet ports. 2 TSEC's and 3 FCC's. Only one FCC port
421  * can be used at once, since only one FCC port is available on the STK85xx
422  * Starterkit.
423  *
424  * To use this port you have to configure U-Boot to use the FCC port 1...3
425  * and set the X47/X50 jumper to:
426  * FCC1: a - b (X47.2 - X50.2)
427  * FCC2: a - c (X50.2 - 1)
428  * FCC3: a - d (X50.2 - 3)
429  */
430 #define CONFIG_ETHER_ON_FCC
431 #define CONFIG_ETHER_INDEX    3 /* FCC channel for ethernet     */
432 #endif
433
434 #if defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 1)
435 #define CONFIG_ETHER_ON_FCC1
436 #define CFG_CMXFCR_MASK1        (CMXFCR_FC1 | CMXFCR_RF1CS_MSK | \
437                                  CMXFCR_TF1CS_MSK)
438 #define CFG_CMXFCR_VALUE1       (CMXFCR_RF1CS_CLK11 | CMXFCR_TF1CS_CLK12)
439 #define CFG_CPMFCR_RAMTYPE      0
440 #define CFG_FCC_PSMR            (FCC_PSMR_FDE | FCC_PSMR_LPB)
441 #endif
442
443 #if defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2)
444 #define CONFIG_ETHER_ON_FCC2
445 #define CFG_CMXFCR_MASK2        (CMXFCR_FC2 | CMXFCR_RF2CS_MSK | \
446                                  CMXFCR_TF2CS_MSK)
447 #define CFG_CMXFCR_VALUE2       (CMXFCR_RF2CS_CLK16 | CMXFCR_TF2CS_CLK13)
448 #define CFG_CPMFCR_RAMTYPE      0
449 #define CFG_FCC_PSMR            (FCC_PSMR_FDE | FCC_PSMR_LPB)
450 #endif
451
452 #if defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 3)
453 #define CONFIG_ETHER_ON_FCC3
454 #define CFG_CMXFCR_MASK3        (CMXFCR_FC3 | CMXFCR_RF3CS_MSK | \
455                                  CMXFCR_TF3CS_MSK)
456 #define CFG_CMXFCR_VALUE3       (CMXFCR_RF3CS_CLK15 | CMXFCR_TF3CS_CLK14)
457 #define CFG_CPMFCR_RAMTYPE      0
458 #define CFG_FCC_PSMR            (FCC_PSMR_FDE | FCC_PSMR_LPB)
459 #endif
460
461 /*
462  * Environment
463  */
464 #define CFG_ENV_IS_IN_FLASH     1
465
466 #ifdef CONFIG_TQM_FLASH_N_TYPE
467 #define CFG_ENV_SECT_SIZE       0x40000 /* 256K (one sector) for env    */
468 #else /* !CONFIG_TQM_FLASH_N_TYPE */
469 #define CFG_ENV_SECT_SIZE       0x20000 /* 128K (one sector) for env    */
470 #endif /* CONFIG_TQM_FLASH_N_TYPE */
471 #define CFG_ENV_ADDR            (CFG_MONITOR_BASE - CFG_ENV_SECT_SIZE)
472 #define CFG_ENV_SIZE            0x2000
473 #define CFG_ENV_ADDR_REDUND     (CFG_ENV_ADDR - CFG_ENV_SECT_SIZE)
474 #define CFG_ENV_SIZE_REDUND     (CFG_ENV_SIZE)
475
476 #define CONFIG_LOADS_ECHO       1       /* echo on for serial download  */
477 #define CFG_LOADS_BAUD_CHANGE   1       /* allow baudrate change        */
478
479 #define CONFIG_TIMESTAMP        /* Print image info with ts     */
480
481 /*
482  * BOOTP options
483  */
484 #define CONFIG_BOOTP_BOOTFILESIZE
485 #define CONFIG_BOOTP_BOOTPATH
486 #define CONFIG_BOOTP_GATEWAY
487 #define CONFIG_BOOTP_HOSTNAME
488
489 /*
490  * Command line configuration.
491  */
492 #include <config_cmd_default.h>
493
494 #define CONFIG_CMD_PING
495 #define CONFIG_CMD_I2C
496 #define CONFIG_CMD_DHCP
497 #define CONFIG_CMD_NFS
498 #define CONFIG_CMD_SNTP
499 #define CONFIG_CMD_DATE
500 #define CONFIG_CMD_EEPROM
501 #define CONFIG_CMD_DTT
502 #define CONFIG_CMD_MII
503
504 #if defined(CONFIG_PCI)
505 #define CONFIG_CMD_PCI
506 #endif
507
508 #undef CONFIG_WATCHDOG                  /* watchdog disabled            */
509
510 /*
511  * Miscellaneous configurable options
512  */
513 #define CFG_LONGHELP                    /* undef to save memory         */
514 #define CFG_LOAD_ADDR   0x2000000       /* default load address         */
515 #define CFG_PROMPT      "=> "           /* Monitor Command Prompt       */
516
517 #if defined(CONFIG_CMD_KGDB)
518 #define CFG_CBSIZE      1024            /* Console I/O Buffer Size      */
519 #else
520 #define CFG_CBSIZE      256             /* Console I/O Buffer Size      */
521 #endif
522
523 #define CFG_PBSIZE      (CFG_CBSIZE + \
524                          sizeof(CFG_PROMPT) + 16)   /* Print Buf Size   */
525 #define CFG_MAXARGS     16              /* max number of command args   */
526 #define CFG_BARGSIZE    CFG_CBSIZE      /* Boot Argument Buffer Size    */
527 #define CFG_HZ          1000            /* decrementer freq: 1ms ticks  */
528
529 /*
530  * For booting Linux, the board info and command line data
531  * have to be in the first 8 MB of memory, since this is
532  * the maximum mapped by the Linux kernel during initialization.
533  */
534 #define CFG_BOOTMAPSZ   (8 << 20)       /* Initial Memory map for Linux */
535
536 /*
537  * Internal Definitions
538  *
539  * Boot Flags
540  */
541 #define BOOTFLAG_COLD   0x01            /* Power-On: Boot from FLASH    */
542 #define BOOTFLAG_WARM   0x02            /* Software reboot              */
543
544 #if defined(CONFIG_CMD_KGDB)
545 #define CONFIG_KGDB_BAUDRATE    230400  /* speed to run kgdb serial port*/
546 #define CONFIG_KGDB_SER_INDEX   2       /* which serial port to use     */
547 #endif
548
549 #define CONFIG_LOADADDR  200000         /* default addr for tftp & bootm*/
550
551 #define CONFIG_BOOTDELAY 5              /* -1 disables auto-boot        */
552
553 #define CONFIG_PREBOOT  "echo;" \
554         "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
555         "echo"
556
557 #undef  CONFIG_BOOTARGS         /* the boot command will set bootargs   */
558
559
560 /*
561  * Setup some board specific values for the default environment variables
562  */
563 #ifdef CONFIG_CPM2
564 #define CFG_ENV_CONSDEV         "consdev=ttyCPM0\0"
565 #else
566 #define CFG_ENV_CONSDEV         "consdev=ttyS0\0"
567 #endif
568 #define CFG_ENV_FDT_FILE        "fdt_file="MK_STR(CONFIG_HOSTNAME)"/" \
569                                 MK_STR(CONFIG_HOSTNAME)".dtb\0"
570 #define CFG_ENV_BOOTFILE        "bootfile="MK_STR(CONFIG_HOSTNAME)"/uImage\0"
571 #define CFG_ENV_UBOOT           "uboot="MK_STR(CONFIG_HOSTNAME)"/u-boot.bin\0" \
572                                 "uboot_addr="MK_STR(TEXT_BASE)"\0"
573
574 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
575         CFG_ENV_BOOTFILE                                                \
576         CFG_ENV_FDT_FILE                                                \
577         CFG_ENV_CONSDEV                                                 \
578         "netdev=eth0\0"                                                 \
579         "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
580                 "nfsroot=$serverip:$rootpath\0"                         \
581         "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
582         "addip=setenv bootargs $bootargs "                              \
583                 "ip=$ipaddr:$serverip:$gatewayip:$netmask"              \
584                 ":$hostname:$netdev:off panic=1\0"                      \
585         "addcons=setenv bootargs $bootargs "                            \
586                 "console=$consdev,$baudrate\0"                          \
587         "flash_nfs=run nfsargs addip addcons;"                          \
588                 "bootm $kernel_addr - $fdt_addr\0"                      \
589         "flash_self=run ramargs addip addcons;"                         \
590                 "bootm $kernel_addr $ramdisk_addr $fdt_addr\0"          \
591         "net_nfs=tftp $kernel_addr_r $bootfile;"                        \
592                 "tftp $fdt_addr_r $fdt_file;"                           \
593                 "run nfsargs addip addcons;"                            \
594                 "bootm $kernel_addr_r - $fdt_addr_r\0"                  \
595         "rootpath=/opt/eldk/ppc_85xx\0"                                 \
596         "fdt_addr_r=900000\0"                                           \
597         "kernel_addr_r=1000000\0"                                       \
598         "fdt_addr=ffec0000\0"                                           \
599         "kernel_addr=ffd00000\0"                                        \
600         "ramdisk_addr=ff800000\0"                                       \
601         CFG_ENV_UBOOT                                                   \
602         "load=tftp 100000 $uboot\0"                                     \
603         "update=protect off $uboot_addr +$filesize;"                    \
604                 "erase $uboot_addr +$filesize;"                         \
605                 "cp.b 100000 $uboot_addr $filesize;"                    \
606                 "setenv filesize;saveenv\0"                             \
607         "upd=run load update\0"                                         \
608         ""
609 #define CONFIG_BOOTCOMMAND      "run flash_self"
610
611 #endif /* __CONFIG_H */