aboutsummaryrefslogtreecommitdiff
path: root/tcl/target/imx.cfg
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2009-10-14 10:34:41 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2009-10-14 11:04:44 +0200
commit44e9200d0a51b432aa8f1449046780fa8c7a6069 (patch)
tree4547fb35e99f9663a82fe7c08a028e743fd5e8f1 /tcl/target/imx.cfg
parent1ee8ef4210174d8d48977d145e9fa9a45d36a9ae (diff)
downloadriscv-openocd-44e9200d0a51b432aa8f1449046780fa8c7a6069.zip
riscv-openocd-44e9200d0a51b432aa8f1449046780fa8c7a6069.tar.gz
riscv-openocd-44e9200d0a51b432aa8f1449046780fa8c7a6069.tar.bz2
iMX target config script's ported from Freescale BSP.
Diffstat (limited to 'tcl/target/imx.cfg')
-rw-r--r--tcl/target/imx.cfg30
1 files changed, 30 insertions, 0 deletions
diff --git a/tcl/target/imx.cfg b/tcl/target/imx.cfg
new file mode 100644
index 0000000..16773fa
--- /dev/null
+++ b/tcl/target/imx.cfg
@@ -0,0 +1,30 @@
+# utility fn's for Freescale i.MX series
+
+global TARGETNAME
+set TARGETNAME $_TARGETNAME
+
+# rewrite commands of the form below to arm11 mcr...
+# Data.Set c15:0x042f %long 0x40000015
+proc setc15 {regs value} {
+ global TARGETNAME
+
+ echo [format "set p15 0x%04x, 0x%08x" $regs $value]
+
+ arm11 mcr $TARGETNAME 15 [expr ($regs>>12)&0x7] [expr ($regs>>0)&0xf] [expr ($regs>>4)&0xf] [expr ($regs>>8)&0x7] $value
+}
+
+
+proc imx3x_reset {} {
+ # this reset script comes from the Freescale PDK
+ #
+ # http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX35PDK
+
+ echo "Target Setup: initialize DRAM controller and peripherals"
+
+# Data.Set c15:0x01 %long 0x00050078
+ setc15 0x01 0x00050078
+
+ echo "configuring CP15 for enabling the peripheral bus"
+# Data.Set c15:0x042f %long 0x40000015
+ setc15 0x042f 0x40000015
+}