blob: 5f7c7a8e4f124f57a3631ee71bb6ceddcb66de54 [file] [log] [blame]
wdenke2211742002-11-02 23:30:20 +00001/*
2 * (C) Copyright 2000
3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
5 *
6 * Configuation settings for the MBX8xx board.
7 *
8 * -----------------------------------------------------------------
9 * See file CREDITS for list of people who contributed to this
10 * project.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * MA 02111-1307 USA
26 */
27/*
28 * Changed 2002-10-01
29 * Added PCMCIA defines mostly taken from other U-Boot boards that
30 * have PCMCIA already working. If you find any bugs, incorrect assumptions
31 * feel free to fix them yourself and submit a patch.
32 * Rod Boyce <rod_boyce@stratexnet.com.
33 */
34/*
35 * board/config.h - configuration options, board specific
36 */
37
38#ifndef __CONFIG_H
39#define __CONFIG_H
40
41/*
42 * High Level Configuration Options
43 * (easy to change)
44 */
45
46#define CONFIG_MPC860 1 /* This is a MPC860 CPU */
47#define CONFIG_MBX 1 /* ...on an MBX module */
48
49#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */
50#undef CONFIG_8xx_CONS_SMC2
51#undef CONFIG_8xx_CONS_NONE
52#define CONFIG_BAUDRATE 9600
53/* Define this to use the PCI bus */
54#undef CONFIG_USE_PCI
55
56#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */
57#define CONFIG_8xx_GCLK_FREQ (50000000UL)
58#if 1
59#define CONFIG_BOOTDELAY -1 /* autoboot disabled */
60#else
61#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
62#endif
63#define CONFIG_BOOTCOMMAND "bootm 20000" /* autoboot command */
64
65#define CONFIG_BOOTARGS "root=/dev/nfs rw " \
66 "nfsroot=10.0.0.2:/opt/eldk/ppc_8xx " \
67 "nfsaddrs=10.0.0.99:10.0.0.2"
68
69#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020070#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */
wdenke2211742002-11-02 23:30:20 +000071
72#undef CONFIG_WATCHDOG /* watchdog disabled */
73
Jon Loeliger8353e132007-07-08 14:14:17 -050074
75/*
Jon Loeliger659e2f62007-07-10 09:10:49 -050076 * BOOTP options
77 */
78#define CONFIG_BOOTP_BOOTFILESIZE
79#define CONFIG_BOOTP_BOOTPATH
80#define CONFIG_BOOTP_GATEWAY
81#define CONFIG_BOOTP_HOSTNAME
82
83
84/*
Jon Loeliger8353e132007-07-08 14:14:17 -050085 * Command line configuration.
86 */
87#define CONFIG_CMD_NET
88#define CONFIG_CMD_DFL
89#define CONFIG_CMD_SDRAM
90#define CONFIG_CMD_PCMCIA
91#define CONFIG_CMD_IDE
92
wdenke2211742002-11-02 23:30:20 +000093
94#define CONFIG_DOS_PARTITION
95
wdenke2211742002-11-02 23:30:20 +000096/*
97 * Miscellaneous configurable options
98 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020099#define CONFIG_SYS_LONGHELP /* undef to save memory */
100#define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
101#undef CONFIG_SYS_HUSH_PARSER /* Hush parse for U-Boot */
102#ifdef CONFIG_SYS_HUSH_PARSER
103#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
wdenke2211742002-11-02 23:30:20 +0000104#endif
Jon Loeliger8353e132007-07-08 14:14:17 -0500105#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200106#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
wdenke2211742002-11-02 23:30:20 +0000107#else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200108#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
wdenke2211742002-11-02 23:30:20 +0000109#endif
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200110#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
111#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
112#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
wdenke2211742002-11-02 23:30:20 +0000113
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200114#define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */
115#define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
wdenke2211742002-11-02 23:30:20 +0000116
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200117#define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */
wdenke2211742002-11-02 23:30:20 +0000118
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200119#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
wdenke2211742002-11-02 23:30:20 +0000120
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200121#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
wdenke2211742002-11-02 23:30:20 +0000122
123/*
124 * Low Level Configuration Settings
125 * (address mappings, register initial values, etc.)
126 * You should know what you are doing if you make changes here.
127 */
128
129/*-----------------------------------------------------------------------
130 * Physical memory map as defined by the MBX PGM
131 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200132#define CONFIG_SYS_IMMR 0xFA200000 /* Internal Memory Mapped Register*/
133#define CONFIG_SYS_NVRAM_BASE 0xFA000000 /* NVRAM */
134#define CONFIG_SYS_NVRAM_OR 0xffe00000 /* w/o speed dependent flags!! */
135#define CONFIG_SYS_CSR_BASE 0xFA100000 /* Control/Status Registers */
136#define CONFIG_SYS_PCIMEM_BASE 0x80000000 /* PCI I/O and Memory Spaces */
137#define CONFIG_SYS_PCIMEM_OR 0xA0000108
138#define CONFIG_SYS_PCIBRIDGE_BASE 0xFA210000 /* PCI-Bus Bridge Registers */
139#define CONFIG_SYS_PCIBRIDGE_OR 0xFFFF0108
wdenke2211742002-11-02 23:30:20 +0000140
141/*-----------------------------------------------------------------------
142 * Definitions for initial stack pointer and data area (in DPRAM)
143 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200144#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
145#define CONFIG_SYS_INIT_RAM_END 0x2f00 /* End of used area in DPRAM */
146#define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
147#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
148#define CONFIG_SYS_INIT_VPD_SIZE 256 /* size in bytes reserved for vpd buffer */
149#define CONFIG_SYS_INIT_VPD_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE)
150#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_VPD_OFFSET-8)
wdenke2211742002-11-02 23:30:20 +0000151
152/*-----------------------------------------------------------------------
153 * Offset in DPMEM where we keep the VPD data
154 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200155#define CONFIG_SYS_DPRAMVPD (CONFIG_SYS_INIT_VPD_OFFSET - 0x2000)
wdenke2211742002-11-02 23:30:20 +0000156
157/*-----------------------------------------------------------------------
158 * Start addresses for the final memory configuration
159 * (Set up by the startup code)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200160 * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
wdenke2211742002-11-02 23:30:20 +0000161 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200162#define CONFIG_SYS_SDRAM_BASE 0x00000000
163#define CONFIG_SYS_FLASH_BASE 0xfe000000
wdenke2211742002-11-02 23:30:20 +0000164#ifdef DEBUG
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200165#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
wdenke2211742002-11-02 23:30:20 +0000166#else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200167#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
wdenke2211742002-11-02 23:30:20 +0000168#endif
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200169#undef CONFIG_SYS_MONITOR_BASE /* 0x200000 to run U-Boot from RAM */
170#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
171#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
wdenke2211742002-11-02 23:30:20 +0000172
173/*
174 * For booting Linux, the board info and command line data
175 * have to be in the first 8 MB of memory, since this is
176 * the maximum mapped by the Linux kernel during initialization.
177 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200178#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
wdenke2211742002-11-02 23:30:20 +0000179
180/*-----------------------------------------------------------------------
181 * FLASH organization
182 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200183#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
184#define CONFIG_SYS_MAX_FLASH_SECT 16 /* max number of sectors on one chip */
wdenke2211742002-11-02 23:30:20 +0000185
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200186#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
187#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
wdenke2211742002-11-02 23:30:20 +0000188
189/*-----------------------------------------------------------------------
190 * NVRAM Configuration
191 *
192 * Note: the MBX is special because there is already a firmware on this
193 * board: EPPC-Bug from Motorola. To avoid collisions in NVRAM Usage, we
194 * access the NVRAM at the offset 0x1000.
195 */
Jean-Christophe PLAGNIOL-VILLARD9314cee2008-09-10 22:47:59 +0200196#define CONFIG_ENV_IS_IN_NVRAM 1 /* turn on NVRAM env feature */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200197#define CONFIG_ENV_ADDR (CONFIG_SYS_NVRAM_BASE + 0x1000)
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200198#define CONFIG_ENV_SIZE 0x1000
wdenke2211742002-11-02 23:30:20 +0000199
200/*-----------------------------------------------------------------------
201 * Cache Configuration
202 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200203#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
Jon Loeliger8353e132007-07-08 14:14:17 -0500204#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200205#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */
wdenke2211742002-11-02 23:30:20 +0000206#endif
207
208/*-----------------------------------------------------------------------
209 * SYPCR - System Protection Control 11-9
210 * SYPCR can only be written once after reset!
211 *-----------------------------------------------------------------------
212 * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
213 */
214#if defined(CONFIG_WATCHDOG)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200215#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
wdenke2211742002-11-02 23:30:20 +0000216 SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
217#else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200218#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF)
wdenke2211742002-11-02 23:30:20 +0000219#endif
220
221/*-----------------------------------------------------------------------
222 * SIUMCR - SIU Module Configuration 11-6
223 *-----------------------------------------------------------------------
224 * PCMCIA config., multi-function pin tri-state
225 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200226/* #define CONFIG_SYS_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DPC | SIUMCR_MLRC10 | SIUMCR_SEME) */
227#define CONFIG_SYS_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DPC | SIUMCR_MLRC11 | SIUMCR_SEME | SIUMCR_BSC )
wdenke2211742002-11-02 23:30:20 +0000228
229/*-----------------------------------------------------------------------
230 * TBSCR - Time Base Status and Control 11-26
231 *-----------------------------------------------------------------------
232 * Clear Reference Interrupt Status, Timebase freezing enabled
233 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200234#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
wdenke2211742002-11-02 23:30:20 +0000235
236/*-----------------------------------------------------------------------
237 * PISCR - Periodic Interrupt Status and Control 11-31
238 *-----------------------------------------------------------------------
239 * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
240 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200241#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE)
wdenke2211742002-11-02 23:30:20 +0000242
243/*-----------------------------------------------------------------------
244 * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
245 *-----------------------------------------------------------------------
246 * Reset PLL lock status sticky bit, timer expired status bit and timer
247 * interrupt status bit - leave PLL multiplication factor unchanged !
248 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200249#define CONFIG_SYS_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
wdenke2211742002-11-02 23:30:20 +0000250
251/*-----------------------------------------------------------------------
252 * SCCR - System Clock and reset Control Register 15-27
253 *-----------------------------------------------------------------------
254 * Set clock output, timebase and RTC source and divider,
255 * power management and some other internal clocks
256 */
257#define SCCR_MASK (SCCR_RTDIV | SCCR_RTSEL)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200258#define CONFIG_SYS_SCCR SCCR_TBS
wdenke2211742002-11-02 23:30:20 +0000259
260/*-----------------------------------------------------------------------
261 * PCMCIA stuff
262 *-----------------------------------------------------------------------
263 *
264 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200265#define CONFIG_SYS_PCMCIA_MEM_ADDR (0xE0000000)
266#define CONFIG_SYS_PCMCIA_MEM_SIZE ( 64 << 20 )
267#define CONFIG_SYS_PCMCIA_DMA_ADDR (0xE4000000)
268#define CONFIG_SYS_PCMCIA_DMA_SIZE ( 64 << 20 )
269#define CONFIG_SYS_PCMCIA_ATTRB_ADDR (0xE8000000)
270#define CONFIG_SYS_PCMCIA_ATTRB_SIZE ( 64 << 20 )
271#define CONFIG_SYS_PCMCIA_IO_ADDR (0xEC000000)
272#define CONFIG_SYS_PCMCIA_IO_SIZE ( 64 << 20 )
wdenke2211742002-11-02 23:30:20 +0000273
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200274#define CONFIG_SYS_PCMCIA_INTERRUPT SIU_LEVEL6
wdenke2211742002-11-02 23:30:20 +0000275
276#define CONFIG_PCMCIA_SLOT_A 1
277
278
279/*-----------------------------------------------------------------------
280 * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
281 *-----------------------------------------------------------------------
282 */
283
284#define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */
285
286#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
287#undef CONFIG_IDE_LED /* LED for ide not supported */
288#undef CONFIG_IDE_RESET /* reset for ide not supported */
289
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200290#define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */
291#define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */
wdenke2211742002-11-02 23:30:20 +0000292
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200293#define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
wdenke2211742002-11-02 23:30:20 +0000294
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200295#define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_PCMCIA_MEM_ADDR
wdenke2211742002-11-02 23:30:20 +0000296
297/* Offset for data I/O */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200298#define CONFIG_SYS_ATA_DATA_OFFSET (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
wdenke2211742002-11-02 23:30:20 +0000299
300/* Offset for normal register accesses */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200301#define CONFIG_SYS_ATA_REG_OFFSET (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
wdenke2211742002-11-02 23:30:20 +0000302
303/* Offset for alternate registers */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200304#define CONFIG_SYS_ATA_ALT_OFFSET 0x0100
wdenke2211742002-11-02 23:30:20 +0000305
306/*-----------------------------------------------------------------------
307 * Debug Entry Mode
308 *-----------------------------------------------------------------------
309 *
310 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200311#define CONFIG_SYS_DER 0
wdenke2211742002-11-02 23:30:20 +0000312
313/*
314 * Internal Definitions
315 *
316 * Boot Flags
317 */
318#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
319#define BOOTFLAG_WARM 0x02 /* Software reboot */
320
321#endif /* __CONFIG_H */