blob: 54d55a0a1e425f7030755b731bbf133fd915bfa3 [file] [log] [blame]
wdenkfe8c2802002-11-03 00:38:21 +00001/*
2 * (C) Copyright 2000
3 * Murray Jensen <Murray.Jensen@cmst.csiro.au>
4 *
5 * (C) Copyright 2000
6 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Marius Groeger <mgroeger@sysgo.de>
8 *
9 * (C) Copyright 2001
10 * Advent Networks, Inc. <http://www.adventnetworks.com>
11 * Jay Monkman <jtm@smoothsmoothie.com>
12 *
Paul Gortmakerb4c102b2011-09-17 13:47:47 +000013 * Configuration settings for the SACSng 8260 board.
wdenkfe8c2802002-11-03 00:38:21 +000014 *
15 * See file CREDITS for list of people who contributed to this
16 * project.
17 *
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License as
20 * published by the Free Software Foundation; either version 2 of
21 * the License, or (at your option) any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 * MA 02111-1307 USA
32 */
33
34#ifndef __CONFIG_H
35#define __CONFIG_H
36
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020037#define CONFIG_SYS_TEXT_BASE 0x40000000
38
wdenkfe8c2802002-11-03 00:38:21 +000039#undef DEBUG_BOOTP_EXT /* Debug received vendor fields */
40
wdenk1f197c62003-09-15 18:00:00 +000041#undef CONFIG_LOGBUFFER /* External logbuffer support */
42
wdenkfe8c2802002-11-03 00:38:21 +000043/*****************************************************************************
44 *
45 * These settings must match the way _your_ board is set up
46 *
47 *****************************************************************************/
48
49/* What is the oscillator's (UX2) frequency in Hz? */
50#define CONFIG_8260_CLKIN 66666600
51
52/*-----------------------------------------------------------------------
53 * MODCK_H & MODCLK[1-3] - Ref: Section 9.2 in MPC8206 User Manual
54 *-----------------------------------------------------------------------
55 * What should MODCK_H be? It is dependent on the oscillator
56 * frequency, MODCK[1-3], and desired CPM and core frequencies.
57 * Here are some example values (all frequencies are in MHz):
58 *
59 * MODCK_H MODCK[1-3] Osc CPM Core S2-6 S2-7 S2-8
60 * ------- ---------- --- --- ---- ----- ----- -----
61 * 0x1 0x5 33 100 133 Open Close Open
62 * 0x1 0x6 33 100 166 Open Open Close
63 * 0x1 0x7 33 100 200 Open Open Open
64 *
65 * 0x2 0x2 33 133 133 Close Open Close
66 * 0x2 0x3 33 133 166 Close Open Open
67 * 0x2 0x4 33 133 200 Open Close Close
68 * 0x2 0x5 33 133 233 Open Close Open
69 * 0x2 0x6 33 133 266 Open Open Close
70 *
71 * 0x5 0x5 66 133 133 Open Close Open
72 * 0x5 0x6 66 133 166 Open Open Close
73 * 0x5 0x7 66 133 200 Open Open Open
74 * 0x6 0x0 66 133 233 Close Close Close
75 * 0x6 0x1 66 133 266 Close Close Open
76 * 0x6 0x2 66 133 300 Close Open Close
77 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020078#define CONFIG_SYS_SBC_MODCK_H 0x05
wdenkfe8c2802002-11-03 00:38:21 +000079
80/* Define this if you want to boot from 0x00000100. If you don't define
81 * this, you will need to program the bootloader to 0xfff00000, and
82 * get the hardware reset config words at 0xfe000000. The simplest
83 * way to do that is to program the bootloader at both addresses.
84 * It is suggested that you just let U-Boot live at 0x00000000.
85 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020086#define CONFIG_SYS_SBC_BOOT_LOW 1
wdenkfe8c2802002-11-03 00:38:21 +000087
88/* What should the base address of the main FLASH be and how big is
Wolfgang Denk0708bc62010-10-07 21:51:12 +020089 * it (in MBytes)? This must contain CONFIG_SYS_TEXT_BASE from board/sacsng/config.mk
wdenkfe8c2802002-11-03 00:38:21 +000090 * The main FLASH is whichever is connected to *CS0.
91 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020092#define CONFIG_SYS_FLASH0_BASE 0x40000000
93#define CONFIG_SYS_FLASH0_SIZE 2
wdenkfe8c2802002-11-03 00:38:21 +000094
95/* What should the base address of the secondary FLASH be and how big
96 * is it (in Mbytes)? The secondary FLASH is whichever is connected
97 * to *CS6.
98 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020099#define CONFIG_SYS_FLASH1_BASE 0x60000000
100#define CONFIG_SYS_FLASH1_SIZE 2
wdenkfe8c2802002-11-03 00:38:21 +0000101
102/* Define CONFIG_VERY_BIG_RAM to allow use of SDRAMs larger than 256MBytes
103 */
104#define CONFIG_VERY_BIG_RAM 1
105
106/* What should be the base address of SDRAM DIMM and how big is
107 * it (in Mbytes)? This will normally auto-configure via the SPD.
108*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200109#define CONFIG_SYS_SDRAM0_BASE 0x00000000
110#define CONFIG_SYS_SDRAM0_SIZE 64
wdenkfe8c2802002-11-03 00:38:21 +0000111
112/*
113 * Memory map example with 64 MB DIMM:
114 *
115 * 0x0000 0000 Exception Vector code, 8k
116 * :
117 * 0x0000 1FFF
118 * 0x0000 2000 Free for Application Use
119 * :
120 * :
121 *
122 * :
123 * :
124 * 0x03F5 FF30 Monitor Stack (Growing downward)
125 * Monitor Stack Buffer (0x80)
126 * 0x03F5 FFB0 Board Info Data
127 * 0x03F6 0000 Malloc Arena
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200128 * : CONFIG_ENV_SECT_SIZE, 16k
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200129 * : CONFIG_SYS_MALLOC_LEN, 128k
wdenkfe8c2802002-11-03 00:38:21 +0000130 * 0x03FC 0000 RAM Copy of Monitor Code
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200131 * : CONFIG_SYS_MONITOR_LEN, 256k
132 * 0x03FF FFFF [End of RAM], CONFIG_SYS_SDRAM_SIZE - 1
wdenkfe8c2802002-11-03 00:38:21 +0000133 */
134
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200135#define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \
136 CONFIG_SYS_POST_CPU)
wdenkfe8c2802002-11-03 00:38:21 +0000137
138
139/*
140 * select serial console configuration
141 *
142 * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then
143 * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4
144 * for SCC).
145 *
146 * if CONFIG_CONS_NONE is defined, then the serial console routines must
147 * defined elsewhere.
148 */
149#define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */
150#undef CONFIG_CONS_ON_SCC /* define if console on SCC */
151#undef CONFIG_CONS_NONE /* define if console on neither */
152#define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */
153
154/*
155 * select ethernet configuration
156 *
157 * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then
158 * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3
159 * for FCC)
160 *
161 * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be
Jon Loeliger2517d972007-07-09 17:15:49 -0500162 * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset.
wdenkfe8c2802002-11-03 00:38:21 +0000163 */
164
165#undef CONFIG_ETHER_ON_SCC
166#define CONFIG_ETHER_ON_FCC
167#undef CONFIG_ETHER_NONE /* define if ethernet on neither */
168
169#ifdef CONFIG_ETHER_ON_SCC
170#define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */
171#endif /* CONFIG_ETHER_ON_SCC */
172
173#ifdef CONFIG_ETHER_ON_FCC
174#define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */
wdenk1f197c62003-09-15 18:00:00 +0000175#undef CONFIG_ETHER_LOOPBACK_TEST /* Ethernet external loopback test */
wdenkfe8c2802002-11-03 00:38:21 +0000176#define CONFIG_MII /* MII PHY management */
177#define CONFIG_BITBANGMII /* bit-bang MII PHY management */
178/*
179 * Port pins used for bit-banged MII communictions (if applicable).
180 */
181
182#define MDIO_PORT 2 /* Port A=0, B=1, C=2, D=3 */
Luigi 'Comio' Mantellini25e30722009-10-10 12:42:22 +0200183#define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
184 (immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
185#define MDC_DECLARE MDIO_DECLARE
186
wdenkfe8c2802002-11-03 00:38:21 +0000187#define MDIO_ACTIVE (iop->pdir |= 0x40000000)
188#define MDIO_TRISTATE (iop->pdir &= ~0x40000000)
189#define MDIO_READ ((iop->pdat & 0x40000000) != 0)
190
191#define MDIO(bit) if(bit) iop->pdat |= 0x40000000; \
192 else iop->pdat &= ~0x40000000
193
194#define MDC(bit) if(bit) iop->pdat |= 0x80000000; \
195 else iop->pdat &= ~0x80000000
196
197#define MIIDELAY udelay(50)
198#endif /* CONFIG_ETHER_ON_FCC */
199
200#if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1)
201
202/*
203 * - RX clk is CLK11
204 * - TX clk is CLK12
205 */
Mike Frysinger109de972011-10-17 05:38:58 +0000206# define CONFIG_SYS_CMXSCR_VALUE1 (CMXSCR_RS1CS_CLK11 | CMXSCR_TS1CS_CLK12)
wdenkfe8c2802002-11-03 00:38:21 +0000207
208#elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2)
209
210/*
211 * - Rx-CLK is CLK13
212 * - Tx-CLK is CLK14
213 * - Select bus for bd/buffers (see 28-13)
214 * - Enable Full Duplex in FSMR
215 */
Mike Frysinger109de972011-10-17 05:38:58 +0000216# define CONFIG_SYS_CMXFCR_MASK2 (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK)
217# define CONFIG_SYS_CMXFCR_VALUE2 (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200218# define CONFIG_SYS_CPMFCR_RAMTYPE 0
219# define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB)
wdenkfe8c2802002-11-03 00:38:21 +0000220
221#endif /* CONFIG_ETHER_ON_FCC, CONFIG_ETHER_INDEX */
222
223#define CONFIG_SHOW_BOOT_PROGRESS 1 /* boot progress enabled */
224
225/*
226 * Configure for RAM tests.
227 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200228#undef CONFIG_SYS_DRAM_TEST /* calls other tests in board.c */
wdenkfe8c2802002-11-03 00:38:21 +0000229
230
231/*
232 * Status LED for power up status feedback.
233 */
234#define CONFIG_STATUS_LED 1 /* Status LED enabled */
235
236#define STATUS_LED_PAR im_ioport.iop_ppara
237#define STATUS_LED_DIR im_ioport.iop_pdira
238#define STATUS_LED_ODR im_ioport.iop_podra
239#define STATUS_LED_DAT im_ioport.iop_pdata
240
241#define STATUS_LED_BIT 0x00000800 /* LED 0 is on PA.20 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200242#define STATUS_LED_PERIOD (CONFIG_SYS_HZ)
wdenkfe8c2802002-11-03 00:38:21 +0000243#define STATUS_LED_STATE STATUS_LED_OFF
244#define STATUS_LED_BIT1 0x00001000 /* LED 1 is on PA.19 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200245#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ)
wdenkfe8c2802002-11-03 00:38:21 +0000246#define STATUS_LED_STATE1 STATUS_LED_OFF
247#define STATUS_LED_BIT2 0x00002000 /* LED 2 is on PA.18 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200248#define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ/2)
wdenkfe8c2802002-11-03 00:38:21 +0000249#define STATUS_LED_STATE2 STATUS_LED_ON
250
251#define STATUS_LED_ACTIVE 0 /* LED on for bit == 0 */
252
253#define STATUS_LED_YELLOW 0
254#define STATUS_LED_GREEN 1
255#define STATUS_LED_RED 2
256#define STATUS_LED_BOOT 1
257
258
259/*
wdenk2582f6b2002-11-11 21:14:20 +0000260 * Select SPI support configuration
wdenkfe8c2802002-11-03 00:38:21 +0000261 */
wdenk2582f6b2002-11-11 21:14:20 +0000262#define CONFIG_SOFT_SPI /* Enable SPI driver */
263#define MAX_SPI_BYTES 4 /* Maximum number of bytes we can handle */
wdenk57b2d802003-06-27 21:31:46 +0000264#undef DEBUG_SPI /* Disable SPI debugging */
265
wdenkfe8c2802002-11-03 00:38:21 +0000266/*
267 * Software (bit-bang) SPI driver configuration
268 */
269#ifdef CONFIG_SOFT_SPI
270
271/*
272 * Software (bit-bang) SPI driver configuration
273 */
274#define I2C_SCLK 0x00002000 /* PD 18: Shift clock */
275#define I2C_MOSI 0x00004000 /* PD 17: Master Out, Slave In */
276#define I2C_MISO 0x00008000 /* PD 16: Master In, Slave Out */
277
278#undef SPI_INIT /* no port initialization needed */
279#define SPI_READ ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0)
Wolfgang Denkcb21c0e2008-07-03 22:39:21 +0200280#define SPI_SDA(bit) do { \
281 if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \
282 else immr->im_ioport.iop_pdatd &= ~I2C_MOSI; \
283 } while (0)
284#define SPI_SCL(bit) do { \
285 if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \
286 else immr->im_ioport.iop_pdatd &= ~I2C_SCLK; \
287 } while (0)
wdenk2582f6b2002-11-11 21:14:20 +0000288#define SPI_DELAY /* No delay is needed */
wdenkfe8c2802002-11-03 00:38:21 +0000289#endif /* CONFIG_SOFT_SPI */
290
291
292/*
293 * select I2C support configuration
294 *
295 * Supported configurations are {none, software, hardware} drivers.
296 * If the software driver is chosen, there are some additional
297 * configuration items that the driver uses to drive the port pins.
298 */
299#undef CONFIG_HARD_I2C /* I2C with hardware support */
300#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200301#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
302#define CONFIG_SYS_I2C_SLAVE 0x7F
wdenkfe8c2802002-11-03 00:38:21 +0000303
304/*
305 * Software (bit-bang) I2C driver configuration
306 */
307#ifdef CONFIG_SOFT_I2C
308#define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */
309#define I2C_ACTIVE (iop->pdir |= 0x00010000)
310#define I2C_TRISTATE (iop->pdir &= ~0x00010000)
311#define I2C_READ ((iop->pdat & 0x00010000) != 0)
312#define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \
313 else iop->pdat &= ~0x00010000
314#define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \
315 else iop->pdat &= ~0x00020000
316#define I2C_DELAY udelay(20) /* 1/4 I2C clock duration */
317#endif /* CONFIG_SOFT_I2C */
318
319/* Define this to reserve an entire FLASH sector for
320 * environment variables. Otherwise, the environment will be
321 * put in the same sector as U-Boot, and changing variables
322 * will erase U-Boot temporarily
323 */
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200324#define CONFIG_ENV_IN_OWN_SECT 1
wdenkfe8c2802002-11-03 00:38:21 +0000325
326/* Define this to contain any number of null terminated strings that
327 * will be part of the default enviroment compiled into the boot image.
328 */
329#define CONFIG_EXTRA_ENV_SETTINGS \
wdenk1f197c62003-09-15 18:00:00 +0000330"quiet=0\0" \
331"serverip=192.168.123.205\0" \
wdenkfe8c2802002-11-03 00:38:21 +0000332"ipaddr=192.168.123.203\0" \
333"checkhostname=VR8500\0" \
334"reprog="\
wdenk1f197c62003-09-15 18:00:00 +0000335 "bootp; " \
wdenkfe8c2802002-11-03 00:38:21 +0000336 "tftpboot 0x140000 /bdi2000/u-boot.bin; " \
337 "protect off 60000000 6003FFFF; " \
338 "erase 60000000 6003FFFF; " \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100339 "cp.b 140000 60000000 ${filesize}; " \
wdenkfe8c2802002-11-03 00:38:21 +0000340 "protect on 60000000 6003FFFF\0" \
341"copyenv="\
342 "protect off 60040000 6004FFFF; " \
343 "erase 60040000 6004FFFF; " \
344 "cp.b 40040000 60040000 10000; " \
345 "protect on 60040000 6004FFFF\0" \
346"copyprog="\
347 "protect off 60000000 6003FFFF; " \
348 "erase 60000000 6003FFFF; " \
349 "cp.b 40000000 60000000 40000; " \
350 "protect on 60000000 6003FFFF\0" \
351"zapenv="\
352 "protect off 40040000 4004FFFF; " \
353 "erase 40040000 4004FFFF; " \
354 "protect on 40040000 4004FFFF\0" \
355"zapotherenv="\
356 "protect off 60040000 6004FFFF; " \
357 "erase 60040000 6004FFFF; " \
358 "protect on 60040000 6004FFFF\0" \
359"root-on-initrd="\
360 "setenv bootcmd "\
361 "version\\;" \
362 "echo\\;" \
363 "bootp\\;" \
364 "setenv bootargs root=/dev/ram0 rw quiet " \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100365 "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \
wdenkfe8c2802002-11-03 00:38:21 +0000366 "run boot-hook\\;" \
367 "bootm\0" \
368"root-on-initrd-debug="\
369 "setenv bootcmd "\
370 "version\\;" \
371 "echo\\;" \
372 "bootp\\;" \
373 "setenv bootargs root=/dev/ram0 rw debug " \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100374 "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \
wdenkfe8c2802002-11-03 00:38:21 +0000375 "run debug-hook\\;" \
376 "run boot-hook\\;" \
377 "bootm\0" \
378"root-on-nfs="\
379 "setenv bootcmd "\
380 "version\\;" \
381 "echo\\;" \
382 "bootp\\;" \
383 "setenv bootargs root=/dev/nfs rw quiet " \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100384 "nfsroot=\\${serverip}:\\${rootpath} " \
385 "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \
wdenkfe8c2802002-11-03 00:38:21 +0000386 "run boot-hook\\;" \
387 "bootm\0" \
388"root-on-nfs-debug="\
389 "setenv bootcmd "\
390 "version\\;" \
391 "echo\\;" \
392 "bootp\\;" \
393 "setenv bootargs root=/dev/nfs rw debug " \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100394 "nfsroot=\\${serverip}:\\${rootpath} " \
395 "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \
wdenkfe8c2802002-11-03 00:38:21 +0000396 "run debug-hook\\;" \
397 "run boot-hook\\;" \
398 "bootm\0" \
399"debug-checkout="\
400 "setenv checkhostname;" \
401 "setenv ethaddr 00:09:70:00:00:01;" \
402 "bootp;" \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100403 "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} debug " \
404 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
wdenkfe8c2802002-11-03 00:38:21 +0000405 "run debug-hook;" \
406 "run boot-hook;" \
407 "bootm\0" \
408"debug-hook="\
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100409 "echo ipaddr ${ipaddr};" \
410 "echo serverip ${serverip};" \
411 "echo gatewayip ${gatewayip};" \
412 "echo netmask ${netmask};" \
413 "echo hostname ${hostname}\0" \
wdenkfe8c2802002-11-03 00:38:21 +0000414"ana=run adc ; run dac\0" \
415"adc=run adc-12 ; run adc-34\0" \
Peter Tyser469cde42009-04-18 22:34:03 -0500416"adc-12=echo ### ADC-12 ; i2c md e 81 e\0" \
417"adc-34=echo ### ADC-34 ; i2c md f 81 e\0" \
418"dac=echo ### DAC ; i2c md 11 81 5\0" \
wdenk1f197c62003-09-15 18:00:00 +0000419"boot-hook=echo\0"
wdenkfe8c2802002-11-03 00:38:21 +0000420
421/* What should the console's baud rate be? */
422#define CONFIG_BAUDRATE 9600
423
424/* Ethernet MAC address */
425#define CONFIG_ETHADDR 00:09:70:00:00:00
426
427/* The default Ethernet MAC address can be overwritten just once */
428#ifdef CONFIG_ETHADDR
429#define CONFIG_OVERWRITE_ETHADDR_ONCE 1
430#endif
431
432/*
433 * Define this to do some miscellaneous board-specific initialization.
434 */
435#define CONFIG_MISC_INIT_R
436
437/* Set to a positive value to delay for running BOOTCOMMAND */
438#define CONFIG_BOOTDELAY 1 /* autoboot after 1 second */
439
440/* Be selective on what keys can delay or stop the autoboot process
441 * To stop use: " "
442 */
443#define CONFIG_AUTOBOOT_KEYED
Stefan Roese37628252008-08-06 14:05:38 +0200444#define CONFIG_AUTOBOOT_PROMPT "Autobooting...\n"
wdenkfe8c2802002-11-03 00:38:21 +0000445#define CONFIG_AUTOBOOT_STOP_STR " "
446#undef CONFIG_AUTOBOOT_DELAY_STR
447#define CONFIG_ZERO_BOOTDELAY_CHECK
448#define DEBUG_BOOTKEYS 0
449
450/* Define a command string that is automatically executed when no character
451 * is read on the console interface withing "Boot Delay" after reset.
452 */
Wolfgang Denka1be4762008-05-20 16:00:29 +0200453#undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
wdenkd3602132004-03-25 15:14:43 +0000454#define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
wdenkfe8c2802002-11-03 00:38:21 +0000455
wdenkc35ba4e2004-03-14 22:25:36 +0000456#ifdef CONFIG_BOOT_ROOT_INITRD
wdenkfe8c2802002-11-03 00:38:21 +0000457#define CONFIG_BOOTCOMMAND \
458 "version;" \
459 "echo;" \
460 "bootp;" \
461 "setenv bootargs root=/dev/ram0 rw quiet " \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100462 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
wdenkfe8c2802002-11-03 00:38:21 +0000463 "run boot-hook;" \
464 "bootm"
465#endif /* CONFIG_BOOT_ROOT_INITRD */
466
wdenkc35ba4e2004-03-14 22:25:36 +0000467#ifdef CONFIG_BOOT_ROOT_NFS
wdenkfe8c2802002-11-03 00:38:21 +0000468#define CONFIG_BOOTCOMMAND \
469 "version;" \
470 "echo;" \
471 "bootp;" \
Wolfgang Denk86eb3b72005-11-20 21:40:11 +0100472 "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} quiet " \
473 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
wdenkfe8c2802002-11-03 00:38:21 +0000474 "run boot-hook;" \
475 "bootm"
476#endif /* CONFIG_BOOT_ROOT_NFS */
477
478#define CONFIG_BOOTP_RANDOM_DELAY /* Randomize the BOOTP retry delay */
479
Jon Loeligerc6d535a2007-07-09 21:57:31 -0500480/*
481 * BOOTP options
wdenkfe8c2802002-11-03 00:38:21 +0000482 */
Jon Loeligerc6d535a2007-07-09 21:57:31 -0500483#define CONFIG_BOOTP_SUBNETMASK
484#define CONFIG_BOOTP_GATEWAY
485#define CONFIG_BOOTP_HOSTNAME
486#define CONFIG_BOOTP_BOOTPATH
487#define CONFIG_BOOTP_BOOTFILESIZE
488#define CONFIG_BOOTP_DNS
489#define CONFIG_BOOTP_DNS2
490#define CONFIG_BOOTP_SEND_HOSTNAME
491
wdenkfe8c2802002-11-03 00:38:21 +0000492
493/* undef this to save memory */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200494#define CONFIG_SYS_LONGHELP
wdenkfe8c2802002-11-03 00:38:21 +0000495
496/* Monitor Command Prompt */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200497#define CONFIG_SYS_PROMPT "=> "
wdenkfe8c2802002-11-03 00:38:21 +0000498
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200499#undef CONFIG_SYS_HUSH_PARSER
500#ifdef CONFIG_SYS_HUSH_PARSER
wdenkfe8c2802002-11-03 00:38:21 +0000501#endif
502
wdenk2582f6b2002-11-11 21:14:20 +0000503/* When CONFIG_TIMESTAMP is selected, the timestamp (date and time)
504 * of an image is printed by image commands like bootm or iminfo.
505 */
506#define CONFIG_TIMESTAMP
507
wdenk9c53f402003-10-15 23:53:47 +0000508/* If this variable is defined, an environment variable named "ver"
wdenk1f197c62003-09-15 18:00:00 +0000509 * is created by U-Boot showing the U-Boot version.
510 */
511#define CONFIG_VERSION_VARIABLE
512
Jon Loeliger49851be2007-07-04 22:33:30 -0500513
514/*
515 * Command line configuration.
516 */
517#include <config_cmd_default.h>
518
519#define CONFIG_CMD_ELF
520#define CONFIG_CMD_ASKENV
521#define CONFIG_CMD_I2C
522#define CONFIG_CMD_SPI
523#define CONFIG_CMD_SDRAM
524#define CONFIG_CMD_REGINFO
525#define CONFIG_CMD_IMMAP
526#define CONFIG_CMD_IRQ
527#define CONFIG_CMD_PING
528
529#undef CONFIG_CMD_KGDB
530
wdenkfe8c2802002-11-03 00:38:21 +0000531#ifdef CONFIG_ETHER_ON_FCC
Jon Loeliger49851be2007-07-04 22:33:30 -0500532#define CONFIG_CMD_MII
533#endif
534
wdenkfe8c2802002-11-03 00:38:21 +0000535
536/* Where do the internal registers live? */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200537#define CONFIG_SYS_IMMR 0xF0000000
wdenkfe8c2802002-11-03 00:38:21 +0000538
wdenk1f197c62003-09-15 18:00:00 +0000539#undef CONFIG_WATCHDOG /* disable the watchdog */
540
wdenkfe8c2802002-11-03 00:38:21 +0000541/*****************************************************************************
542 *
543 * You should not have to modify any of the following settings
544 *
545 *****************************************************************************/
546
547#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
wdenkfe8c2802002-11-03 00:38:21 +0000548#define CONFIG_SACSng 1 /* munged for the SACSng */
Jon Loeligerf5ad3782005-07-23 10:37:35 -0500549#define CONFIG_CPM2 1 /* Has a CPM2 */
wdenkfe8c2802002-11-03 00:38:21 +0000550
wdenkfe8c2802002-11-03 00:38:21 +0000551/*
552 * Miscellaneous configurable options
553 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200554#define CONFIG_SYS_BOOTM_HEADER_QUIET 1 /* Suppress the image header dump */
wdenk9c53f402003-10-15 23:53:47 +0000555 /* in the bootm command. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200556#define CONFIG_SYS_BOOTM_PROGESS_QUIET 1 /* Suppress the progress displays, */
wdenk9c53f402003-10-15 23:53:47 +0000557 /* "## <message>" from the bootm cmd */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200558#define CONFIG_SYS_BOOTP_CHECK_HOSTNAME 1 /* If checkhostname environment is */
wdenk9c53f402003-10-15 23:53:47 +0000559 /* defined, then the hostname param */
560 /* validated against checkhostname. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200561#define CONFIG_SYS_BOOTP_RETRY_COUNT 0x40000000 /* # of timeouts before giving up */
562#define CONFIG_SYS_BOOTP_SHORT_RANDOM_DELAY 1 /* Use a short random delay value */
wdenk9c53f402003-10-15 23:53:47 +0000563 /* (limited to maximum of 1024 msec) */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200564#define CONFIG_SYS_CHK_FOR_ABORT_AT_LEAST_ONCE 1
wdenk9c53f402003-10-15 23:53:47 +0000565 /* Check for abort key presses */
566 /* at least once in dependent of the */
567 /* CONFIG_BOOTDELAY value. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200568#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* Don't print console @ startup */
569#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1 /* Echo the inverted Ethernet link */
wdenk9c53f402003-10-15 23:53:47 +0000570 /* state to the fault LED. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200571#define CONFIG_SYS_FAULT_MII_ADDR 0x02 /* MII addr of the PHY to check for */
wdenk9c53f402003-10-15 23:53:47 +0000572 /* the Ethernet link state. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200573#define CONFIG_SYS_STATUS_FLASH_UNTIL_TFTP_OK 1 /* Keeping the status LED flashing */
wdenk9c53f402003-10-15 23:53:47 +0000574 /* until the TFTP is successful. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200575#define CONFIG_SYS_STATUS_OFF_AFTER_NETBOOT 1 /* After a successful netboot, */
wdenk9c53f402003-10-15 23:53:47 +0000576 /* turn off the STATUS LEDs. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200577#define CONFIG_SYS_TFTP_BLINK_STATUS_ON_DATA_IN 1 /* Blink status LED based on */
wdenk9c53f402003-10-15 23:53:47 +0000578 /* incoming data. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200579#define CONFIG_SYS_TFTP_BLOCKS_PER_HASH 100 /* For every XX blocks, output a '#' */
wdenk9c53f402003-10-15 23:53:47 +0000580 /* to signify that tftp is moving. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200581#define CONFIG_SYS_TFTP_HASHES_PER_FLASH 200 /* For every '#' hashes, */
wdenk9c53f402003-10-15 23:53:47 +0000582 /* flash the status LED. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200583#define CONFIG_SYS_TFTP_HASHES_PER_LINE 65 /* Only output XX '#'s per line */
wdenk9c53f402003-10-15 23:53:47 +0000584 /* during the tftp file transfer. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200585#define CONFIG_SYS_TFTP_PROGESS_QUIET 1 /* Suppress the progress displays */
wdenk9c53f402003-10-15 23:53:47 +0000586 /* '#'s from the tftp command. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200587#define CONFIG_SYS_TFTP_STATUS_QUIET 1 /* Suppress the status displays */
wdenk9c53f402003-10-15 23:53:47 +0000588 /* issued during the tftp command. */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200589#define CONFIG_SYS_TFTP_TIMEOUT_COUNT 5 /* How many timeouts TFTP will allow */
wdenk1f197c62003-09-15 18:00:00 +0000590 /* before it gives up. */
591
Jon Loeliger49851be2007-07-04 22:33:30 -0500592#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200593# define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
wdenkfe8c2802002-11-03 00:38:21 +0000594#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200595# define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
wdenkfe8c2802002-11-03 00:38:21 +0000596#endif
597
598/* Print Buffer Size */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200599#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT)+16)
wdenkfe8c2802002-11-03 00:38:21 +0000600
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200601#define CONFIG_SYS_MAXARGS 32 /* max number of command args */
wdenkfe8c2802002-11-03 00:38:21 +0000602
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200603#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
wdenkfe8c2802002-11-03 00:38:21 +0000604
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200605#define CONFIG_SYS_LOAD_ADDR 0x400000 /* default load address */
606#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
wdenkfe8c2802002-11-03 00:38:21 +0000607
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200608#define CONFIG_SYS_ALT_MEMTEST /* Select full-featured memory test */
609#define CONFIG_SYS_MEMTEST_START 0x2000 /* memtest works from the end of */
wdenkfe8c2802002-11-03 00:38:21 +0000610 /* the exception vector table */
611 /* to the end of the DRAM */
612 /* less monitor and malloc area */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200613#define CONFIG_SYS_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */
614#define CONFIG_SYS_MEM_END_USAGE ( CONFIG_SYS_MONITOR_LEN \
615 + CONFIG_SYS_MALLOC_LEN \
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200616 + CONFIG_ENV_SECT_SIZE \
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200617 + CONFIG_SYS_STACK_USAGE )
wdenkfe8c2802002-11-03 00:38:21 +0000618
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200619#define CONFIG_SYS_MEMTEST_END ( CONFIG_SYS_SDRAM_SIZE * 1024 * 1024 \
620 - CONFIG_SYS_MEM_END_USAGE )
wdenkfe8c2802002-11-03 00:38:21 +0000621
wdenkfe8c2802002-11-03 00:38:21 +0000622/*
623 * Low Level Configuration Settings
624 * (address mappings, register initial values, etc.)
625 * You should know what you are doing if you make changes here.
626 */
627
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200628#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH0_BASE
629#define CONFIG_SYS_FLASH_SIZE CONFIG_SYS_FLASH0_SIZE
630#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_SDRAM0_BASE
631#define CONFIG_SYS_SDRAM_SIZE CONFIG_SYS_SDRAM0_SIZE
wdenkfe8c2802002-11-03 00:38:21 +0000632
633/*-----------------------------------------------------------------------
634 * Hard Reset Configuration Words
635 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200636#if defined(CONFIG_SYS_SBC_BOOT_LOW)
637# define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
wdenkfe8c2802002-11-03 00:38:21 +0000638#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200639# define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (0)
640#endif /* defined(CONFIG_SYS_SBC_BOOT_LOW) */
wdenkfe8c2802002-11-03 00:38:21 +0000641
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200642/* get the HRCW ISB field from CONFIG_SYS_IMMR */
643#define CONFIG_SYS_SBC_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) | \
644 ((CONFIG_SYS_IMMR & 0x01000000) >> 7) | \
645 ((CONFIG_SYS_IMMR & 0x00100000) >> 4) )
wdenkfe8c2802002-11-03 00:38:21 +0000646
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200647#define CONFIG_SYS_HRCW_MASTER ( HRCW_BPS10 | \
wdenkfe8c2802002-11-03 00:38:21 +0000648 HRCW_DPPC11 | \
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200649 CONFIG_SYS_SBC_HRCW_IMMR | \
wdenkfe8c2802002-11-03 00:38:21 +0000650 HRCW_MMR00 | \
651 HRCW_LBPC11 | \
652 HRCW_APPC10 | \
653 HRCW_CS10PC00 | \
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200654 (CONFIG_SYS_SBC_MODCK_H & HRCW_MODCK_H1111) | \
655 CONFIG_SYS_SBC_HRCW_BOOT_FLAGS )
wdenkfe8c2802002-11-03 00:38:21 +0000656
657/* no slaves */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200658#define CONFIG_SYS_HRCW_SLAVE1 0
659#define CONFIG_SYS_HRCW_SLAVE2 0
660#define CONFIG_SYS_HRCW_SLAVE3 0
661#define CONFIG_SYS_HRCW_SLAVE4 0
662#define CONFIG_SYS_HRCW_SLAVE5 0
663#define CONFIG_SYS_HRCW_SLAVE6 0
664#define CONFIG_SYS_HRCW_SLAVE7 0
wdenkfe8c2802002-11-03 00:38:21 +0000665
666/*-----------------------------------------------------------------------
667 * Definitions for initial stack pointer and data area (in DPRAM)
668 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200669#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
Wolfgang Denk1c2e98e2010-10-26 13:32:32 +0200670#define CONFIG_SYS_INIT_RAM_SIZE 0x4000 /* Size of used area in DPRAM */
Wolfgang Denk0191e472010-10-26 14:34:52 +0200671#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200672#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
wdenkfe8c2802002-11-03 00:38:21 +0000673
674/*-----------------------------------------------------------------------
675 * Start addresses for the final memory configuration
676 * (Set up by the startup code)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200677 * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
678 * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependent.
wdenkfe8c2802002-11-03 00:38:21 +0000679 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200680#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH0_BASE
wdenkfe8c2802002-11-03 00:38:21 +0000681
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200682#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
683# define CONFIG_SYS_RAMBOOT
wdenkfe8c2802002-11-03 00:38:21 +0000684#endif
685
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200686#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
687#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
wdenkfe8c2802002-11-03 00:38:21 +0000688
689/*
690 * For booting Linux, the board info and command line data
691 * have to be in the first 8 MB of memory, since this is
692 * the maximum mapped by the Linux kernel during initialization.
693 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200694#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
wdenkfe8c2802002-11-03 00:38:21 +0000695
696/*-----------------------------------------------------------------------
697 * FLASH and environment organization
698 */
699
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200700#define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */
701#undef CONFIG_SYS_FLASH_PROTECTION /* use hardware protection */
702#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */
703#define CONFIG_SYS_MAX_FLASH_SECT (64+4) /* max number of sectors on one chip */
wdenkfe8c2802002-11-03 00:38:21 +0000704
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200705#define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */
706#define CONFIG_SYS_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */
wdenkfe8c2802002-11-03 00:38:21 +0000707
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200708#ifndef CONFIG_SYS_RAMBOOT
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200709# define CONFIG_ENV_IS_IN_FLASH 1
wdenkfe8c2802002-11-03 00:38:21 +0000710
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200711# ifdef CONFIG_ENV_IN_OWN_SECT
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200712# define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200713# define CONFIG_ENV_SECT_SIZE 0x10000
wdenkfe8c2802002-11-03 00:38:21 +0000714# else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200715# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SECT_SIZE)
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200716# define CONFIG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
717# define CONFIG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */
718# endif /* CONFIG_ENV_IN_OWN_SECT */
wdenkfe8c2802002-11-03 00:38:21 +0000719
720#else
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +0200721# define CONFIG_ENV_IS_IN_NVRAM 1
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200722# define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200723# define CONFIG_ENV_SIZE 0x200
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200724#endif /* CONFIG_SYS_RAMBOOT */
wdenkfe8c2802002-11-03 00:38:21 +0000725
726/*-----------------------------------------------------------------------
727 * Cache Configuration
728 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200729#define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */
wdenkfe8c2802002-11-03 00:38:21 +0000730
Jon Loeliger49851be2007-07-04 22:33:30 -0500731#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200732# define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */
wdenkfe8c2802002-11-03 00:38:21 +0000733#endif
734
735/*-----------------------------------------------------------------------
736 * HIDx - Hardware Implementation-dependent Registers 2-11
737 *-----------------------------------------------------------------------
738 * HID0 also contains cache control - initially enable both caches and
739 * invalidate contents, then the final state leaves only the instruction
740 * cache enabled. Note that Power-On and Hard reset invalidate the caches,
741 * but Soft reset does not.
742 *
743 * HID1 has only read-only information - nothing to set.
744 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200745#define CONFIG_SYS_HID0_INIT (HID0_ICE |\
wdenkfe8c2802002-11-03 00:38:21 +0000746 HID0_DCE |\
747 HID0_ICFI |\
748 HID0_DCI |\
749 HID0_IFEM |\
750 HID0_ABE)
751
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200752#define CONFIG_SYS_HID0_FINAL (HID0_ICE |\
wdenkfe8c2802002-11-03 00:38:21 +0000753 HID0_IFEM |\
754 HID0_ABE |\
755 HID0_EMCP)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200756#define CONFIG_SYS_HID2 0
wdenkfe8c2802002-11-03 00:38:21 +0000757
758/*-----------------------------------------------------------------------
759 * RMR - Reset Mode Register
760 *-----------------------------------------------------------------------
761 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200762#define CONFIG_SYS_RMR 0
wdenkfe8c2802002-11-03 00:38:21 +0000763
764/*-----------------------------------------------------------------------
765 * BCR - Bus Configuration 4-25
766 *-----------------------------------------------------------------------
767 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200768#define CONFIG_SYS_BCR (BCR_ETM)
wdenkfe8c2802002-11-03 00:38:21 +0000769
770/*-----------------------------------------------------------------------
771 * SIUMCR - SIU Module Configuration 4-31
772 *-----------------------------------------------------------------------
773 */
774
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200775#define CONFIG_SYS_SIUMCR (SIUMCR_DPPC11 |\
wdenkfe8c2802002-11-03 00:38:21 +0000776 SIUMCR_L2CPC00 |\
777 SIUMCR_APPC10 |\
778 SIUMCR_MMR00)
779
780
781/*-----------------------------------------------------------------------
782 * SYPCR - System Protection Control 11-9
783 * SYPCR can only be written once after reset!
784 *-----------------------------------------------------------------------
785 * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
786 */
wdenk1f197c62003-09-15 18:00:00 +0000787#if defined(CONFIG_WATCHDOG)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200788#define CONFIG_SYS_SYPCR (SYPCR_SWTC |\
wdenk1f197c62003-09-15 18:00:00 +0000789 SYPCR_BMT |\
790 SYPCR_PBME |\
791 SYPCR_LBME |\
792 SYPCR_SWRI |\
793 SYPCR_SWP |\
wdenk9c53f402003-10-15 23:53:47 +0000794 SYPCR_SWE)
wdenk1f197c62003-09-15 18:00:00 +0000795#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200796#define CONFIG_SYS_SYPCR (SYPCR_SWTC |\
wdenkfe8c2802002-11-03 00:38:21 +0000797 SYPCR_BMT |\
798 SYPCR_PBME |\
799 SYPCR_LBME |\
800 SYPCR_SWRI |\
801 SYPCR_SWP)
wdenk1f197c62003-09-15 18:00:00 +0000802#endif /* CONFIG_WATCHDOG */
wdenkfe8c2802002-11-03 00:38:21 +0000803
804/*-----------------------------------------------------------------------
805 * TMCNTSC - Time Counter Status and Control 4-40
806 *-----------------------------------------------------------------------
807 * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
808 * and enable Time Counter
809 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200810#define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC |\
wdenkfe8c2802002-11-03 00:38:21 +0000811 TMCNTSC_ALR |\
812 TMCNTSC_TCF |\
813 TMCNTSC_TCE)
814
815/*-----------------------------------------------------------------------
816 * PISCR - Periodic Interrupt Status and Control 4-42
817 *-----------------------------------------------------------------------
818 * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
819 * Periodic timer
820 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200821#define CONFIG_SYS_PISCR (PISCR_PS |\
wdenkfe8c2802002-11-03 00:38:21 +0000822 PISCR_PTF |\
823 PISCR_PTE)
824
825/*-----------------------------------------------------------------------
826 * SCCR - System Clock Control 9-8
827 *-----------------------------------------------------------------------
828 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200829#define CONFIG_SYS_SCCR 0
wdenkfe8c2802002-11-03 00:38:21 +0000830
831/*-----------------------------------------------------------------------
832 * RCCR - RISC Controller Configuration 13-7
833 *-----------------------------------------------------------------------
834 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200835#define CONFIG_SYS_RCCR 0
wdenkfe8c2802002-11-03 00:38:21 +0000836
837/*
838 * Initialize Memory Controller:
839 *
840 * Bank Bus Machine PortSz Device
841 * ---- --- ------- ------ ------
842 * 0 60x GPCM 16 bit FLASH (primary flash - 2MB)
843 * 1 60x GPCM -- bit (Unused)
844 * 2 60x SDRAM 64 bit SDRAM (DIMM)
845 * 3 60x SDRAM 64 bit SDRAM (DIMM)
846 * 4 60x GPCM -- bit (Unused)
847 * 5 60x GPCM -- bit (Unused)
848 * 6 60x GPCM 16 bit FLASH (secondary flash - 2MB)
849 */
850
851/*-----------------------------------------------------------------------
852 * BR0,BR1 - Base Register
853 * Ref: Section 10.3.1 on page 10-14
854 * OR0,OR1 - Option Register
855 * Ref: Section 10.3.2 on page 10-18
856 *-----------------------------------------------------------------------
857 */
858
859/* Bank 0 - Primary FLASH
860 */
861
862/* BR0 is configured as follows:
863 *
864 * - Base address of 0x40000000
865 * - 16 bit port size
866 * - Data errors checking is disabled
867 * - Read and write access
868 * - GPCM 60x bus
869 * - Access are handled by the memory controller according to MSEL
870 * - Not used for atomic operations
871 * - No data pipelining is done
872 * - Valid
873 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200874#define CONFIG_SYS_BR0_PRELIM ((CONFIG_SYS_FLASH0_BASE & BRx_BA_MSK) |\
wdenkfe8c2802002-11-03 00:38:21 +0000875 BRx_PS_16 |\
876 BRx_MS_GPCM_P |\
877 BRx_V)
878
879/* OR0 is configured as follows:
880 *
881 * - 4 MB
882 * - *BCTL0 is asserted upon access to the current memory bank
883 * - *CW / *WE are negated a quarter of a clock earlier
884 * - *CS is output at the same time as the address lines
885 * - Uses a clock cycle length of 5
886 * - *PSDVAL is generated internally by the memory controller
887 * unless *GTA is asserted earlier externally.
888 * - Relaxed timing is generated by the GPCM for accesses
889 * initiated to this memory region.
890 * - One idle clock is inserted between a read access from the
891 * current bank and the next access.
892 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200893#define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH0_SIZE) |\
wdenkfe8c2802002-11-03 00:38:21 +0000894 ORxG_CSNT |\
895 ORxG_ACS_DIV1 |\
896 ORxG_SCY_5_CLK |\
897 ORxG_TRLX |\
898 ORxG_EHTR)
899
900/*-----------------------------------------------------------------------
901 * BR2,BR3 - Base Register
902 * Ref: Section 10.3.1 on page 10-14
903 * OR2,OR3 - Option Register
904 * Ref: Section 10.3.2 on page 10-16
905 *-----------------------------------------------------------------------
906 */
907
908/* Bank 2,3 - SDRAM DIMM
909 */
910
911/* The BR2 is configured as follows:
912 *
913 * - Base address of 0x00000000
914 * - 64 bit port size (60x bus only)
915 * - Data errors checking is disabled
916 * - Read and write access
917 * - SDRAM 60x bus
918 * - Access are handled by the memory controller according to MSEL
919 * - Not used for atomic operations
920 * - No data pipelining is done
921 * - Valid
922 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200923#define CONFIG_SYS_BR2_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\
wdenkfe8c2802002-11-03 00:38:21 +0000924 BRx_PS_64 |\
925 BRx_MS_SDRAM_P |\
926 BRx_V)
927
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200928#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\
wdenkfe8c2802002-11-03 00:38:21 +0000929 BRx_PS_64 |\
930 BRx_MS_SDRAM_P |\
931 BRx_V)
932
933/* With a 64 MB DIMM, the OR2 is configured as follows:
934 *
935 * - 64 MB
936 * - 4 internal banks per device
937 * - Row start address bit is A8 with PSDMR[PBI] = 0
938 * - 12 row address lines
939 * - Back-to-back page mode
940 * - Internal bank interleaving within save device enabled
941 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200942#if (CONFIG_SYS_SDRAM0_SIZE == 64)
943#define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM0_SIZE) |\
wdenkfe8c2802002-11-03 00:38:21 +0000944 ORxS_BPD_4 |\
945 ORxS_ROWST_PBI0_A8 |\
946 ORxS_NUMR_12)
947#else
948#error "INVALID SDRAM CONFIGURATION"
949#endif
950
951/*-----------------------------------------------------------------------
952 * PSDMR - 60x Bus SDRAM Mode Register
953 * Ref: Section 10.3.3 on page 10-21
954 *-----------------------------------------------------------------------
955 */
956
957/* Address that the DIMM SPD memory lives at.
958 */
959#define SDRAM_SPD_ADDR 0x50
960
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200961#if (CONFIG_SYS_SDRAM0_SIZE == 64)
wdenkfe8c2802002-11-03 00:38:21 +0000962/* With a 64 MB DIMM, the PSDMR is configured as follows:
963 *
964 * - Bank Based Interleaving,
965 * - Refresh Enable,
966 * - Address Multiplexing where A5 is output on A14 pin
967 * (A6 on A15, and so on),
968 * - use address pins A14-A16 as bank select,
969 * - A9 is output on SDA10 during an ACTIVATE command,
970 * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
971 * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
972 * is 3 clocks,
973 * - earliest timing for READ/WRITE command after ACTIVATE command is
974 * 2 clocks,
975 * - earliest timing for PRECHARGE after last data was read is 1 clock,
976 * - earliest timing for PRECHARGE after last data was written is 1 clock,
977 * - CAS Latency is 2.
978 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200979#define CONFIG_SYS_PSDMR (PSDMR_RFEN |\
wdenkfe8c2802002-11-03 00:38:21 +0000980 PSDMR_SDAM_A14_IS_A5 |\
981 PSDMR_BSMA_A14_A16 |\
982 PSDMR_SDA10_PBI0_A9 |\
983 PSDMR_RFRC_7_CLK |\
984 PSDMR_PRETOACT_3W |\
985 PSDMR_ACTTORW_2W |\
986 PSDMR_LDOTOPRE_1C |\
987 PSDMR_WRC_1C |\
988 PSDMR_CL_2)
989#else
990#error "INVALID SDRAM CONFIGURATION"
991#endif
992
993/*
994 * Shoot for approximately 1MHz on the prescaler.
995 */
996#if (CONFIG_8260_CLKIN >= (60 * 1000 * 1000))
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200997#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV64
wdenkfe8c2802002-11-03 00:38:21 +0000998#elif (CONFIG_8260_CLKIN >= (30 * 1000 * 1000))
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200999#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32
wdenkfe8c2802002-11-03 00:38:21 +00001000#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +02001001#warning "Unconfigured bus clock freq: check CONFIG_SYS_MPTPR and CONFIG_SYS_PSRT are OK"
1002#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32
wdenkfe8c2802002-11-03 00:38:21 +00001003#endif
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +02001004#define CONFIG_SYS_PSRT 14
wdenkfe8c2802002-11-03 00:38:21 +00001005
1006
1007/*-----------------------------------------------------------------------
1008 * BR6 - Base Register
1009 * Ref: Section 10.3.1 on page 10-14
1010 * OR6 - Option Register
1011 * Ref: Section 10.3.2 on page 10-18
1012 *-----------------------------------------------------------------------
1013 */
1014
1015/* Bank 6 - Secondary FLASH
1016 *
1017 * The secondary FLASH is connected to *CS6
1018 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +02001019#if (defined(CONFIG_SYS_FLASH1_BASE) && defined(CONFIG_SYS_FLASH1_SIZE))
wdenkfe8c2802002-11-03 00:38:21 +00001020
1021/* BR6 is configured as follows:
1022 *
1023 * - Base address of 0x60000000
1024 * - 16 bit port size
1025 * - Data errors checking is disabled
1026 * - Read and write access
1027 * - GPCM 60x bus
1028 * - Access are handled by the memory controller according to MSEL
1029 * - Not used for atomic operations
1030 * - No data pipelining is done
1031 * - Valid
1032 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +02001033# define CONFIG_SYS_BR6_PRELIM ((CONFIG_SYS_FLASH1_BASE & BRx_BA_MSK) |\
wdenkfe8c2802002-11-03 00:38:21 +00001034 BRx_PS_16 |\
1035 BRx_MS_GPCM_P |\
1036 BRx_V)
1037
1038/* OR6 is configured as follows:
1039 *
1040 * - 2 MB
1041 * - *BCTL0 is asserted upon access to the current memory bank
1042 * - *CW / *WE are negated a quarter of a clock earlier
1043 * - *CS is output at the same time as the address lines
1044 * - Uses a clock cycle length of 5
1045 * - *PSDVAL is generated internally by the memory controller
1046 * unless *GTA is asserted earlier externally.
1047 * - Relaxed timing is generated by the GPCM for accesses
1048 * initiated to this memory region.
1049 * - One idle clock is inserted between a read access from the
1050 * current bank and the next access.
1051 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +02001052# define CONFIG_SYS_OR6_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH1_SIZE) |\
wdenkfe8c2802002-11-03 00:38:21 +00001053 ORxG_CSNT |\
1054 ORxG_ACS_DIV1 |\
1055 ORxG_SCY_5_CLK |\
1056 ORxG_TRLX |\
1057 ORxG_EHTR)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +02001058#endif /* (defined(CONFIG_SYS_FLASH1_BASE) && defined(CONFIG_SYS_FLASH1_SIZE)) */
wdenkfe8c2802002-11-03 00:38:21 +00001059
wdenkfe8c2802002-11-03 00:38:21 +00001060#endif /* __CONFIG_H */