blob: 6c9e392c36b86db744bc9c10bc115df812cb53f0 [file] [log] [blame]
wdenke2211742002-11-02 23:30:20 +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 * Configuation settings for the R&S Protocol Board board.
10 *
11 * See file CREDITS for list of people who contributed to this
12 * project.
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 * MA 02111-1307 USA
28 */
29
30#ifndef __CONFIG_H
31#define __CONFIG_H
32
33/*
34 * High Level Configuration Options
35 * (easy to change)
36 */
37
38#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
39#define CONFIG_RSD_PROTO 1 /* on a R&S Protocol Board */
Jon Loeliger9c4c5ae2005-07-23 10:37:35 -050040#define CONFIG_CPM2 1 /* Has a CPM2 */
wdenke2211742002-11-02 23:30:20 +000041
wdenkc837dcb2004-01-20 23:12:12 +000042#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */
43
wdenke2211742002-11-02 23:30:20 +000044/*
45 * select serial console configuration
46 *
47 * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then
48 * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4
49 * for SCC).
50 *
51 * if CONFIG_CONS_NONE is defined, then the serial console routines must
52 * defined elsewhere.
53 */
54#undef CONFIG_CONS_ON_SMC /* define if console on SMC */
55#define CONFIG_CONS_ON_SCC /* define if console on SCC */
56#undef CONFIG_CONS_NONE /* define if console on neither */
57#define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */
58
59/*
60 * select ethernet configuration
61 *
62 * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then
63 * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3
64 * for FCC)
65 *
66 * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be
67 * defined elsewhere (as for the console), or CFG_CMD_NET must be removed
68 * from CONFIG_COMMANDS to remove support for networking.
69 */
70#undef CONFIG_ETHER_ON_SCC /* define if ethernet on SCC */
71#define CONFIG_ETHER_ON_FCC /* define if ethernet on FCC */
72#undef CONFIG_ETHER_NONE /* define if ethernet on neither */
73#define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */
74
75#if (CONFIG_ETHER_INDEX == 2)
76
77/*
78 * - Rx-CLK is CLK13
79 * - Tx-CLK is CLK14
80 * - Select bus for bd/buffers (see 28-13)
81 * - Enable Full Duplex in FSMR
82 */
83# define CFG_CMXFCR_MASK (CMXFCR_FC2 | CMXFCR_RF2CS_MSK | CMXFCR_TF2CS_MSK)
84# define CFG_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13 | CMXFCR_TF2CS_CLK14)
85# define CFG_CPMFCR_RAMTYPE (0)
86# define CFG_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB)
87
88#endif /* CONFIG_ETHER_INDEX */
89
90
91/* allow to overwrite serial and ethaddr */
92#define CONFIG_ENV_OVERWRITE
93
94/* enable I2C */
95#define CONFIG_HARD_I2C 1 /* I2C with hardware support */
96#define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
97#define CFG_I2C_SLAVE 0x7F
98
99
100/* system clock rate (CLKIN) - equal to the 60x and local bus speed */
101#define CONFIG_8260_CLKIN 50000000 /* in Hz */
102
103#define CONFIG_BAUDRATE 115200
104
105#define CONFIG_COMMANDS (CONFIG_CMD_DFL & ~CFG_CMD_KGDB)
106
107/* Define this if you want to boot from 0x00000100. If you don't define
108 * this, you will need to program the bootloader to 0xfff00000, and
109 * get the hardware reset config words at 0xfe000000. The simplest
110 * way to do that is to program the bootloader at both addresses.
111 * It is suggested that you just let U-Boot live at 0x00000000.
112 */
113#define CFG_RSD_BOOT_LOW 1
114
115/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
116#include <cmd_confdefs.h>
117
118#define CONFIG_BOOTDELAY 5
119#define CONFIG_BOOTARGS "devfs=mount root=ramfs"
120#define CONFIG_ETHADDR 08:00:3e:26:0a:5a
121#define CONFIG_NETMASK 255.255.0.0
122
123#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
124#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
125#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
126#endif
127
128/*
129 * Miscellaneous configurable options
130 */
131#define CFG_LONGHELP /* undef to save memory */
132#define CFG_PROMPT "=> " /* Monitor Command Prompt */
133#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
134#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
135#else
136#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
137#endif
138#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
139#define CFG_MAXARGS 16 /* max number of command args */
140#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
141
142#define CFG_MEMTEST_START 0x00400000 /* memtest works on */
143#define CFG_MEMTEST_END 0x01c00000 /* 4 ... 28 MB in DRAM */
144
145#define CFG_LOAD_ADDR 0x100000 /* default load address */
146
147#define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
148
149 /* valid baudrates */
150#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
151
152/*
153 * Low Level Configuration Settings
154 * (address mappings, register initial values, etc.)
155 * You should know what you are doing if you make changes here.
156 */
157
158/*-----------------------------------------------------------------------
159 * Physical Memory Map
160 */
161#define PHYS_SDRAM_60X 0x00000000 /* SDRAM (60x Bus) */
162#define PHYS_SDRAM_60X_SIZE 0x08000000 /* 128 MB */
163
164#define PHYS_SDRAM_LOCAL 0x40000000 /* SDRAM (Local Bus) */
165#define PHYS_SDRAM_LOCAL_SIZE 0x04000000 /* 64 MB */
166
167#define PHYS_DPRAM_PCI 0xE8000000 /* DPRAM PPC/PCI */
168#define PHYS_DPRAM_PCI_SIZE 0x00020000 /* 128 KB */
169
170/*#define PHYS_DPRAM_PCI_SEM 0x04020000 / * DPRAM PPC/PCI Semaphore */
171/*#define PHYS_DPRAM_PCI_SEM_SIZE 0x00000001 / * 1 Byte */
172
173#define PHYS_DPRAM_SHARC 0xE8100000 /* DPRAM PPC/Sharc */
174#define PHYS_DPRAM_SHARC_SIZE 0x00040000 /* 256 KB */
175
176/*#define PHYS_DPRAM_SHARC_SEM 0x04140000 / * DPRAM PPC/Sharc Semaphore */
177/*#define PHYS_DPRAM_SHARC_SEM_SIZE 0x00000001 / * 1 Byte */
178
179#define PHYS_VIRTEX_REGISTER 0xE8300000 /* FPGA implemented register */
180#define PHYS_VIRTEX_REGISTER_SIZE 0x00000100
181
182#define PHYS_USB 0x04200000 /* USB Controller (60x Bus) */
183#define PHYS_USB_SIZE 0x00000002 /* 2 Bytes */
184
185#define PHYS_IMMR 0xF0000000 /* Internal Memory Mapped Reg. */
186
187#define PHYS_FLASH 0xFF000000 /* Flash (60x Bus) */
188#define PHYS_FLASH_SIZE 0x01000000 /* 16 MB */
189
190#define CFG_IMMR PHYS_IMMR
191
192/*-----------------------------------------------------------------------
193 * Reset Address
194 *
195 * In order to reset the CPU, U-Boot jumps to a special address which
196 * causes a machine check exception. The default address for this is
197 * CFG_MONITOR_BASE - sizeof (ulong), which might not always work, eg. when
198 * testing the monitor in RAM using a JTAG debugger.
199 *
200 * Just set CFG_RESET_ADDRESS to an address that you know is sure to
201 * cause a bus error on your hardware.
202 */
203#define CFG_RESET_ADDRESS 0x20000000
204
205/*-----------------------------------------------------------------------
206 * Hard Reset Configuration Words
207 */
208
209#if defined(CFG_RSD_BOOT_LOW)
210# define CFG_RSD_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
211#else
212# define CFG_RSD_HRCW_BOOT_FLAGS (0)
213#endif /* defined(CFG_RSD_BOOT_LOW) */
214
215/* get the HRCW ISB field from CFG_IMMR */
216#define CFG_RSD_HRCW_IMMR ( ((CFG_IMMR & 0x10000000) >> 10) |\
wdenk8bde7f72003-06-27 21:31:46 +0000217 ((CFG_IMMR & 0x01000000) >> 7) |\
218 ((CFG_IMMR & 0x00100000) >> 4) )
wdenke2211742002-11-02 23:30:20 +0000219
220#define CFG_HRCW_MASTER (HRCW_L2CPC10 | \
221 HRCW_DPPC11 | \
wdenk8bde7f72003-06-27 21:31:46 +0000222 CFG_RSD_HRCW_IMMR |\
223 HRCW_MMR00 | \
224 HRCW_APPC10 | \
225 HRCW_CS10PC00 | \
226 HRCW_MODCK_H0000 |\
wdenke2211742002-11-02 23:30:20 +0000227 CFG_RSD_HRCW_BOOT_FLAGS)
228
229/* no slaves */
230#define CFG_HRCW_SLAVE1 0
231#define CFG_HRCW_SLAVE2 0
232#define CFG_HRCW_SLAVE3 0
233#define CFG_HRCW_SLAVE4 0
234#define CFG_HRCW_SLAVE5 0
235#define CFG_HRCW_SLAVE6 0
236#define CFG_HRCW_SLAVE7 0
237
238/*-----------------------------------------------------------------------
239 * Definitions for initial stack pointer and data area (in DPRAM)
240 */
241#define CFG_INIT_RAM_ADDR CFG_IMMR
242#define CFG_INIT_RAM_END 0x4000 /* End of used area in DPRAM */
243#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
244#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
245#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
246
247/*-----------------------------------------------------------------------
248 * Start addresses for the final memory configuration
249 * (Set up by the startup code)
250 * Please note that CFG_SDRAM_BASE _must_ start at 0
251 * Note also that the logic that sets CFG_RAMBOOT is platform dependend.
252 */
253#define CFG_SDRAM_BASE PHYS_SDRAM_60X
254#define CFG_FLASH_BASE PHYS_FLASH
255/*#define CFG_MONITOR_BASE 0x200000 */
256#define CFG_MONITOR_BASE CFG_FLASH_BASE
257#if CFG_MONITOR_BASE < CFG_FLASH_BASE
258#define CFG_RAMBOOT
259#endif
260#define CFG_MONITOR_LEN (160 << 10) /* Reserve 160 kB for Monitor */
261#define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
262
263/*
264 * For booting Linux, the board info and command line data
265 * have to be in the first 8 MB of memory, since this is
266 * the maximum mapped by the Linux kernel during initialization.
267 */
268#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
269
270/*-----------------------------------------------------------------------
271 * FLASH and environment organization
272 */
273#define CFG_MAX_FLASH_BANKS 2 /* max number of memory banks */
274#define CFG_MAX_FLASH_SECT 63 /* max number of sectors on one chip */
275
276#define CFG_FLASH_ERASE_TOUT 12000 /* Timeout for Flash Erase (in ms) */
277#define CFG_FLASH_WRITE_TOUT 3000 /* Timeout for Flash Write (in ms) */
278
279/* turn off NVRAM env feature */
280#undef CONFIG_NVRAM_ENV
281
282#define CFG_ENV_IS_IN_FLASH 1
283#define CFG_ENV_ADDR (PHYS_FLASH + 0x28000) /* Addr of Environment Sector */
284#define CFG_ENV_SECT_SIZE 0x8000 /* Total Size of Environment Sector */
285
286/*-----------------------------------------------------------------------
287 * Cache Configuration
288 */
289#define CFG_CACHELINE_SIZE 32 /* For MPC8260 CPU */
290#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
291#define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
292#endif
293
294/*-----------------------------------------------------------------------
295 * HIDx - Hardware Implementation-dependent Registers 2-11
296 *-----------------------------------------------------------------------
297 * HID0 also contains cache control - initially enable both caches and
298 * invalidate contents, then the final state leaves only the instruction
299 * cache enabled. Note that Power-On and Hard reset invalidate the caches,
300 * but Soft reset does not.
301 *
302 * HID1 has only read-only information - nothing to set.
303 */
304#define CFG_HID0_INIT (HID0_ICE|HID0_DCE|HID0_ICFI|HID0_DCI|HID0_IFEM|HID0_ABE)
305#define CFG_HID0_FINAL (HID0_ICE|HID0_IFEM|HID0_ABE|HID0_EMCP)
306#define CFG_HID2 0
307
308/*-----------------------------------------------------------------------
309 * RMR - Reset Mode Register
310 *-----------------------------------------------------------------------
311 */
312#define CFG_RMR 0
313
314/*-----------------------------------------------------------------------
315 * BCR - Bus Configuration 4-25
316 *-----------------------------------------------------------------------
317 */
318#define CFG_BCR 0x100c0000
319
320/*-----------------------------------------------------------------------
321 * SIUMCR - SIU Module Configuration 4-31
322 *-----------------------------------------------------------------------
323 */
324
325#define CFG_SIUMCR (SIUMCR_DPPC11 | SIUMCR_L2CPC10 | SIUMCR_APPC10 | \
326 SIUMCR_CS10PC01 | SIUMCR_BCTLC01)
327
328/*-----------------------------------------------------------------------
329 * SYPCR - System Protection Control 11-9
330 * SYPCR can only be written once after reset!
331 *-----------------------------------------------------------------------
332 * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
333 */
334#define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_PBME | SYPCR_LBME | \
335 SYPCR_SWRI | SYPCR_SWP)
336
337/*-----------------------------------------------------------------------
338 * TMCNTSC - Time Counter Status and Control 4-40
339 *-----------------------------------------------------------------------
340 * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
341 * and enable Time Counter
342 */
343#define CFG_TMCNTSC (TMCNTSC_SEC | TMCNTSC_ALR | TMCNTSC_TCF | TMCNTSC_TCE)
344
345/*-----------------------------------------------------------------------
346 * PISCR - Periodic Interrupt Status and Control 4-42
347 *-----------------------------------------------------------------------
348 * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
349 * Periodic timer
350 */
351#define CFG_PISCR (PISCR_PS|PISCR_PTF|PISCR_PTE)
352
353/*-----------------------------------------------------------------------
354 * SCCR - System Clock Control 9-8
355 *-----------------------------------------------------------------------
356 */
357#define CFG_SCCR 0x00000000
358
359/*-----------------------------------------------------------------------
360 * RCCR - RISC Controller Configuration 13-7
361 *-----------------------------------------------------------------------
362 */
363#define CFG_RCCR 0
364
365/*
366 * Init Memory Controller:
367 */
368
369#define CFG_PSDMR 0x494D2452
370#define CFG_LSDMR 0x49492552
371
372/* Flash */
373#define CFG_BR0_PRELIM (PHYS_FLASH | BRx_V)
374#define CFG_OR0_PRELIM (P2SZ_TO_AM(PHYS_FLASH_SIZE) | \
375 ORxG_BCTLD | \
376 ORxG_SCY_5_CLK)
377
378/* DPRAM to the PCI BUS on the protocol board */
379#define CFG_BR1_PRELIM (PHYS_DPRAM_PCI | BRx_V)
380#define CFG_OR1_PRELIM (P2SZ_TO_AM(PHYS_DPRAM_PCI_SIZE) | \
381 ORxG_ACS_DIV4)
382
383/* 60x Bus SDRAM */
384#define CFG_BR2_PRELIM (PHYS_SDRAM_60X | BRx_MS_SDRAM_P | BRx_V)
385#define CFG_OR2_PRELIM (ORxS_SIZE_TO_AM(PHYS_SDRAM_60X_SIZE) | \
386 ORxS_BPD_4 | \
387 ORxS_ROWST_PBI1_A2 | \
388 ORxS_NUMR_13 | \
389 ORxS_IBID)
390
391/* Virtex-FPGA - Register */
392#define CFG_BR3_PRELIM (PHYS_VIRTEX_REGISTER | BRx_V)
393#define CFG_OR3_PRELIM (ORxS_SIZE_TO_AM(PHYS_VIRTEX_REGISTER_SIZE) | \
wdenk8bde7f72003-06-27 21:31:46 +0000394 ORxG_SCY_1_CLK | \
395 ORxG_ACS_DIV2 | \
396 ORxG_CSNT )
wdenke2211742002-11-02 23:30:20 +0000397
398/* local bus SDRAM */
399#define CFG_BR4_PRELIM (PHYS_SDRAM_LOCAL | BRx_PS_32 | BRx_MS_SDRAM_L | BRx_V)
400#define CFG_OR4_PRELIM (ORxS_SIZE_TO_AM(PHYS_SDRAM_LOCAL_SIZE) | \
401 ORxS_BPD_4 | \
402 ORxS_ROWST_PBI1_A4 | \
403 ORxS_NUMR_13)
404
405/* DPRAM to the Sharc-Bus on the protocol board */
406#define CFG_BR5_PRELIM (PHYS_DPRAM_SHARC | BRx_V)
407#define CFG_OR5_PRELIM (P2SZ_TO_AM(PHYS_DPRAM_SHARC_SIZE) | \
408 ORxG_ACS_DIV4)
409
410/*
411 * Internal Definitions
412 *
413 * Boot Flags
414 */
415#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
416#define BOOTFLAG_WARM 0x02 /* Software reboot */
417
418#endif /* __CONFIG_H */