mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
apci: switch cnt to memory api
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
77d58b1e47
commit
afafe4bbe0
5 changed files with 36 additions and 31 deletions
|
@ -116,9 +116,6 @@ static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val)
|
|||
pm->acpi_regs.pm1.evt.en = val;
|
||||
pm_update_sci(pm);
|
||||
break;
|
||||
case ICH9_PMIO_PM1_CNT:
|
||||
acpi_pm1_cnt_write(&pm->acpi_regs, val, 0);
|
||||
break;
|
||||
default:
|
||||
pm_ioport_write_fallback(opaque, addr, 2, val);
|
||||
break;
|
||||
|
@ -138,9 +135,6 @@ static uint32_t pm_ioport_readw(void *opaque, uint32_t addr)
|
|||
case ICH9_PMIO_PM1_EN:
|
||||
val = pm->acpi_regs.pm1.evt.en;
|
||||
break;
|
||||
case ICH9_PMIO_PM1_CNT:
|
||||
val = pm->acpi_regs.pm1.cnt.cnt;
|
||||
break;
|
||||
default:
|
||||
val = pm_ioport_read_fallback(opaque, addr, 2);
|
||||
break;
|
||||
|
@ -318,7 +312,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_cnt_init(&pm->acpi_regs);
|
||||
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue