summaryrefslogtreecommitdiff
path: root/tcl/target/davinci.cfg
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2010-09-21 16:06:37 +0800
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-09-21 12:25:59 +0200
commitedefee988045558d5d306453ce352dc06bcb7a03 (patch)
tree65a641398a6e7515b3e5adcd2ceb3bb836ea85e8 /tcl/target/davinci.cfg
parentea48794210037699bdde44014238c10c9968a72d (diff)
downloadopenocd_libswd-edefee988045558d5d306453ce352dc06bcb7a03.tar.gz
openocd_libswd-edefee988045558d5d306453ce352dc06bcb7a03.tar.bz2
openocd_libswd-edefee988045558d5d306453ce352dc06bcb7a03.tar.xz
openocd_libswd-edefee988045558d5d306453ce352dc06bcb7a03.zip
TCL scripts: collect duplicated procedures
TCL procedures mrw and mmw, originally in DaVinci target code, are duplicated in other TCL scripts. Moved in a common helper file, and added help/usage description. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl/target/davinci.cfg')
-rw-r--r--tcl/target/davinci.cfg15
1 files changed, 1 insertions, 14 deletions
diff --git a/tcl/target/davinci.cfg b/tcl/target/davinci.cfg
index 6e9091e5..9e9369dc 100644
--- a/tcl/target/davinci.cfg
+++ b/tcl/target/davinci.cfg
@@ -7,20 +7,7 @@ proc davinci_pinmux {soc reg value} {
mww [expr [dict get $soc sysbase] + 4 * $reg] $value
}
-# mrw: "memory read word", returns value of $reg
-proc mrw {reg} {
- set value ""
- mem2array value 32 $reg 1
- return $value(0)
-}
-
-# mmw: "memory modify word", updates value of $reg
-# $reg <== ((value & ~$clearbits) | $setbits)
-proc mmw {reg setbits clearbits} {
- set old [mrw $reg]
- set new [expr ($old & ~$clearbits) | $setbits]
- mww $reg $new
-}
+source [find mem_helper.tcl]
#
# pll_setup: initialize PLL