tcl: [3/3] prepare for jimtcl 0.81 'expr' syntax change

Jimtcl commit 1843b79a03dd ("expr: TIP 526, only support a single
arg") drops the support for multi-argument syntax for the TCL
command 'expr'.

Fix manually the remaining lines that don't match simple patterns
and would require dedicated boring scripting.
Remove the 'expr' command where appropriate.

Change-Id: Ia75210c8447f88d38515addab4a836af9103096d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6161
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Antonio Borneo
2021-04-10 18:28:52 +02:00
parent f855fdcf0d
commit 64d89d5ee1
33 changed files with 109 additions and 109 deletions

View File

@@ -24,7 +24,7 @@ set sp_reset_mode ""
proc sp_is_halted {} {
global sp_target_name
return [expr [string compare [$sp_target_name curstate] "halted" ] == 0]
return [expr {[string compare [$sp_target_name curstate] "halted" ] == 0}]
}
# wait for reset button to be pressed, causing CPU to get halted

View File

@@ -19,7 +19,7 @@ proc sp3xx_clock_default {} {
mww 0xfca00014 0x0ffffff8 ;# set pll timeout to minimum (100us ?!?)
# DDRCORE disable to change frequency
set val [expr ([mrw 0xfca8002c] & ~0x20000000) | 0x40000000]
set val [expr {([mrw 0xfca8002c] & ~0x20000000) | 0x40000000}]
mww 0xfca8002c $val
mww 0xfca8002c $val ;# Yes, write twice!
@@ -29,7 +29,7 @@ proc sp3xx_clock_default {} {
mww 0xfca80008 0x00001c0e ;# enable
mww 0xfca80008 0x00001c06 ;# strobe
mww 0xfca80008 0x00001c0e
while { [expr [mrw 0xfca80008] & 0x01] == 0x00 } { sleep 1 }
while { [expr {[mrw 0xfca80008] & 0x01}] == 0x00 } { sleep 1 }
# programming PLL2
mww 0xfca80018 0xa600010c ;# M=166, P=1, N=12
@@ -37,13 +37,13 @@ proc sp3xx_clock_default {} {
mww 0xfca80014 0x00001c0e ;# enable
mww 0xfca80014 0x00001c06 ;# strobe
mww 0xfca80014 0x00001c0e
while { [expr [mrw 0xfca80014] & 0x01] == 0x00 } { sleep 1 }
while { [expr {[mrw 0xfca80014] & 0x01}] == 0x00 } { sleep 1 }
mww 0xfca80028 0x00000082 ;# enable plltimeen
mww 0xfca80024 0x00000511 ;# set hclkdiv="/2" & pclkdiv="/2"
mww 0xfca00000 0x00000004 ;# setting SYSCTL to NORMAL mode
while { [expr [mrw 0xfca00000] & 0x20] != 0x20 } { sleep 1 }
while { [expr {[mrw 0xfca00000] & 0x20}] != 0x20 } { sleep 1 }
# Select source of DDR clock
#mmw 0xfca80020 0x10000000 0x70000000 ;# PLL1