diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-22 13:25:10 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-12-04 13:52:42 +0100 |
commit | b5a7c024d2606e84e0bbe4a0e87d252dfda41479 (patch) | |
tree | 783990524715b6b0bf66044196b519ae83c976be /hw/acpi_ich9.c | |
parent | afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4 (diff) |
apci: switch evt to memory api
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/acpi_ich9.c')
-rw-r--r-- | hw/acpi_ich9.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c index 7b6c2ef4dc..3b5bac6d49 100644 --- a/hw/acpi_ich9.c +++ b/hw/acpi_ich9.c @@ -105,17 +105,7 @@ static uint32_t pm_ioport_readb(void *opaque, uint32_t addr) static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val) { - ICH9LPCPMRegs *pm = opaque; - switch (addr & ICH9_PMIO_MASK) { - case ICH9_PMIO_PM1_STS: - acpi_pm1_evt_write_sts(&pm->acpi_regs, val); - pm_update_sci(pm); - break; - case ICH9_PMIO_PM1_EN: - pm->acpi_regs.pm1.evt.en = val; - pm_update_sci(pm); - break; default: pm_ioport_write_fallback(opaque, addr, 2, val); break; @@ -125,16 +115,9 @@ static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val) static uint32_t pm_ioport_readw(void *opaque, uint32_t addr) { - ICH9LPCPMRegs *pm = opaque; uint32_t val; switch (addr & ICH9_PMIO_MASK) { - case ICH9_PMIO_PM1_STS: - val = acpi_pm1_evt_get_sts(&pm->acpi_regs); - break; - case ICH9_PMIO_PM1_EN: - val = pm->acpi_regs.pm1.evt.en; - break; default: val = pm_ioport_read_fallback(opaque, addr, 2); break; @@ -312,6 +295,7 @@ void ich9_pm_init(ICH9LPCPMRegs *pm, qemu_irq sci_irq, qemu_irq cmos_s3) memory_region_add_subregion(get_system_io(), 0, &pm->io); acpi_pm_tmr_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io); + acpi_pm1_evt_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io); acpi_pm1_cnt_init(&pm->acpi_regs, &pm->io); acpi_gpe_init(&pm->acpi_regs, ICH9_PMIO_GPE0_LEN); acpi_gpe_blk(&pm->acpi_regs, ICH9_PMIO_GPE0_STS); |