@@ -81,8 +81,9 @@ struct PnvLpcController {
uint32_t lpc_hc_irqstat;
uint32_t lpc_hc_error_addr;
- /* XSCOM registers */
+ /* Registers */
MemoryRegion xscom_regs;
+ MemoryRegion mmio_regs;
/* PSI to generate interrupts */
qemu_irq psi_irq;
@@ -1565,7 +1565,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
return;
}
memory_region_add_subregion(get_system_memory(), PNV9_LPCM_BASE(chip),
- &chip9->lpc.xscom_regs);
+ &chip9->lpc.mmio_regs);
chip->fw_mr = &chip9->lpc.isa_fw;
chip->dt_isa_nodename = g_strdup_printf("/lpcm-opb@%" PRIx64 "/lpc@0",
@@ -1784,7 +1784,7 @@ static void pnv_chip_power10_realize(DeviceState *dev, Error **errp)
return;
}
memory_region_add_subregion(get_system_memory(), PNV10_LPCM_BASE(chip),
- &chip10->lpc.xscom_regs);
+ &chip10->lpc.mmio_regs);
chip->fw_mr = &chip10->lpc.isa_fw;
chip->dt_isa_nodename = g_strdup_printf("/lpcm-opb@%" PRIx64 "/lpc@0",
@@ -664,7 +664,7 @@ static void pnv_lpc_power9_realize(DeviceState *dev, Error **errp)
}
/* P9 uses a MMIO region */
- memory_region_init_io(&lpc->xscom_regs, OBJECT(lpc), &pnv_lpc_mmio_ops,
+ memory_region_init_io(&lpc->mmio_regs, OBJECT(lpc), &pnv_lpc_mmio_ops,
lpc, "lpcm", PNV9_LPCM_SIZE);
}
The P9 and P10 models re-used the xscom_regs memory region for the mmio access, which is confusing. Add a separate memory region in preparation for enabling both xscom and mmio access. Signed-off-by: Joel Stanley <joel@jms.id.au> --- include/hw/ppc/pnv_lpc.h | 3 ++- hw/ppc/pnv.c | 4 ++-- hw/ppc/pnv_lpc.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)