target/cortex_m: workaround Cortex-M7 erratum 3092511
[openocd.git] / tcl / target / imx.cfg
blobd76f60e1c6de21a671e425a6cbb93358e1831811
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # utility fn's for Freescale i.MX series
5 global TARGETNAME
6 set TARGETNAME $_TARGETNAME
8 # rewrite commands of the form below to arm11 mcr...
9 #       Data.Set c15:0x042f %long 0x40000015
10 proc setc15 {regs value} {
11         global TARGETNAME
13         echo [format "set p15 0x%04x, 0x%08x" $regs $value]
15         arm mcr 15 [expr {($regs>>12)&0x7}] [expr {($regs>>0)&0xf}] [expr {($regs>>4)&0xf}] [expr {($regs>>8)&0x7}] $value
19 proc imx3x_reset {} {
20         # this reset script comes from the Freescale PDK
21         #
22         # http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX35PDK
24         echo "Target Setup: initialize DRAM controller and peripherals"
26 #       Data.Set c15:0x01 %long 0x00050078
27         setc15 0x01 0x00050078
29         echo "configuring CP15 for enabling the peripheral bus"
30 #       Data.Set c15:0x042f %long 0x40000015
31         setc15 0x042f 0x40000015