tcl/target: add SPDX tag
[fw/openocd] / tcl / target / pxa270.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #Marvell/Intel PXA270 Script
4
5 if { [info exists CHIPNAME] } {
6    set _CHIPNAME $CHIPNAME
7 } else {
8    set _CHIPNAME pxa270
9 }
10
11 if { [info exists ENDIAN] } {
12    set _ENDIAN $ENDIAN
13 } else {
14    set _ENDIAN little
15 }
16
17 #IDs for pxa270. Are there more?
18 if { [info exists CPUTAPID] } {
19    set _CPUTAPID $CPUTAPID
20 } else {
21   # set useful default
22    set _CPUTAPID 0x49265013
23 }
24
25 if { [info exists CPUTAPID2] } {
26    set _CPUTAPID2 $CPUTAPID2
27 } else {
28   # set useful default
29    set _CPUTAPID2 0x79265013
30 }
31
32 if { [info exists CPUTAPID3] } {
33    set _CPUTAPID2 $CPUTAPID3
34 } else {
35   # set useful default
36    set _CPUTAPID3 0x89265013
37 }
38
39 # set adapter srst delay to the delay introduced by your reset circuit
40 # the rest of the needed delays are built into the openocd program
41 adapter srst delay 260
42 # set the jtag_ntrst_delay to the delay introduced by a reset circuit
43 # the rest of the needed delays are built into the openocd program
44 jtag_ntrst_delay 250
45
46 set _TARGETNAME $_CHIPNAME.cpu
47 jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id $_CPUTAPID -expected-id $_CPUTAPID2 -expected-id $_CPUTAPID3
48
49 target create $_TARGETNAME xscale -endian $_ENDIAN -chain-position $_TARGETNAME
50 # maps to PXA internal RAM. If you are using a PXA255
51 # you must initialize SDRAM or leave this option off
52 $_TARGETNAME configure -work-area-phys 0x5c000000 -work-area-size 0x10000 -work-area-backup 0