diff mbox

[i-g-t,1/3] quick_dump: Add automagic DPIO register support

Message ID 1372269454-31057-1-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä June 26, 2013, 5:57 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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>
---
 tools/quick_dump/quick_dump.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Ben Widawsky July 1, 2013, 5:09 a.m. UTC | #1
On Wed, Jun 26, 2013 at 08:57:32PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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>
> ---
>  tools/quick_dump/quick_dump.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/quick_dump/quick_dump.py b/tools/quick_dump/quick_dump.py
> index 6111b5d..390cafa 100755
> --- a/tools/quick_dump/quick_dump.py
> +++ b/tools/quick_dump/quick_dump.py
> @@ -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('')

I can't recall if you have push access, but I've pushed it.
diff mbox

Patch

diff --git a/tools/quick_dump/quick_dump.py b/tools/quick_dump/quick_dump.py
index 6111b5d..390cafa 100755
--- a/tools/quick_dump/quick_dump.py
+++ b/tools/quick_dump/quick_dump.py
@@ -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('')