1 # SPDX-License-Identifier: GPL-2.0-or-later
5 if { [info exists CHIPNAME] } {
6 set _CHIPNAME $CHIPNAME
11 if { [info exists ENDIAN] } {
17 if { [info exists CPUTAPID] } {
18 set _CPUTAPID $CPUTAPID
20 set _CPUTAPID 0x07926021
24 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
26 # that TAP is associated with a target
27 set _TARGETNAME $_CHIPNAME.cpu
28 target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME
31 return [read_memory $addr 32 1]
34 # This function must be called on netX100/500 right after halt
35 # If it is called later the needed register cannot be written anymore
38 set accesskey [mread32 0x00100070]
39 mww 0x00100070 $accesskey
40 mww 0x0010002c 0x00000001
42 if {[expr {[mread32 0x0010002c] & 0x07}] == 0x07} {
43 puts "SDRAM Fix was not executed. Probably your CPU halted too late and the register is already locked!"
45 puts "SDRAM Fix succeeded!"