diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-11-23 14:57:01 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-12-04 13:52:43 +0100 |
commit | 798512e5522685163c8d5fc5093aea19ae9cce06 (patch) | |
tree | 550301e5736629664bc75dbb218b0bcc9ce50c4f /hw/acpi_piix4.c | |
parent | 4a522de0905c88160b6f93eb5d35883382a0c333 (diff) |
acpi: switch smbus to memory api
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/acpi_piix4.c')
-rw-r--r-- | hw/acpi_piix4.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index cf8aa3d7d7..9e6c97ebd3 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -391,8 +391,8 @@ static int piix4_pm_initfn(PCIDevice *dev) pci_conf[0x90] = s->smb_io_base | 1; pci_conf[0x91] = s->smb_io_base >> 8; pci_conf[0xd2] = 0x09; - register_ioport_write(s->smb_io_base, 64, 1, smb_ioport_writeb, &s->smb); - register_ioport_read(s->smb_io_base, 64, 1, smb_ioport_readb, &s->smb); + pm_smbus_init(&s->dev.qdev, &s->smb); + memory_region_add_subregion(get_system_io(), s->smb_io_base, &s->smb.io); memory_region_init(&s->io, "piix4-pm", 64); memory_region_set_enabled(&s->io, false); @@ -406,7 +406,6 @@ static int piix4_pm_initfn(PCIDevice *dev) s->powerdown_notifier.notify = piix4_pm_powerdown_req; qemu_register_powerdown_notifier(&s->powerdown_notifier); - pm_smbus_init(&s->dev.qdev, &s->smb); s->machine_ready.notify = piix4_pm_machine_ready; qemu_add_machine_init_done_notifier(&s->machine_ready); qemu_register_reset(piix4_reset, s); |