proc mmu_off {} {
set cp [arm mrc 15 0 1 0 0]
- set cp [expr ($cp & ~1)]
+ set cp [expr {$cp & ~1}]
arm mcr 15 0 1 0 0 $cp
}
proc mmu_on {} {
set cp [arm mrc 15 0 1 0 0]
- set cp [expr ($cp | 1)]
+ set cp [expr {$cp | 1}]
arm mcr 15 0 1 0 0 $cp
}
global _TARGETNAME_1
global _SMP
targets $_TARGETNAME_1
- if { [expr ($_SMP == 1)] } {
+ if { $_SMP == 1 } {
cortex_a smp off
}
rst_run
halt
- if { [expr ($_SMP == 1)]} {
+ if { $_SMP == 1 } {
cortex_a smp on
}
}
irscan $_CHIPNAME.jrc 0x3a
drscan $_CHIPNAME.jrc 4 0
set pwrsts [drscan $_CHIPNAME.jrc 16 0]
- echo "pwrsts ="$pwrsts
- set a9 [expr (0x$pwrsts & 0xc)]
- set ape [expr (0x$pwrsts & 0x3)]
+ echo "pwrsts ="$pwrsts
+ set a9 [expr "0x$pwrsts & 0xc"]
+ set ape [expr "0x$pwrsts & 0x3"]
if {[string equal "0" $ape]} {
echo "ape off"
} else {
irscan $_CHIPNAME.jrc 0x3a
drscan $_CHIPNAME.jrc 4 0
set pwrsts [drscan $_CHIPNAME.jrc 16 0]
- set pwrsts [expr (0x$pwrsts & 0xc)]
+ set pwrsts [expr "0x$pwrsts & 0xc"]
while {[string equal "4" $pwrsts] && $i<20} {
irscan $_CHIPNAME.jrc 0x3a
drscan $_CHIPNAME.jrc 4 0;
set pwrsts [drscan $_CHIPNAME.jrc 16 0]
- set pwrsts [expr (0x$pwrsts & 0xc)]
+ set pwrsts [expr "0x$pwrsts & 0xc"]
if {![string equal "4" $pwrsts]} {
set result 1
} else {
drscan $_CHIPNAME.jrc 4 4
set secsts1 [drscan $_CHIPNAME.jrc 16 0]
echo "secsts1 ="$secsts1
- set secsts1 [expr (0x$secsts1 & 0x4)]
+ set secsts1 [expr "0x$secsts1 & 0x4"]
if {![string equal "4" $secsts1]} {
echo "APE target secured"
} else {
drscan $_CHIPNAME.jrc 4 4
set secsts1 [drscan $_CHIPNAME.jrc 16 0]
echo "secsts1 ="$secsts1
- set secsts1 [expr (0x$secsts1 & 0x4)]
+ set secsts1 [expr "0x$secsts1 & 0x4"]
if {[string equal "4" $secsts1]} {
if {[poll_pwrsts]==1} {
enable_apetap
drscan $_CHIPNAME.jrc 4 4
set secsts1 [drscan $_CHIPNAME.jrc 16 0]
echo "secsts1 ="$secsts1
- set secsts1 [expr (0x$secsts1 & 0x4)]
+ set secsts1 [expr "0x$secsts1 & 0x4"]
while {![string equal "4" $secsts1]} {
irscan u8500.jrc 0x3a
drscan u8500.jrc 4 4
set secsts1 [drscan $_CHIPNAME.jrc 16 0]
echo "secsts1 ="$secsts1
- set secsts1 [expr (0x$secsts1 & 0x4)]
+ set secsts1 [expr "0x$secsts1 & 0x4"]
}
echo "ape debugable"
enable_apetap