3 * Murray Jensen <Murray.Jensen@cmst.csiro.au>
6 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Marius Groeger <mgroeger@sysgo.de>
10 * Advent Networks, Inc. <http://www.adventnetworks.com>
11 * Jay Monkman <jtm@smoothsmoothie.com>
13 * Configuation settings for the WindRiver PPMC8260 board.
15 * See file CREDITS for list of people who contributed to this
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.
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.
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,
37 /*****************************************************************************
39 * These settings must match the way _your_ board is set up
41 *****************************************************************************/
43 /* What is the oscillator's (UX2) frequency in Hz? */
44 #define CONFIG_8260_CLKIN (66 * 1000 * 1000)
46 /*-----------------------------------------------------------------------
47 * MODCK_H & MODCLK[1-3] - Ref: Section 9.2 in MPC8206 User Manual
48 *-----------------------------------------------------------------------
49 * What should MODCK_H be? It is dependent on the oscillator
50 * frequency, MODCK[1-3], and desired CPM and core frequencies.
51 * Here are some example values (all frequencies are in MHz):
53 * MODCK_H MODCK[1-3] Osc CPM Core S2-6 S2-7 S2-8
54 * ------- ---------- --- --- ---- ----- ----- -----
55 * 0x2 0x2 33 133 133 Close Open Close
56 * 0x2 0x3 33 133 166 Close Open Open
57 * 0x2 0x4 33 133 200 Open Close Close
58 * 0x2 0x5 33 133 233 Open Close Open
59 * 0x2 0x6 33 133 266 Open Open Close
61 * 0x5 0x5 66 133 133 Open Close Open
62 * 0x5 0x6 66 133 166 Open Open Close
63 * 0x5 0x7 66 133 200 Open Open Open
64 * 0x6 0x0 66 133 233 Close Close Close
65 * 0x6 0x1 66 133 266 Close Close Open
66 * 0x6 0x2 66 133 300 Close Open Close
68 #define CONFIG_SYS_PPMC_MODCK_H 0x05
70 /* Define this if you want to boot from 0x00000100. If you don't define
71 * this, you will need to program the bootloader to 0xfff00000, and
72 * get the hardware reset config words at 0xfe000000. The simplest
73 * way to do that is to program the bootloader at both addresses.
74 * It is suggested that you just let U-Boot live at 0x00000000.
76 #define CONFIG_SYS_PPMC_BOOT_LOW 1
78 /* What should the base address of the main FLASH be and how big is
79 * it (in MBytes)? This must contain TEXT_BASE from board/ppmc8260/config.mk
80 * The main FLASH is whichever is connected to *CS0. U-Boot expects
81 * this to be the SIMM.
83 #define CONFIG_SYS_FLASH0_BASE 0xFE000000
84 #define CONFIG_SYS_FLASH0_SIZE 16
86 /* What should be the base address of the first SDRAM DIMM and how big is
89 #define CONFIG_SYS_SDRAM0_BASE 0x00000000
90 #define CONFIG_SYS_SDRAM0_SIZE 128
92 /* What should be the base address of the second SDRAM DIMM and how big is
95 #define CONFIG_SYS_SDRAM1_BASE 0x08000000
96 #define CONFIG_SYS_SDRAM1_SIZE 128
98 /* What should be the base address of the on board SDRAM and how big is
101 #define CONFIG_SYS_SDRAM2_BASE 0x38000000
102 #define CONFIG_SYS_SDRAM2_SIZE 16
104 /* What should be the base address of the MAILBOX and how big is it
106 * The eeprom lives at CONFIG_SYS_MAILBOX_BASE + 0x80000000
108 #define CONFIG_SYS_MAILBOX_BASE 0x32000000
109 #define CONFIG_SYS_MAILBOX_SIZE 8192
111 /* What is the base address of the I/O select lines and how big is it
115 #define CONFIG_SYS_IOSELECT_BASE 0xE0000000
116 #define CONFIG_SYS_IOSELECT_SIZE 32
119 /* What should be the base address of the LEDs and switch S0?
120 * If you don't want them enabled, don't define this.
122 #define CONFIG_SYS_LED_BASE 0xF1000000
125 * PPMC8260 with 256 16 MB DIMM:
127 * 0x0000 0000 Exception Vector code, 8k
130 * 0x0000 2000 Free for Application Use
136 * 0x0FF5 FF30 Monitor Stack (Growing downward)
137 * Monitor Stack Buffer (0x80)
138 * 0x0FF5 FFB0 Board Info Data
139 * 0x0FF6 0000 Malloc Arena
140 * : CONFIG_ENV_SECT_SIZE, 256k
141 * : CONFIG_SYS_MALLOC_LEN, 128k
142 * 0x0FFC 0000 RAM Copy of Monitor Code
143 * : CONFIG_SYS_MONITOR_LEN, 256k
144 * 0x0FFF FFFF [End of RAM], CONFIG_SYS_SDRAM_SIZE - 1
149 * select serial console configuration
151 * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then
152 * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4
155 * if CONFIG_CONS_NONE is defined, then the serial console routines must
157 * The console can be on SMC1 or SMC2
159 #define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */
160 #undef CONFIG_CONS_ON_SCC /* define if console on SCC */
161 #undef CONFIG_CONS_NONE /* define if console on neither */
162 #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */
165 * select ethernet configuration
167 * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then
168 * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3
171 * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be
172 * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset.
175 #undef CONFIG_ETHER_ON_SCC /* define if ethernet on SCC */
176 #define CONFIG_ETHER_ON_FCC /* define if ethernet on FCC */
177 #undef CONFIG_ETHER_NONE /* define if ethernet on neither */
178 #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */
179 #define CONFIG_MII /* MII PHY management */
180 #define CONFIG_BITBANGMII /* bit-bang MII PHY management */
182 * Port pins used for bit-banged MII communictions (if applicable).
184 #define MDIO_PORT 2 /* Port C */
185 #define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \
186 (immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
187 #define MDC_DECLARE MDIO_DECLARE
189 #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
190 #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
191 #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
193 #define MDIO(bit) if(bit) iop->pdat |= 0x00400000; \
194 else iop->pdat &= ~0x00400000
196 #define MDC(bit) if(bit) iop->pdat |= 0x00200000; \
197 else iop->pdat &= ~0x00200000
199 #define MIIDELAY udelay(1)
202 /* Define this to reserve an entire FLASH sector (256 KB) for
203 * environment variables. Otherwise, the environment will be
204 * put in the same sector as U-Boot, and changing variables
205 * will erase U-Boot temporarily
207 #define CONFIG_ENV_IN_OWN_SECT 1
209 /* Define to allow the user to overwrite serial and ethaddr */
210 #define CONFIG_ENV_OVERWRITE
212 /* What should the console's baud rate be? */
213 #define CONFIG_BAUDRATE 9600
215 /* Ethernet MAC address */
217 #define CONFIG_ETHADDR 00:a0:1e:90:2b:00
219 /* Define this to set the last octet of the ethernet address
220 * from the DS0-DS7 switch and light the leds with the result
221 * The DS0-DS7 switch and the leds are backwards with respect
222 * to each other. DS7 is on the board edge side of both the
223 * led strip and the DS0-DS7 switch.
225 #define CONFIG_MISC_INIT_R
227 /* Set to a positive value to delay for running BOOTCOMMAND */
228 #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
231 /* Be selective on what keys can delay or stop the autoboot process
234 # define CONFIG_AUTOBOOT_KEYED
235 # define CONFIG_AUTOBOOT_PROMPT \
236 "Autobooting in %d seconds, press \" \" to stop\n", bootdelay
237 # define CONFIG_AUTOBOOT_STOP_STR " "
238 # undef CONFIG_AUTOBOOT_DELAY_STR
239 # define DEBUG_BOOTKEYS 0
242 /* Define a command string that is automatically executed when no character
243 * is read on the console interface withing "Boot Delay" after reset.
245 #undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
246 #define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
248 #ifdef CONFIG_BOOT_ROOT_INITRD
249 #define CONFIG_BOOTCOMMAND \
253 "setenv bootargs root=/dev/ram0 rw " \
254 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
256 #endif /* CONFIG_BOOT_ROOT_INITRD */
258 #ifdef CONFIG_BOOT_ROOT_NFS
259 #define CONFIG_BOOTCOMMAND \
263 "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \
264 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
266 #endif /* CONFIG_BOOT_ROOT_NFS */
272 #define CONFIG_BOOTP_SUBNETMASK
273 #define CONFIG_BOOTP_GATEWAY
274 #define CONFIG_BOOTP_HOSTNAME
275 #define CONFIG_BOOTP_BOOTPATH
276 #define CONFIG_BOOTP_BOOTFILESIZE
277 #define CONFIG_BOOTP_DNS
280 /* undef this to save memory */
281 #define CONFIG_SYS_LONGHELP
283 /* Monitor Command Prompt */
284 #define CONFIG_SYS_PROMPT "=> "
288 * Command line configuration.
290 #include <config_cmd_default.h>
292 #define CONFIG_CMD_ELF
293 #define CONFIG_CMD_ASKENV
294 #define CONFIG_CMD_REGINFO
295 #define CONFIG_CMD_MEMTEST
296 #define CONFIG_CMD_MII
297 #define CONFIG_CMD_IMMAP
299 #undef CONFIG_CMD_KGDB
302 /* Where do the internal registers live? */
303 #define CONFIG_SYS_IMMR 0xf0000000
305 /*****************************************************************************
307 * You should not have to modify any of the following settings
309 *****************************************************************************/
311 #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
312 #define CONFIG_PPMC8260 1 /* on an Wind River PPMC8260 Board */
313 #define CONFIG_CPM2 1 /* Has a CPM2 */
316 * Miscellaneous configurable options
318 #if defined(CONFIG_CMD_KGDB)
319 # define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
321 # define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
324 /* Print Buffer Size */
325 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT)+16)
327 #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
329 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
331 #define CONFIG_SYS_LOAD_ADDR 0x140000 /* default load address */
332 #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
334 #define CONFIG_SYS_MEMTEST_START 0x2000 /* memtest works from the end of */
335 /* the exception vector table */
336 /* to the end of the DRAM */
337 /* less monitor and malloc area */
338 #define CONFIG_SYS_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */
339 #define CONFIG_SYS_MEM_END_USAGE ( CONFIG_SYS_MONITOR_LEN \
340 + CONFIG_SYS_MALLOC_LEN \
341 + CONFIG_ENV_SECT_SIZE \
342 + CONFIG_SYS_STACK_USAGE )
344 #define CONFIG_SYS_MEMTEST_END ( CONFIG_SYS_SDRAM_SIZE * 1024 * 1024 \
345 - CONFIG_SYS_MEM_END_USAGE )
347 /* valid baudrates */
348 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
351 * Low Level Configuration Settings
352 * (address mappings, register initial values, etc.)
353 * You should know what you are doing if you make changes here.
356 #if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1)
358 * Attention: This is board specific
362 #define CONFIG_SYS_CMXSCR_VALUE (CMXSCR_RS1CS_CLK11 |\
365 #elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2)
367 * Attention: this is board-specific
370 * - Select bus for bd/buffers (see 28-13)
371 * - Enable Full Duplex in FSMR
373 #define CONFIG_SYS_CMXFCR_MASK (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK)
374 #define CONFIG_SYS_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14)
375 #define CONFIG_SYS_CPMFCR_RAMTYPE 0
376 #define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB)
377 #endif /* CONFIG_ETHER_INDEX */
379 #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH0_BASE
380 #define CONFIG_SYS_FLASH_SIZE CONFIG_SYS_FLASH0_SIZE
381 #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_SDRAM0_BASE
382 #define CONFIG_SYS_SDRAM_SIZE (CONFIG_SYS_SDRAM0_SIZE + CONFIG_SYS_SDRAM1_SIZE)
384 /*-----------------------------------------------------------------------
385 * Hard Reset Configuration Words
387 #if defined(CONFIG_SYS_PPMC_BOOT_LOW)
388 # define CONFIG_SYS_PPMC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
390 # define CONFIG_SYS_PPMC_HRCW_BOOT_FLAGS (0)
391 #endif /* defined(CONFIG_SYS_PPMC_BOOT_LOW) */
393 /* get the HRCW ISB field from CONFIG_SYS_IMMR */
394 #define CONFIG_SYS_PPMC_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) | \
395 ((CONFIG_SYS_IMMR & 0x01000000) >> 7) | \
396 ((CONFIG_SYS_IMMR & 0x00100000) >> 4) )
398 #define CONFIG_SYS_HRCW_MASTER ( HRCW_EBM | \
402 CONFIG_SYS_PPMC_HRCW_IMMR | \
407 (CONFIG_SYS_PPMC_MODCK_H & HRCW_MODCK_H1111) | \
408 CONFIG_SYS_PPMC_HRCW_BOOT_FLAGS )
411 #define CONFIG_SYS_HRCW_SLAVE1 0
412 #define CONFIG_SYS_HRCW_SLAVE2 0
413 #define CONFIG_SYS_HRCW_SLAVE3 0
414 #define CONFIG_SYS_HRCW_SLAVE4 0
415 #define CONFIG_SYS_HRCW_SLAVE5 0
416 #define CONFIG_SYS_HRCW_SLAVE6 0
417 #define CONFIG_SYS_HRCW_SLAVE7 0
419 /*-----------------------------------------------------------------------
420 * Definitions for initial stack pointer and data area (in DPRAM)
422 #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
423 #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in DPRAM */
424 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
425 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
426 #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
428 /*-----------------------------------------------------------------------
429 * Start addresses for the final memory configuration
430 * (Set up by the startup code)
431 * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
432 * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependent.
434 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH0_BASE
436 #ifndef CONFIG_SYS_MONITOR_BASE
437 #define CONFIG_SYS_MONITOR_BASE 0x0ff80000
440 #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
441 # define CONFIG_SYS_RAMBOOT
444 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 374 kB for Monitor */
445 #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
448 * For booting Linux, the board info and command line data
449 * have to be in the first 8 MB of memory, since this is
450 * the maximum mapped by the Linux kernel during initialization.
452 #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
454 /*-----------------------------------------------------------------------
455 * FLASH and environment organization
458 #define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */
459 #define CONFIG_FLASH_CFI_DRIVER 1 /* Use the common driver */
460 #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
461 #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
462 #define CONFIG_SYS_FLASH_INCREMENT 0 /* there is only one bank */
463 #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware protection */
464 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
467 #ifndef CONFIG_SYS_RAMBOOT
469 # define CONFIG_ENV_IS_IN_FLASH 1
470 # ifdef CONFIG_ENV_IN_OWN_SECT
471 # define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000)
472 # define CONFIG_ENV_SECT_SIZE 0x40000
474 # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SECT_SIZE)
475 # define CONFIG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
476 # define CONFIG_ENV_SECT_SIZE 0x40000 /* see README - env sect real size */
477 # endif /* CONFIG_ENV_IN_OWN_SECT */
480 # define CONFIG_ENV_IS_IN_FLASH 1
481 # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
482 #define CONFIG_ENV_SIZE 0x1000
483 # define CONFIG_ENV_SECT_SIZE 0x40000
484 #endif /* CONFIG_SYS_RAMBOOT */
486 /*-----------------------------------------------------------------------
487 * Cache Configuration
489 #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */
491 #if defined(CONFIG_CMD_KGDB)
492 # define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */
495 /*-----------------------------------------------------------------------
496 * HIDx - Hardware Implementation-dependent Registers 2-11
497 *-----------------------------------------------------------------------
498 * HID0 also contains cache control - initially enable both caches and
499 * invalidate contents, then the final state leaves only the instruction
500 * cache enabled. Note that Power-On and Hard reset invalidate the caches,
501 * but Soft reset does not.
503 * HID1 has only read-only information - nothing to set.
505 #define CONFIG_SYS_HID0_INIT (HID0_ICE |\
512 #define CONFIG_SYS_HID0_FINAL (HID0_ICE |\
516 #define CONFIG_SYS_HID2 0
518 /*-----------------------------------------------------------------------
519 * RMR - Reset Mode Register
520 *-----------------------------------------------------------------------
522 #define CONFIG_SYS_RMR 0
524 /*-----------------------------------------------------------------------
525 * BCR - Bus Configuration 4-25
526 *-----------------------------------------------------------------------
528 #define CONFIG_SYS_BCR (BCR_EBM |\
531 /*-----------------------------------------------------------------------
532 * SIUMCR - SIU Module Configuration 4-31
533 * Ref Section 4.3.2.6 page 4-31
534 *-----------------------------------------------------------------------
537 #define CONFIG_SYS_SIUMCR (SIUMCR_ESE |\
547 /*-----------------------------------------------------------------------
548 * SYPCR - System Protection Control 11-9
549 * SYPCR can only be written once after reset!
550 *-----------------------------------------------------------------------
551 * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
553 #define CONFIG_SYS_SYPCR (SYPCR_SWTC |\
560 /*-----------------------------------------------------------------------
561 * TMCNTSC - Time Counter Status and Control 4-40
562 *-----------------------------------------------------------------------
563 * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
564 * and enable Time Counter
566 #define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC |\
571 /*-----------------------------------------------------------------------
572 * PISCR - Periodic Interrupt Status and Control 4-42
573 *-----------------------------------------------------------------------
574 * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
577 #define CONFIG_SYS_PISCR (PISCR_PS |\
581 /*-----------------------------------------------------------------------
582 * SCCR - System Clock Control 9-8
583 *-----------------------------------------------------------------------
585 #define CONFIG_SYS_SCCR 0
587 /*-----------------------------------------------------------------------
588 * RCCR - RISC Controller Configuration 13-7
589 *-----------------------------------------------------------------------
591 #define CONFIG_SYS_RCCR 0
594 * Initialize Memory Controller:
596 * Bank Bus Machine PortSz Device
597 * ---- --- ------- ------ ------
598 * 0 60x GPCM 32 bit FLASH (SIMM - 32MB) *
600 * 2 60x SDRAM 64 bit SDRAM (DIMM - 128MB)
601 * 3 60x SDRAM 64 bit SDRAM (DIMM - 128MB)
602 * 4 Local SDRAM 32 bit SDRAM (on board - 16MB)
603 * 5 60x GPCM 8 bit Mailbox/EEPROM (8KB)
604 * 6 60x GPCM 8 bit FLASH (on board - 2MB) *
605 * 7 60x GPCM 8 bit LEDs, switches
607 * (*) This configuration requires the PPMC8260 be configured
608 * so that *CS0 goes to the FLASH SIMM, and *CS6 goes to
609 * the on board FLASH. In other words, JP24 should have
610 * pins 1 and 2 jumpered and pins 3 and 4 jumpered.
614 /*-----------------------------------------------------------------------
615 * BR0,BR1 - Base Register
616 * Ref: Section 10.3.1 on page 10-14
617 * OR0,OR1 - Option Register
618 * Ref: Section 10.3.2 on page 10-18
619 *-----------------------------------------------------------------------
622 /* Bank 0,1 - FLASH SIMM
624 * This expects the FLASH SIMM to be connected to *CS0
625 * It consists of 4 AM29F080B parts.
627 * Note: For the 4 MB SIMM, *CS1 is unused.
630 /* BR0 is configured as follows:
632 * - Base address of 0xFE000000
634 * - Data errors checking is disabled
635 * - Read and write access
637 * - Access are handled by the memory controller according to MSEL
638 * - Not used for atomic operations
639 * - No data pipelining is done
642 #define CONFIG_SYS_BR0_PRELIM ((CONFIG_SYS_FLASH0_BASE & BRx_BA_MSK) |\
647 /* OR0 is configured as follows:
650 * - *BCTL0 is asserted upon access to the current memory bank
651 * - *CW / *WE are negated a quarter of a clock earlier
652 * - *CS is output at the same time as the address lines
653 * - Uses a clock cycle length of 5
654 * - *PSDVAL is generated internally by the memory controller
655 * unless *GTA is asserted earlier externally.
656 * - Relaxed timing is generated by the GPCM for accesses
657 * initiated to this memory region.
658 * - One idle clock is inserted between a read access from the
659 * current bank and the next access.
661 #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH0_SIZE) |\
668 /*-----------------------------------------------------------------------
669 * BR2,BR3 - Base Register
670 * Ref: Section 10.3.1 on page 10-14
671 * OR2,OR3 - Option Register
672 * Ref: Section 10.3.2 on page 10-16
673 *-----------------------------------------------------------------------
677 * Bank 2,3 - 128 MB SDRAM DIMM
680 /* With a 128 MB DIMM, the BR2 is configured as follows:
682 * - Base address of 0x00000000/0x08000000
683 * - 64 bit port size (60x bus only)
684 * - Data errors checking is disabled
685 * - Read and write access
687 * - Access are handled by the memory controller according to MSEL
688 * - Not used for atomic operations
689 * - No data pipelining is done
692 #define CONFIG_SYS_BR2_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\
697 #define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_SDRAM1_BASE & BRx_BA_MSK) |\
702 /* With a 128 MB DIMM, the OR2 is configured as follows:
705 * - 4 internal banks per device
706 * - Row start address bit is A8 with PSDMR[PBI] = 0
707 * - 13 row address lines
708 * - Back-to-back page mode
709 * - Internal bank interleaving within save device enabled
712 #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM0_SIZE) |\
714 ORxS_ROWST_PBI0_A7 |\
717 #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM1_SIZE) |\
719 ORxS_ROWST_PBI0_A7 |\
723 /*-----------------------------------------------------------------------
724 * PSDMR - 60x Bus SDRAM Mode Register
725 * Ref: Section 10.3.3 on page 10-21
726 *-----------------------------------------------------------------------
729 /* With a 128 MB DIMM, the PSDMR is configured as follows:
731 * - Page Based Interleaving,
734 * - Address Multiplexing where A5 is output on A14 pin
735 * (A6 on A15, and so on),
736 * - use address pins A13-A15 as bank select,
737 * - A9 is output on SDA10 during an ACTIVATE command,
738 * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
739 * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
741 * - earliest timing for READ/WRITE command after ACTIVATE command is
743 * - earliest timing for PRECHARGE after last data was read is 1 clock,
744 * - earliest timing for PRECHARGE after last data was written is 1 clock,
745 * - External Address Multiplexing enabled
746 * - CAS Latency is 2.
748 #define CONFIG_SYS_PSDMR (PSDMR_RFEN |\
749 PSDMR_SDAM_A14_IS_A5 |\
750 PSDMR_BSMA_A13_A15 |\
751 PSDMR_SDA10_PBI0_A9 |\
761 #define CONFIG_SYS_PSRT 0x0e
762 #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32
765 /*-----------------------------------------------------------------------
766 * BR4 - Base Register
767 * Ref: Section 10.3.1 on page 10-14
768 * OR4 - Option Register
769 * Ref: Section 10.3.2 on page 10-16
770 *-----------------------------------------------------------------------
774 * Bank 4 - On board SDRAM
777 /* With 16 MB of onboard SDRAM BR4 is configured as follows
779 * - Base address 0x38000000
781 * - Data error checking disabled
782 * - Read/Write access
784 * - Not used for atomic operations
785 * - No data pipelining is done
790 #define CONFIG_SYS_BR4_PRELIM ((CONFIG_SYS_SDRAM2_BASE & BRx_BA_MSK) |\
797 * With 16MB SDRAM, OR4 is configured as follows
798 * - 4 internal banks per device
799 * - Row start address bit is A10 with LSDMR[PBI] = 0
800 * - 12 row address lines
801 * - Back-to-back page mode
802 * - Internal bank interleaving within save device enabled
805 #define CONFIG_SYS_OR4_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM2_SIZE) |\
807 ORxS_ROWST_PBI0_A10 |\
811 /*-----------------------------------------------------------------------
812 * LSDMR - Local Bus SDRAM Mode Register
813 * Ref: Section 10.3.4 on page 10-24
814 *-----------------------------------------------------------------------
817 /* With a 16 MB onboard SDRAM, the LSDMR is configured as follows:
819 * - Page Based Interleaving,
822 * - Address Multiplexing where A5 is output on A13 pin
823 * (A6 on A15, and so on),
824 * - use address pins A15-A17 as bank select,
825 * - A11 is output on SDA10 during an ACTIVATE command,
826 * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
827 * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
829 * - earliest timing for READ/WRITE command after ACTIVATE command is
831 * - SDRAM burst length is 8
832 * - earliest timing for PRECHARGE after last data was read is 1 clock,
833 * - earliest timing for PRECHARGE after last data was written is 1 clock,
834 * - External Address Multiplexing disabled
835 * - CAS Latency is 2.
837 #define CONFIG_SYS_LSDMR (PSDMR_RFEN |\
838 PSDMR_SDAM_A13_IS_A5 |\
839 PSDMR_BSMA_A15_A17 |\
840 PSDMR_SDA10_PBI0_A11 |\
849 #define CONFIG_SYS_LSRT 0x0e
851 /*-----------------------------------------------------------------------
852 * BR5 - Base Register
853 * Ref: Section 10.3.1 on page 10-14
854 * OR5 - Option Register
855 * Ref: Section 10.3.2 on page 10-16
856 *-----------------------------------------------------------------------
860 * Bank 5 EEProm and Mailbox
862 * The EEPROM and mailbox live on the same chip select.
863 * the eeprom is selected if the MSb of the address is set and the mailbox is
864 * selected if the MSb of the address is clear.
868 /* BR5 is configured as follows:
870 * - Base address of 0x32000000/0xF2000000
872 * - Data error checking disabled
873 * - Read/Write access
876 * - No data pipelining is done
880 #define CONFIG_SYS_BR5_PRELIM ((CONFIG_SYS_MAILBOX_BASE & BRx_BA_MSK) |\
885 /* OR5 is configured as follows
886 * - buffer control enabled
887 * - chip select negated normally
888 * - CS output 1/2 clock after address
890 * - *PSDVAL is generated internally by the memory controller
891 * unless *GTA is asserted earlier externally.
892 * - Relaxed timing is generated by the GPCM for accesses
893 * initiated to this memory region.
894 * - One idle clock is inserted between a read access from the
895 * current bank and the next access.
898 #define CONFIG_SYS_OR5_PRELIM ((P2SZ_TO_AM(CONFIG_SYS_MAILBOX_SIZE) & ~0x80000000) |\
904 /*-----------------------------------------------------------------------
905 * BR6 - Base Register
906 * Ref: Section 10.3.1 on page 10-14
907 * OR6 - Option Register
908 * Ref: Section 10.3.2 on page 10-18
909 *-----------------------------------------------------------------------
912 /* Bank 6 - I/O select
916 /* BR6 is configured as follows:
918 * - Base address of 0xE0000000
920 * - Data errors checking is disabled
921 * - Read and write access
923 * - Access are handled by the memory controller according to MSEL
924 * - Not used for atomic operations
925 * - No data pipelining is done
928 #define CONFIG_SYS_BR6_PRELIM ((CONFIG_SYS_IOSELECT_BASE & BRx_BA_MSK) |\
933 /* OR6 is configured as follows
934 * - buffer control enabled
935 * - chip select negated normally
936 * - CS output 1/2 clock after address
938 * - *PSDVAL is generated internally by the memory controller
939 * unless *GTA is asserted earlier externally.
940 * - Relaxed timing is generated by the GPCM for accesses
941 * initiated to this memory region.
942 * - One idle clock is inserted between a read access from the
943 * current bank and the next access.
946 #define CONFIG_SYS_OR6_PRELIM (MEG_TO_AM(CONFIG_SYS_IOSELECT_SIZE) |\
953 /*-----------------------------------------------------------------------
954 * BR7 - Base Register
955 * Ref: Section 10.3.1 on page 10-14
956 * OR7 - Option Register
957 * Ref: Section 10.3.2 on page 10-18
958 *-----------------------------------------------------------------------
961 /* Bank 7 - LEDs and switches
963 * LEDs are at 0x00001 (write only)
964 * switches are at 0x00001 (read only)
966 #ifdef CONFIG_SYS_LED_BASE
968 /* BR7 is configured as follows:
970 * - Base address of 0xA0000000
972 * - Data errors checking is disabled
973 * - Read and write access
975 * - Access are handled by the memory controller according to MSEL
976 * - Not used for atomic operations
977 * - No data pipelining is done
980 #define CONFIG_SYS_BR7_PRELIM ((CONFIG_SYS_LED_BASE & BRx_BA_MSK) |\
986 /* OR7 is configured as follows:
989 * - *BCTL0 is asserted upon access to the current memory bank
990 * - *CW / *WE are negated a quarter of a clock earlier
991 * - *CS is output at the same time as the address lines
992 * - Uses a clock cycle length of 15
993 * - *PSDVAL is generated internally by the memory controller
994 * unless *GTA is asserted earlier externally.
995 * - Relaxed timing is generated by the GPCM for accesses
996 * initiated to this memory region.
997 * - One idle clock is inserted between a read access from the
998 * current bank and the next access.
1000 #define CONFIG_SYS_OR7_PRELIM (ORxG_AM_MSK |\
1006 #endif /* CONFIG_SYS_LED_BASE */
1009 * Internal Definitions
1013 #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
1014 #define BOOTFLAG_WARM 0x02 /* Software reboot */
1016 #endif /* __CONFIG_H */