Add function to read and dump address
authorVenkateswara Rao Mandela <venkat.mandela@ti.com>
Thu, 30 Mar 2017 08:16:34 +0000 (13:46 +0530)
committerVenkateswara Rao Mandela <venkat.mandela@ti.com>
Thu, 30 Mar 2017 08:36:23 +0000 (14:06 +0530)
debug/dss_clockdumps.sh

index 52e1053b956ed87f62dd5e561c287ec1fcbb4a91..fb1d5bced494ad0da256a2bc1b366393094a5b9a 100755 (executable)
@@ -52,6 +52,18 @@ mask=$3
        fi
 }
 
+# Dump a register value given the address and the register name
+# also exports a variable of the given name with the read value
+dump_reg() {
+    reg=$1
+    regname=$2
+    local __outname=$2
+    val=0x$($OMAPCONF read "$reg")
+    echo "$regname ($reg) = $val"
+    echo
+    eval "$__outname"="'$val'"
+}
+
 get_field() {
 start=$1
 offset=$2