diff --git a/mt7621/mmio.tcl b/mt7621/mmio.tcl index 3fdd335..44c73db 100644 --- a/mt7621/mmio.tcl +++ b/mt7621/mmio.tcl @@ -3,22 +3,23 @@ # proc mmio_read_32 {addr} { - set result [read_memory $addr 32 1 phys] - return $result + set result "" + mem2array result 32 $addr 1 + return $result(0) } proc mmio_clrbits_32 {addr bits} { - mww $addr [expr "[mmio_read_32 $addr] & (~($bits))"] + mww $addr [expr [mmio_read_32 $addr] & (~($bits))] } proc mmio_setbits_32 {addr bits} { - mww $addr [expr "[mmio_read_32 $addr] | $bits"] + mww $addr [expr [mmio_read_32 $addr] | $bits] } proc mmio_clrsetbits_32 {addr clr set} { - mww $addr [expr "([mmio_read_32 $addr] & (~($clr))) | $set"] + mww $addr [expr ([mmio_read_32 $addr] & (~($clr))) | $set] } proc mmio_readfield_32 {addr shift mask} { - return [expr "([mmio_read_32 $addr] >> $shift) & $mask"] + return [expr ([mmio_read_32 $addr] >> $shift) & $mask] } diff --git a/mt7621/readme.txt b/mt7621/readme.txt index 5b91fc1..717b65d 100644 --- a/mt7621/readme.txt +++ b/mt7621/readme.txt @@ -3,7 +3,7 @@ Steps to load u-boot via JTAG == Note == It's suggested to use OpenOCD 0.12.0 or later version. -1. Connect to MT7988 board using mt7621.cfg +1. Connect to MT7621 board using mt7621.cfg 2. Halt the target > halt @@ -44,4 +44,4 @@ It's suggested to use OpenOCD 0.12.0 or later version. (Only mainline u-boot is supported by this guide) 9. All done - Now the u-boot should be running. \ No newline at end of file + Now the u-boot should be running.