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 * Configuration settings for the WindRiver SBC8260 board.
14 * See http://www.windriver.com/products/html/sbc8260.html
16 * See file CREDITS for list of people who contributed to this
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License as
21 * published by the Free Software Foundation; either version 2 of
22 * the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
38 /* Enable debug prints */
39 #undef DEBUG /* General debug */
40 #undef DEBUG_BOOTP_EXT /* Debug received vendor fields */
42 /*****************************************************************************
44 * These settings must match the way _your_ board is set up
46 *****************************************************************************/
48 /* What is the oscillator's (UX2) frequency in Hz? */
49 #define CONFIG_8260_CLKIN (66 * 1000 * 1000)
51 /*-----------------------------------------------------------------------
52 * MODCK_H & MODCLK[1-3] - Ref: Section 9.2 in MPC8206 User Manual
53 *-----------------------------------------------------------------------
54 * What should MODCK_H be? It is dependent on the oscillator
55 * frequency, MODCK[1-3], and desired CPM and core frequencies.
56 * Here are some example values (all frequencies are in MHz):
58 * MODCK_H MODCK[1-3] Osc CPM Core S2-6 S2-7 S2-8
59 * ------- ---------- --- --- ---- ----- ----- -----
60 * 0x1 0x5 33 100 133 Open Close Open
61 * 0x1 0x6 33 100 166 Open Open Close
62 * 0x1 0x7 33 100 200 Open Open Open
64 * 0x2 0x2 33 133 133 Close Open Close
65 * 0x2 0x3 33 133 166 Close Open Open
66 * 0x2 0x4 33 133 200 Open Close Close
67 * 0x2 0x5 33 133 233 Open Close Open
68 * 0x2 0x6 33 133 266 Open Open Close
70 * 0x5 0x5 66 133 133 Open Close Open
71 * 0x5 0x6 66 133 166 Open Open Close
72 * 0x5 0x7 66 133 200 Open Open Open
73 * 0x6 0x0 66 133 233 Close Close Close
74 * 0x6 0x1 66 133 266 Close Close Open
75 * 0x6 0x2 66 133 300 Close Open Close
77 #define CFG_SBC_MODCK_H 0x05
79 /* Define this if you want to boot from 0x00000100. If you don't define
80 * this, you will need to program the bootloader to 0xfff00000, and
81 * get the hardware reset config words at 0xfe000000. The simplest
82 * way to do that is to program the bootloader at both addresses.
83 * It is suggested that you just let U-Boot live at 0x00000000.
85 #define CFG_SBC_BOOT_LOW 1
87 /* What should the base address of the main FLASH be and how big is
88 * it (in MBytes)? This must contain TEXT_BASE from board/sbc8260/config.mk
89 * The main FLASH is whichever is connected to *CS0. U-Boot expects
90 * this to be the SIMM.
92 #define CFG_FLASH0_BASE 0x40000000
93 #define CFG_FLASH0_SIZE 4
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. U-Boot expects this to be the on board FLASH. If you don't
98 * want it enabled, don't define these constants.
100 #define CFG_FLASH1_BASE 0x60000000
101 #define CFG_FLASH1_SIZE 2
103 /* What should be the base address of SDRAM DIMM and how big is
106 #define CFG_SDRAM0_BASE 0x00000000
107 #define CFG_SDRAM0_SIZE 64
109 /* What should be the base address of the LEDs and switch S0?
110 * If you don't want them enabled, don't define this.
112 #define CFG_LED_BASE 0xa0000000
116 * SBC8260 with 16 MB DIMM:
118 * 0x0000 0000 Exception Vector code, 8k
121 * 0x0000 2000 Free for Application Use
127 * 0x00F5 FF30 Monitor Stack (Growing downward)
128 * Monitor Stack Buffer (0x80)
129 * 0x00F5 FFB0 Board Info Data
130 * 0x00F6 0000 Malloc Arena
131 * : CFG_ENV_SECT_SIZE, 256k
132 * : CFG_MALLOC_LEN, 128k
133 * 0x00FC 0000 RAM Copy of Monitor Code
134 * : CFG_MONITOR_LEN, 256k
135 * 0x00FF FFFF [End of RAM], CFG_SDRAM_SIZE - 1
139 * SBC8260 with 64 MB DIMM:
141 * 0x0000 0000 Exception Vector code, 8k
144 * 0x0000 2000 Free for Application Use
150 * 0x03F5 FF30 Monitor Stack (Growing downward)
151 * Monitor Stack Buffer (0x80)
152 * 0x03F5 FFB0 Board Info Data
153 * 0x03F6 0000 Malloc Arena
154 * : CFG_ENV_SECT_SIZE, 256k
155 * : CFG_MALLOC_LEN, 128k
156 * 0x03FC 0000 RAM Copy of Monitor Code
157 * : CFG_MONITOR_LEN, 256k
158 * 0x03FF FFFF [End of RAM], CFG_SDRAM_SIZE - 1
163 * select serial console configuration
165 * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then
166 * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4
169 * if CONFIG_CONS_NONE is defined, then the serial console routines must
172 #define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */
173 #undef CONFIG_CONS_ON_SCC /* define if console on SCC */
174 #undef CONFIG_CONS_NONE /* define if console on neither */
175 #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */
178 * select ethernet configuration
180 * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then
181 * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3
184 * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be
185 * defined elsewhere (as for the console), or CFG_CMD_NET must be removed
186 * from CONFIG_COMMANDS to remove support for networking.
189 #undef CONFIG_ETHER_ON_SCC
190 #define CONFIG_ETHER_ON_FCC
191 #undef CONFIG_ETHER_NONE /* define if ethernet on neither */
193 #ifdef CONFIG_ETHER_ON_SCC
194 #define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */
195 #endif /* CONFIG_ETHER_ON_SCC */
197 #ifdef CONFIG_ETHER_ON_FCC
198 #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */
199 #define CONFIG_MII /* MII PHY management */
200 #define CONFIG_BITBANGMII /* bit-bang MII PHY management */
202 * Port pins used for bit-banged MII communictions (if applicable).
204 #define MDIO_PORT 2 /* Port C */
205 #define MDIO_ACTIVE (iop->pdir |= 0x00400000)
206 #define MDIO_TRISTATE (iop->pdir &= ~0x00400000)
207 #define MDIO_READ ((iop->pdat & 0x00400000) != 0)
209 #define MDIO(bit) if(bit) iop->pdat |= 0x00400000; \
210 else iop->pdat &= ~0x00400000
212 #define MDC(bit) if(bit) iop->pdat |= 0x00200000; \
213 else iop->pdat &= ~0x00200000
215 #define MIIDELAY udelay(1)
216 #endif /* CONFIG_ETHER_ON_FCC */
218 #if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1)
224 # define CFG_CMXSCR_VALUE (CMXSCR_RS1CS_CLK11 | CMXSCR_TS1CS_CLK12)
226 #elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2)
231 * - Select bus for bd/buffers (see 28-13)
232 * - Enable Full Duplex in FSMR
234 # define CFG_CMXFCR_MASK (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK)
235 # define CFG_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14)
236 # define CFG_CPMFCR_RAMTYPE 0
237 # define CFG_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB)
239 #endif /* CONFIG_ETHER_ON_FCC, CONFIG_ETHER_INDEX */
242 * select SPI support configuration
244 #undef CONFIG_SPI /* enable SPI driver */
247 * select i2c support configuration
249 * Supported configurations are {none, software, hardware} drivers.
250 * If the software driver is chosen, there are some additional
251 * configuration items that the driver uses to drive the port pins.
253 #undef CONFIG_HARD_I2C /* I2C with hardware support */
254 #define CONFIG_SOFT_I2C 1 /* I2C bit-banged */
255 #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
256 #define CFG_I2C_SLAVE 0x7F
259 * Software (bit-bang) I2C driver configuration
261 #ifdef CONFIG_SOFT_I2C
262 #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */
263 #define I2C_ACTIVE (iop->pdir |= 0x00010000)
264 #define I2C_TRISTATE (iop->pdir &= ~0x00010000)
265 #define I2C_READ ((iop->pdat & 0x00010000) != 0)
266 #define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \
267 else iop->pdat &= ~0x00010000
268 #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \
269 else iop->pdat &= ~0x00020000
270 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
271 #endif /* CONFIG_SOFT_I2C */
274 /* Define this to reserve an entire FLASH sector (256 KB) for
275 * environment variables. Otherwise, the environment will be
276 * put in the same sector as U-Boot, and changing variables
277 * will erase U-Boot temporarily
279 #define CFG_ENV_IN_OWN_SECT 1
281 /* Define to allow the user to overwrite serial and ethaddr */
282 #define CONFIG_ENV_OVERWRITE
284 /* What should the console's baud rate be? */
285 #define CONFIG_BAUDRATE 9600
287 /* Ethernet MAC address */
288 #define CONFIG_ETHADDR 00:a0:1e:a8:7b:cb
291 * Define this to set the last octet of the ethernet address from the
292 * DS0-DS7 switch and light the LEDs with the result. The DS0-DS7
293 * switch and the LEDs are backwards with respect to each other. DS7
294 * is on the board edge side of both the LED strip and the DS0-DS7
297 #undef CONFIG_MISC_INIT_R
299 /* Set to a positive value to delay for running BOOTCOMMAND */
300 #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
303 /* Be selective on what keys can delay or stop the autoboot process
306 # define CONFIG_AUTOBOOT_KEYED
307 # define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, press \" \" to stop\n"
308 # define CONFIG_AUTOBOOT_STOP_STR " "
309 # undef CONFIG_AUTOBOOT_DELAY_STR
310 # define DEBUG_BOOTKEYS 0
313 /* Define this to contain any number of null terminated strings that
314 * will be part of the default enviroment compiled into the boot image.
316 #define CONFIG_EXTRA_ENV_SETTINGS \
317 "serverip=192.168.123.201\0" \
318 "ipaddr=192.168.123.203\0" \
320 "tftpboot 0x140000 /bdi2000/u-boot.bin; " \
321 "protect off 1:0; " \
323 "cp.b 140000 40000000 $(filesize); " \
326 "protect off 1:1; " \
334 "setenv bootargs root=/dev/ram0 rw " \
335 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
343 "setenv bootargs root=/dev/nfs rw " \
344 "nfsroot=$(serverip):$(rootpath) " \
345 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off\\;" \
348 "boot-hook=echo boot-hook\0"
350 /* Define a command string that is automatically executed when no character
351 * is read on the console interface withing "Boot Delay" after reset.
353 #define CONFIG_BOOT_ROOT_INITRD 0 /* Use ram disk for the root file system */
354 #define CONFIG_BOOT_ROOT_NFS 1 /* Use a NFS mounted root file system */
356 #if CONFIG_BOOT_ROOT_INITRD
357 #define CONFIG_BOOTCOMMAND \
361 "setenv bootargs root=/dev/ram0 rw " \
362 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
364 #endif /* CONFIG_BOOT_ROOT_INITRD */
366 #if CONFIG_BOOT_ROOT_NFS
367 #define CONFIG_BOOTCOMMAND \
371 "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \
372 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
374 #endif /* CONFIG_BOOT_ROOT_NFS */
376 /* Add support for a few extra bootp options like:
380 #define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \
381 CONFIG_BOOTP_BOOTFILESIZE | \
384 /* undef this to save memory */
387 /* Monitor Command Prompt */
388 #define CFG_PROMPT "=> "
390 #undef CFG_HUSH_PARSER
391 #ifdef CFG_HUSH_PARSER
392 #define CFG_PROMPT_HUSH_PS2 "> "
395 /* When CONFIG_TIMESTAMP is selected, the timestamp (date and time)
396 * of an image is printed by image commands like bootm or iminfo.
398 #define CONFIG_TIMESTAMP
400 /* What U-Boot subsytems do you want enabled? */
401 #ifdef CONFIG_ETHER_ON_FCC
402 # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
412 # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
420 #endif /* CONFIG_ETHER_ON_FCC */
422 /* Where do the internal registers live? */
423 #define CFG_IMMR 0xF0000000
425 /*****************************************************************************
427 * You should not have to modify any of the following settings
429 *****************************************************************************/
431 #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
432 #define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */
434 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
435 #include <cmd_confdefs.h>
438 * Miscellaneous configurable options
440 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
441 # define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
443 # define CFG_CBSIZE 256 /* Console I/O Buffer Size */
446 /* Print Buffer Size */
447 #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT)+16)
449 #define CFG_MAXARGS 32 /* max number of command args */
451 #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
453 #define CFG_LOAD_ADDR 0x400000 /* default load address */
454 #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
456 #define CFG_ALT_MEMTEST /* Select full-featured memory test */
457 #define CFG_MEMTEST_START 0x2000 /* memtest works from the end of */
458 /* the exception vector table */
459 /* to the end of the DRAM */
460 /* less monitor and malloc area */
461 #define CFG_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */
462 #define CFG_MEM_END_USAGE ( CFG_MONITOR_LEN \
464 + CFG_ENV_SECT_SIZE \
467 #define CFG_MEMTEST_END ( CFG_SDRAM_SIZE * 1024 * 1024 \
468 - CFG_MEM_END_USAGE )
470 /* valid baudrates */
471 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
474 * Low Level Configuration Settings
475 * (address mappings, register initial values, etc.)
476 * You should know what you are doing if you make changes here.
479 #define CFG_FLASH_BASE CFG_FLASH0_BASE
480 #define CFG_FLASH_SIZE CFG_FLASH0_SIZE
481 #define CFG_SDRAM_BASE CFG_SDRAM0_BASE
482 #define CFG_SDRAM_SIZE CFG_SDRAM0_SIZE
484 /*-----------------------------------------------------------------------
485 * Hard Reset Configuration Words
487 #if defined(CFG_SBC_BOOT_LOW)
488 # define CFG_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)
490 # define CFG_SBC_HRCW_BOOT_FLAGS (0)
491 #endif /* defined(CFG_SBC_BOOT_LOW) */
493 /* get the HRCW ISB field from CFG_IMMR */
494 #define CFG_SBC_HRCW_IMMR ( ((CFG_IMMR & 0x10000000) >> 10) | \
495 ((CFG_IMMR & 0x01000000) >> 7) | \
496 ((CFG_IMMR & 0x00100000) >> 4) )
498 #define CFG_HRCW_MASTER ( HRCW_BPS11 | \
500 CFG_SBC_HRCW_IMMR | \
505 (CFG_SBC_MODCK_H & HRCW_MODCK_H1111) | \
506 CFG_SBC_HRCW_BOOT_FLAGS )
509 #define CFG_HRCW_SLAVE1 0
510 #define CFG_HRCW_SLAVE2 0
511 #define CFG_HRCW_SLAVE3 0
512 #define CFG_HRCW_SLAVE4 0
513 #define CFG_HRCW_SLAVE5 0
514 #define CFG_HRCW_SLAVE6 0
515 #define CFG_HRCW_SLAVE7 0
517 /*-----------------------------------------------------------------------
518 * Definitions for initial stack pointer and data area (in DPRAM)
520 #define CFG_INIT_RAM_ADDR CFG_IMMR
521 #define CFG_INIT_RAM_END 0x4000 /* End of used area in DPRAM */
522 #define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
523 #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
524 #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
526 /*-----------------------------------------------------------------------
527 * Start addresses for the final memory configuration
528 * (Set up by the startup code)
529 * Please note that CFG_SDRAM_BASE _must_ start at 0
530 * Note also that the logic that sets CFG_RAMBOOT is platform dependent.
532 #define CFG_MONITOR_BASE CFG_FLASH0_BASE
534 #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
538 #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
539 #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
542 * For booting Linux, the board info and command line data
543 * have to be in the first 8 MB of memory, since this is
544 * the maximum mapped by the Linux kernel during initialization.
546 #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
548 /*-----------------------------------------------------------------------
549 * FLASH and environment organization
551 #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
552 #define CFG_MAX_FLASH_SECT 16 /* max number of sectors on one chip */
554 #define CFG_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */
555 #define CFG_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */
558 # define CFG_ENV_IS_IN_FLASH 1
560 # ifdef CFG_ENV_IN_OWN_SECT
561 # define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000)
562 # define CFG_ENV_SECT_SIZE 0x40000
564 # define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN - CFG_ENV_SECT_SIZE)
565 # define CFG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
566 # define CFG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */
567 # endif /* CFG_ENV_IN_OWN_SECT */
570 # define CFG_ENV_IS_IN_NVRAM 1
571 # define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000)
572 # define CFG_ENV_SIZE 0x200
573 #endif /* CFG_RAMBOOT */
575 /*-----------------------------------------------------------------------
576 * Cache Configuration
578 #define CFG_CACHELINE_SIZE 32 /* For MPC8260 CPU */
580 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
581 # define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
584 /*-----------------------------------------------------------------------
585 * HIDx - Hardware Implementation-dependent Registers 2-11
586 *-----------------------------------------------------------------------
587 * HID0 also contains cache control - initially enable both caches and
588 * invalidate contents, then the final state leaves only the instruction
589 * cache enabled. Note that Power-On and Hard reset invalidate the caches,
590 * but Soft reset does not.
592 * HID1 has only read-only information - nothing to set.
594 #define CFG_HID0_INIT (HID0_ICE |\
601 #define CFG_HID0_FINAL (HID0_ICE |\
607 /*-----------------------------------------------------------------------
608 * RMR - Reset Mode Register
609 *-----------------------------------------------------------------------
613 /*-----------------------------------------------------------------------
614 * BCR - Bus Configuration 4-25
615 *-----------------------------------------------------------------------
617 #define CFG_BCR (BCR_ETM)
619 /*-----------------------------------------------------------------------
620 * SIUMCR - SIU Module Configuration 4-31
621 *-----------------------------------------------------------------------
624 #define CFG_SIUMCR (SIUMCR_DPPC11 |\
630 /*-----------------------------------------------------------------------
631 * SYPCR - System Protection Control 11-9
632 * SYPCR can only be written once after reset!
633 *-----------------------------------------------------------------------
634 * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
636 #define CFG_SYPCR (SYPCR_SWTC |\
643 /*-----------------------------------------------------------------------
644 * TMCNTSC - Time Counter Status and Control 4-40
645 *-----------------------------------------------------------------------
646 * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk,
647 * and enable Time Counter
649 #define CFG_TMCNTSC (TMCNTSC_SEC |\
654 /*-----------------------------------------------------------------------
655 * PISCR - Periodic Interrupt Status and Control 4-42
656 *-----------------------------------------------------------------------
657 * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable
660 #define CFG_PISCR (PISCR_PS |\
664 /*-----------------------------------------------------------------------
665 * SCCR - System Clock Control 9-8
666 *-----------------------------------------------------------------------
670 /*-----------------------------------------------------------------------
671 * RCCR - RISC Controller Configuration 13-7
672 *-----------------------------------------------------------------------
677 * Initialize Memory Controller:
679 * Bank Bus Machine PortSz Device
680 * ---- --- ------- ------ ------
681 * 0 60x GPCM 32 bit FLASH (SIMM - 4MB) *
682 * 1 60x GPCM 32 bit FLASH (SIMM - Unused)
683 * 2 60x SDRAM 64 bit SDRAM (DIMM - 16MB or 64MB)
684 * 3 60x SDRAM 64 bit SDRAM (DIMM - Unused)
685 * 4 Local SDRAM 32 bit SDRAM (on board - 4MB)
686 * 5 60x GPCM 8 bit EEPROM (8KB)
687 * 6 60x GPCM 8 bit FLASH (on board - 2MB) *
688 * 7 60x GPCM 8 bit LEDs, switches
690 * (*) This configuration requires the SBC8260 be configured
691 * so that *CS0 goes to the FLASH SIMM, and *CS6 goes to
692 * the on board FLASH. In other words, JP24 should have
693 * pins 1 and 2 jumpered and pins 3 and 4 jumpered.
697 /*-----------------------------------------------------------------------
698 * BR0,BR1 - Base Register
699 * Ref: Section 10.3.1 on page 10-14
700 * OR0,OR1 - Option Register
701 * Ref: Section 10.3.2 on page 10-18
702 *-----------------------------------------------------------------------
705 /* Bank 0,1 - FLASH SIMM
707 * This expects the FLASH SIMM to be connected to *CS0
708 * It consists of 4 AM29F080B parts.
710 * Note: For the 4 MB SIMM, *CS1 is unused.
713 /* BR0 is configured as follows:
715 * - Base address of 0x40000000
717 * - Data errors checking is disabled
718 * - Read and write access
720 * - Access are handled by the memory controller according to MSEL
721 * - Not used for atomic operations
722 * - No data pipelining is done
725 #define CFG_BR0_PRELIM ((CFG_FLASH0_BASE & BRx_BA_MSK) |\
730 /* OR0 is configured as follows:
733 * - *BCTL0 is asserted upon access to the current memory bank
734 * - *CW / *WE are negated a quarter of a clock earlier
735 * - *CS is output at the same time as the address lines
736 * - Uses a clock cycle length of 5
737 * - *PSDVAL is generated internally by the memory controller
738 * unless *GTA is asserted earlier externally.
739 * - Relaxed timing is generated by the GPCM for accesses
740 * initiated to this memory region.
741 * - One idle clock is inserted between a read access from the
742 * current bank and the next access.
744 #define CFG_OR0_PRELIM (MEG_TO_AM(CFG_FLASH0_SIZE) |\
751 /*-----------------------------------------------------------------------
752 * BR2,BR3 - Base Register
753 * Ref: Section 10.3.1 on page 10-14
754 * OR2,OR3 - Option Register
755 * Ref: Section 10.3.2 on page 10-16
756 *-----------------------------------------------------------------------
759 /* Bank 2,3 - SDRAM DIMM
762 * 64MB DIMM: P/N 1W-8864X8-4-P1-EST
764 * Note: *CS3 is unused for this DIMM
767 /* With a 16 MB or 64 MB DIMM, the BR2 is configured as follows:
769 * - Base address of 0x00000000
770 * - 64 bit port size (60x bus only)
771 * - Data errors checking is disabled
772 * - Read and write access
774 * - Access are handled by the memory controller according to MSEL
775 * - Not used for atomic operations
776 * - No data pipelining is done
779 #define CFG_BR2_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\
784 #define CFG_BR3_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\
789 /* With a 16 MB DIMM, the OR2 is configured as follows:
792 * - 2 internal banks per device
793 * - Row start address bit is A9 with PSDMR[PBI] = 0
794 * - 11 row address lines
795 * - Back-to-back page mode
796 * - Internal bank interleaving within save device enabled
798 #if (CFG_SDRAM0_SIZE == 16)
799 #define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\
801 ORxS_ROWST_PBI0_A9 |\
805 /* With a 64 MB DIMM, the OR2 is configured as follows:
808 * - 4 internal banks per device
809 * - Row start address bit is A8 with PSDMR[PBI] = 0
810 * - 12 row address lines
811 * - Back-to-back page mode
812 * - Internal bank interleaving within save device enabled
814 #if (CFG_SDRAM0_SIZE == 64)
815 #define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\
817 ORxS_ROWST_PBI0_A8 |\
821 /*-----------------------------------------------------------------------
822 * PSDMR - 60x Bus SDRAM Mode Register
823 * Ref: Section 10.3.3 on page 10-21
824 *-----------------------------------------------------------------------
827 /* Address that the DIMM SPD memory lives at.
829 #define SDRAM_SPD_ADDR 0x54
831 #if (CFG_SDRAM0_SIZE == 16)
832 /* With a 16 MB DIMM, the PSDMR is configured as follows:
834 * - Bank Based Interleaving,
836 * - Address Multiplexing where A5 is output on A14 pin
837 * (A6 on A15, and so on),
838 * - use address pins A16-A18 as bank select,
839 * - A9 is output on SDA10 during an ACTIVATE command,
840 * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
841 * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
843 * - earliest timing for READ/WRITE command after ACTIVATE command is
845 * - earliest timing for PRECHARGE after last data was read is 1 clock,
846 * - earliest timing for PRECHARGE after last data was written is 1 clock,
847 * - CAS Latency is 2.
849 #define CFG_PSDMR (PSDMR_RFEN |\
850 PSDMR_SDAM_A14_IS_A5 |\
851 PSDMR_BSMA_A16_A18 |\
852 PSDMR_SDA10_PBI0_A9 |\
861 #if (CFG_SDRAM0_SIZE == 64)
862 /* With a 64 MB DIMM, the PSDMR is configured as follows:
864 * - Bank Based Interleaving,
866 * - Address Multiplexing where A5 is output on A14 pin
867 * (A6 on A15, and so on),
868 * - use address pins A14-A16 as bank select,
869 * - A9 is output on SDA10 during an ACTIVATE command,
870 * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks,
871 * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command
873 * - earliest timing for READ/WRITE command after ACTIVATE command is
875 * - earliest timing for PRECHARGE after last data was read is 1 clock,
876 * - earliest timing for PRECHARGE after last data was written is 1 clock,
877 * - CAS Latency is 2.
879 #define CFG_PSDMR (PSDMR_RFEN |\
880 PSDMR_SDAM_A14_IS_A5 |\
881 PSDMR_BSMA_A14_A16 |\
882 PSDMR_SDA10_PBI0_A9 |\
892 * Shoot for approximately 1MHz on the prescaler.
894 #if (CONFIG_8260_CLKIN == (66 * 1000 * 1000))
895 #define CFG_MPTPR MPTPR_PTP_DIV64
896 #elif (CONFIG_8260_CLKIN == (33 * 1000 * 1000))
897 #define CFG_MPTPR MPTPR_PTP_DIV32
899 #warning "Unconfigured bus clock freq: check CFG_MPTPR and CFG_PSRT are OK"
900 #define CFG_MPTPR MPTPR_PTP_DIV32
905 /* Bank 4 - On board SDRAM
907 * This is not implemented yet.
910 /*-----------------------------------------------------------------------
911 * BR6 - Base Register
912 * Ref: Section 10.3.1 on page 10-14
913 * OR6 - Option Register
914 * Ref: Section 10.3.2 on page 10-18
915 *-----------------------------------------------------------------------
918 /* Bank 6 - On board FLASH
920 * This expects the on board FLASH SIMM to be connected to *CS6
921 * It consists of 1 AM29F016A part.
923 #if (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE))
925 /* BR6 is configured as follows:
927 * - Base address of 0x60000000
929 * - Data errors checking is disabled
930 * - Read and write access
932 * - Access are handled by the memory controller according to MSEL
933 * - Not used for atomic operations
934 * - No data pipelining is done
937 # define CFG_BR6_PRELIM ((CFG_FLASH1_BASE & BRx_BA_MSK) |\
942 /* OR6 is configured as follows:
945 * - *BCTL0 is asserted upon access to the current memory bank
946 * - *CW / *WE are negated a quarter of a clock earlier
947 * - *CS is output at the same time as the address lines
948 * - Uses a clock cycle length of 5
949 * - *PSDVAL is generated internally by the memory controller
950 * unless *GTA is asserted earlier externally.
951 * - Relaxed timing is generated by the GPCM for accesses
952 * initiated to this memory region.
953 * - One idle clock is inserted between a read access from the
954 * current bank and the next access.
956 # define CFG_OR6_PRELIM (MEG_TO_AM(CFG_FLASH1_SIZE) |\
962 #endif /* (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE)) */
964 /*-----------------------------------------------------------------------
965 * BR7 - Base Register
966 * Ref: Section 10.3.1 on page 10-14
967 * OR7 - Option Register
968 * Ref: Section 10.3.2 on page 10-18
969 *-----------------------------------------------------------------------
972 /* Bank 7 - LEDs and switches
974 * LEDs are at 0x00001 (write only)
975 * switches are at 0x00001 (read only)
979 /* BR7 is configured as follows:
981 * - Base address of 0xA0000000
983 * - Data errors checking is disabled
984 * - Read and write access
986 * - Access are handled by the memory controller according to MSEL
987 * - Not used for atomic operations
988 * - No data pipelining is done
991 # define CFG_BR7_PRELIM ((CFG_LED_BASE & BRx_BA_MSK) |\
996 /* OR7 is configured as follows:
999 * - *BCTL0 is asserted upon access to the current memory bank
1000 * - *CW / *WE are negated a quarter of a clock earlier
1001 * - *CS is output at the same time as the address lines
1002 * - Uses a clock cycle length of 15
1003 * - *PSDVAL is generated internally by the memory controller
1004 * unless *GTA is asserted earlier externally.
1005 * - Relaxed timing is generated by the GPCM for accesses
1006 * initiated to this memory region.
1007 * - One idle clock is inserted between a read access from the
1008 * current bank and the next access.
1010 # define CFG_OR7_PRELIM (ORxG_AM_MSK |\
1016 #endif /* CFG_LED_BASE */
1019 * Internal Definitions
1023 #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
1024 #define BOOTFLAG_WARM 0x02 /* Software reboot */
1026 #endif /* __CONFIG_H */