aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi_ich9.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/acpi_ich9.c')
-rw-r--r--hw/acpi_ich9.c18
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);