aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi/aspeed_smc.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2021-10-12 08:20:08 +0200
committerCédric Le Goater <clg@kaod.org>2021-10-12 08:20:08 +0200
commite2804a1ec97ceede14b69a2a6e9a8b5dfa0b15c2 (patch)
tree360aa93c0291dc6557a7dbe6a45de2779e584ddd /hw/ssi/aspeed_smc.c
parenta8eb9a43337b3243204c0a5d270165ca2ac03910 (diff)
downloadqemu-e2804a1ec97ceede14b69a2a6e9a8b5dfa0b15c2.zip
qemu-e2804a1ec97ceede14b69a2a6e9a8b5dfa0b15c2.tar.gz
qemu-e2804a1ec97ceede14b69a2a6e9a8b5dfa0b15c2.tar.bz2
aspeed/smc: Dump address offset in trace events
The register index is currently printed and this is confusing. Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/ssi/aspeed_smc.c')
-rw-r--r--hw/ssi/aspeed_smc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index 7129341..8a988c1 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -728,7 +728,7 @@ static uint64_t aspeed_smc_read(void *opaque, hwaddr addr, unsigned int size)
addr < R_SEG_ADDR0 + asc->max_peripherals) ||
(addr >= s->r_ctrl0 && addr < s->r_ctrl0 + asc->max_peripherals)) {
- trace_aspeed_smc_read(addr, size, s->regs[addr]);
+ trace_aspeed_smc_read(addr << 2, size, s->regs[addr]);
return s->regs[addr];
} else {
@@ -1029,10 +1029,10 @@ static void aspeed_smc_write(void *opaque, hwaddr addr, uint64_t data,
AspeedSMCClass *asc = ASPEED_SMC_GET_CLASS(s);
uint32_t value = data;
- addr >>= 2;
-
trace_aspeed_smc_write(addr, size, data);
+ addr >>= 2;
+
if (addr == s->r_conf ||
(addr >= s->r_timings &&
addr < s->r_timings + asc->nregs_timings) ||