tcl/target: add SPDX tag
[fw/openocd] / tcl / target / epc9301.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # Cirrus Logic EP9301 processor on an Olimex CS-E9301 board.
4
5 if { [info exists CHIPNAME] } {
6    set _CHIPNAME $CHIPNAME
7 } else {
8    set _CHIPNAME ep9301
9 }
10
11 if { [info exists ENDIAN] } {
12    set _ENDIAN $ENDIAN
13 } else {
14    set _ENDIAN little
15 }
16
17 if { [info exists CPUTAPID] } {
18    set _CPUTAPID $CPUTAPID
19 } else {
20    # Force an error until we get a good number.
21    set _CPUTAPID 0xffffffff
22 }
23
24 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
25 adapter srst delay 100
26 jtag_ntrst_delay 100
27
28 set _TARGETNAME $_CHIPNAME.cpu
29 target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME -work-area-phys 0x80014000 -work-area-size 0x1000 -work-area-backup 1
30
31 #flash configuration
32 #flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
33 set _FLASHNAME $_CHIPNAME.flash
34 flash bank $_FLASHNAME cfi 0x60000000 0x1000000 2 2 $_TARGETNAME