David Brownell <david-b@pacbell.net> "set _TARGETNAME ..." cleanup
[fw/openocd] / tcl / target / imx35.cfg
1 # imx35 config
2 #
3
4 if { [info exists CHIPNAME] } { 
5    set  _CHIPNAME $CHIPNAME    
6 } else {         
7    set  _CHIPNAME imx35
8 }
9
10 if { [info exists ENDIAN] } {   
11    set  _ENDIAN $ENDIAN    
12 } else {         
13    set  _ENDIAN little
14 }
15
16 if { [info exists CPUTAPID ] } {
17    set _CPUTAPID $CPUTAPID
18 } else {
19    set _CPUTAPID 0x07b3601d
20 }
21
22 if { [info exists SDMATAPID ] } {
23    set _SDMATAPID $SDMATAPID
24 } else {
25    set _SDMATAPID 0x0882601d
26 }
27
28 #========================================
29 # The "system jtag controller" 
30 # IMX31 reference manual, page 6-28 - figure 6-14
31 if { [info exists SJCTAPID ] } {
32    set _SJCTAPID $SJCTAPID
33 } else {
34    set _SJCTAPID 0x2b900f0f
35 }
36
37 jtag newtap $_CHIPNAME sjc -irlen 4 -ircapture 0x0 -irmask 0x0 -expected-id $_SJCTAPID
38
39 jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
40
41 # No IDCODE for this TAP
42 jtag newtap $_CHIPNAME whatchacallit -irlen 4 -ircapture 0 -irmask 0x0 -expected-id 0x0
43
44 jtag newtap $_CHIPNAME smda -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_SDMATAPID
45
46 set _TARGETNAME $_CHIPNAME.cpu
47 target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME
48
49 proc power_restore {} { puts "Sensed power restore. No action." } 
50 proc srst_deasserted {} { puts "Sensed nSRST deasserted. No action." }