
#setMMRBaseAddr 0xFF400000
writereg	MBAR	0xFF400000

##############################################
# System Configuration - Local Access Windows 
##############################################

# Local Bus Local Access Windows
#################################
# WINDOW 0 - FLASH
writemem.l 0xff400020 0xfe000000 # LBLAWBAR0  - begining at 0xfe000000 
writemem.l 0xff400024 0x80000018 # LBLAWAR0   - enable, size = 32MB 

##############################################
# Local Bus Interface (LBIU) Configuration
##############################################

# CS0 - 32MB FLASH 
writemem.l 0xff405000 0xFE001001 # BR0 base address at 0xFE000000, port size 16 bit, GPCM, valid
writemem.l 0xff405004 0xFE006ff7 # OR0 16MB flash size, 15 w.s., timing relaxed

# LBCR - local bus enable
writemem.l 0xff4050d0 0x00000000


# LSRT - refresh timer
writemem.l 0xff4050a4 0x3f000000

# System configuration registers

writemem.l 0xff400114 0x40000000 # SICRL

ANDMem.l 0xff400118 0x00000003 # SICRH

ANDMem.l 0xff400800 0x00300000 # ACR - Enable Core

	