diff options
Diffstat (limited to 'tcl/target')
-rw-r--r-- | tcl/target/c100helper.tcl | 16 | ||||
-rw-r--r-- | tcl/target/davinci.cfg | 15 | ||||
-rw-r--r-- | tcl/target/stellaris.cfg | 7 |
3 files changed, 3 insertions, 35 deletions
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" 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 diff --git a/tcl/target/stellaris.cfg b/tcl/target/stellaris.cfg index 6ba5f14a..b663ce3d 100644 --- a/tcl/target/stellaris.cfg +++ b/tcl/target/stellaris.cfg @@ -46,12 +46,7 @@ $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE # this, if you're using a slower clock. adapter_khz 500 -# 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] $_TARGETNAME configure -event reset-start { adapter_khz 500 |