quick_dump: Add automagic DPIO register support
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Jun 2013 17:57:32 +0000 (20:57 +0300)
committerBen Widawsky <ben@bwidawsk.net>
Mon, 1 Jul 2013 05:06:35 +0000 (22:06 -0700)
Repurpose the (currently unused) third element in the register
definition tuple to indicate the type of the register. 'DPIO'
is the only special register type for now.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
tools/quick_dump/quick_dump.py

index 6111b5d..390cafa 100755 (executable)
@@ -13,7 +13,10 @@ def parse_file(file):
        print('-' * 54)
        for line in file:
                register = ast.literal_eval(line)
-               val = reg.read(register[1])
+               if register[2] == 'DPIO':
+                       val = reg.dpio_read(register[1])
+               else:
+                       val = reg.read(register[1])
                intreg = int(register[1], 16)
                print('{0:#010x} | {1:<28} | {2:#010x}'.format(intreg, register[0], val))
        print('')