1 #Written by: Michael Schwingen <rincewind@discworld.dascon.de>
3 if { [info exists CHIPNAME] } {
4 set _CHIPNAME $CHIPNAME
6 set _CHIPNAME xba_reva3
9 if { [info exists ENDIAN] } {
12 # default to big endian
16 if { [info exists CPUTAPID ] } {
17 set _CPUTAPID $CPUTAPID
19 # force an error till we get a good number
20 set _CPUTAPID 0xffffffff
23 reset_config trst_and_srst separate
29 jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id $_CPUTAPID
31 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
32 target create $_TARGETNAME xscale -endian $_ENDIAN -chain-position $_TARGETNAME -variant ixp42x
33 $_TARGETNAME configure -event reset-init {
34 #############################################################################
35 # setup expansion bus CS, disable external wdt
36 #############################################################################
37 mww 0xc4000000 0xbd113842 #CS0 : Flash, write enabled @0x50000000
38 mww 0xc4000004 0x94d10013 #CS1
39 mww 0xc4000008 0x95960003 #CS2
40 mww 0xc400000c 0x00000000 #CS3
41 mww 0xc4000010 0x80900003 #CS4
42 mww 0xc4000014 0x9d520003 #CS5
43 mww 0xc4000018 0x81860001 #CS6
44 mww 0xc400001c 0x80900003 #CS7
46 #############################################################################
47 # init SDRAM controller: 16MB, one bank, CL3
48 #############################################################################
49 mww 0xCC000000 0x2A # SDRAM_CFG: 64MBit, CL3
50 mww 0xCC000004 0 # disable refresh
51 mww 0xCC000008 3 # NOP
53 mww 0xCC000004 2100 # set refresh counter
54 mww 0xCC000008 2 # Precharge All Banks
56 mww 0xCC000008 4 # Auto Refresh
57 mww 0xCC000008 4 # Auto Refresh
58 mww 0xCC000008 4 # Auto Refresh
59 mww 0xCC000008 4 # Auto Refresh
60 mww 0xCC000008 4 # Auto Refresh
61 mww 0xCC000008 4 # Auto Refresh
62 mww 0xCC000008 4 # Auto Refresh
63 mww 0xCC000008 4 # Auto Refresh
64 mww 0xCC000008 1 # Mode Select CL3
66 #mww 0xc4000020 0xffffee # CFG0: remove expansion bus boot flash
78 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20010000 -work-area-size 0x8060 -work-area-backup 0
81 flash bank cfi 0x50000000 0x400000 2 2 0