; BDI-2000 Configuration file for the MPC8349E-mITX-GP ; Tip: If after a reset, the BDI-2000 fails to halt at 0x100, ; you may need to power-down the board for a few seconds. [INIT] ; We cannot relocate the IMMR to 0xE0000000 because U-Boot ; expects it to be at 0xFF400000. To be sure, we relocate it back ; to 0xFF400000 if it's at E0000000. ;WM32 0xE0000000 0xFF400000 ; The rest of the [INIT] section is used to configure flash and DDR so that ; we can do flash updates from the BDI-2000. ; Keep in mind that U-Boot expects the processor and all IMMR registers to ; be at their power-on default values, so the stuff we do here could prevent ; U-Boot from booting properly. If in doubt, just delete this section and ; try again. ; The first thing we do is program the memory window for flash. Normally, ; we'd use LBLAWBAR0, but that interferes with U-Boot. But if we do that, then ; U-Boot won't boot. Using LBLAWBAR3, etc usually works, though. ; WINDOW 0 - Flash WM32 0xFF400038 0xFE000000 ; LBLAWBAR3 WM32 0xFF40003C 0x80000016 ; LBLAWAR3 WM32 0xFF405018 0xfe001001 ; BR3 WM32 0xFF40501C 0xff806ff7 ; OR3 (8MB flash) ; DDR Local Access Windows ; WINDOW 0 - 1st DDR SODIMM WM32 0xFF4000a0 0x00000000 ; DDRLAWBAR0 WM32 0xFF4000a4 0x8000001A ; DDRLAWAR0 (128MB) ; Temporarily disable the memory interface for reconfiguration WM32 0xFF402110 0x42000000 ; DDR_SDRAM_CFG ; Now program the DDR with the right configuration and timing values. These ; values are specific to the DDR module you have installed. The easiest way ; to determine these values is from a working U-Boot. Just read these ; registers with the "md" command. Remember that U-Boot relocates the IMMR ; to 0xE0000000. ;WM32 0xFF402000 0x00000007 ; CS0_BNDS ;WM32 0xFF402080 0x80000101 ; CS0_CONFIG WM32 0xFF402108 0x36332321 ; TIMING_CONFIG_1 WM32 0xFF40210C 0x00000800 ; TIMING_CONFIG_2 WM32 0xFF402118 0x00000022 ; SDRAM MODE WM32 0xFF402124 0x045b0100 ; SDRAM INTERVAL WM32 0xFF402130 0x00000000 ; SDRAM CLOCK CONTROL ; Re-enable the DDR memory controller WM32 0xFF402110 0xC2000000 ; DDR_SDRAM_CFG ;WM32 0xFF4050d0 0x00000000 ; LBCR ;WM32 0xFF4050d4 0x80000004 ; LCRR ; Unlock flash in BCSR1 WM32 0xFF400800 0x00000000 ; ACR [TARGET] CPUTYPE 8349 JTAGCLOCK 0 STARTUP RESET BREAKMODE HARD STEPMODE HWBP BOOTADDR 0x00000100 ;If flash has been corrupted, you may need to uncomment this line. RCW 0xb060a000 0x04040000 ;If you're getting "Writing to workspace failed" errors during flash operations, ;then try uncommenting this line instead. This moves the flash window to ;high memory, leaving low memory available for DDR. ;RCW 0xb460a000 0x04040000 [HOST] IP 192.168.1.1 FILE $u-boot.bin LOAD MANUAL PROMPT 8349E-mITX-GP> DUMP itx-dump.bin [FLASH] CHIPTYPE AM29BX16 CHIPSIZE 0x800000 BUSWIDTH 16 ;WORKSPACE 0x1000 FORMAT BIN 0xfe000000 ;flash_image.bin is an image file of an entire 8MB flash region. ;Flash this file at 0xfe0000000 to restore all of flash. ;ERASE 0xFE000000 0x10000 127 ; 127 sectors @ 64KB each ;ERASE 0xFE7F0000 0x2000 8 ; 8 sectors @ 8KB each ;FILE $flash_image.bin ;Use these lines if you just want to flash U-Boot ERASE 0xfe000000 0x10000 4 ; Erase 256KB, each sector is 64KB FILE $u-boot.bin [REGS] FILE $reg8349e.def