iMX target config script's ported from Freescale BSP.
[openocd.git] / tcl / target / imx.cfg
blob16773fa59985dc00dcff956224c7bd32e68f8356
1 # utility fn's for Freescale i.MX series
3 global TARGETNAME 
4 set TARGETNAME $_TARGETNAME
6 # rewrite commands of the form below to arm11 mcr...
7 #       Data.Set c15:0x042f %long 0x40000015
8 proc setc15 {regs value} {
9         global TARGETNAME 
11         echo [format "set p15 0x%04x, 0x%08x" $regs $value] 
13         arm11 mcr $TARGETNAME 15 [expr ($regs>>12)&0x7] [expr ($regs>>0)&0xf] [expr ($regs>>4)&0xf] [expr ($regs>>8)&0x7] $value 
17 proc imx3x_reset {} {
18         # this reset script comes from the Freescale PDK
19         #
20         # http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX35PDK
21         
22         echo "Target Setup: initialize DRAM controller and peripherals"
23         
24 #       Data.Set c15:0x01 %long 0x00050078
25         setc15 0x01 0x00050078
26         
27         echo "configuring CP15 for enabling the peripheral bus"
28 #       Data.Set c15:0x042f %long 0x40000015
29         setc15 0x042f 0x40000015