From edefee988045558d5d306453ce352dc06bcb7a03 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Tue, 21 Sep 2010 16:06:37 +0800 Subject: 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 --- tcl/target/c100helper.tcl | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'tcl/target/c100helper.tcl') diff --git a/tcl/target/c100helper.tcl b/tcl/target/c100helper.tcl index 45adc62c..32510660 100644 --- a/tcl/target/c100helper.tcl +++ b/tcl/target/c100helper.tcl @@ -25,13 +25,7 @@ proc helpC100 {} { puts "22) flashUBOOT: will prgram NOR sectors 0-3 with u-boot.bin" } -# mrw,mmw from davinci.cfg -# mrw: "memory read word", returns value of $reg -proc mrw {reg} { - set value "" - mem2array value 32 $reg 1 - return $value(0) -} +source [find mem_helper.tcl] # read a 64-bit register (memory mapped) proc mr64bit {reg} { @@ -50,14 +44,6 @@ proc mw64bit {reg value} { mww [expr $reg+4] $high } -# 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 -} - proc showNOR {} { puts "This is the current NOR setup" -- cgit v1.2.3