intel_reg_{read,write}: switch to INREG and OUTREG

Use INREG and OUTREG instead of using mmio directly.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula
2015-04-15 15:47:34 +03:00
parent 87eb37c86b
commit 12d785bcd4
2 changed files with 5 additions and 8 deletions
+2 -3
View File
@@ -51,8 +51,7 @@ static void dump_range(uint32_t start, uint32_t end)
int i;
for (i = start; i < end; i += 4)
printf("0x%X : 0x%X\n", i,
*(volatile uint32_t *)((volatile char*)mmio + i));
printf("0x%X : 0x%X\n", i, INREG(i));
}
static void usage(char *cmdname)
@@ -130,7 +129,7 @@ int main(int argc, char** argv)
dump_range(reg, reg + (dwords * 4));
if (decode_bits)
bit_decode(*(volatile uint32_t *)((volatile char*)mmio + reg));
bit_decode(INREG(reg));
}
}