diff options
author | Julien Grall <julien.grall@citrix.com> | 2012-09-19 12:50:03 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-12-04 14:50:21 +0100 |
commit | 42d8a3cf960659069bd2b2d9c443dafd7585607f (patch) | |
tree | 1cf71873d173a05758a02ed859270a09602cbec0 /hw/apm.h | |
parent | ac10027327e27c9b360452e01af3ef2147f5a26f (diff) | |
download | hqemu-42d8a3cf960659069bd2b2d9c443dafd7585607f.zip hqemu-42d8a3cf960659069bd2b2d9c443dafd7585607f.tar.gz |
hw/apm.c: Replace register_ioport_*
Replace all register_ioport_*() with a MemoryRegion.
This permits to use the new Memory stuff like listeners.
Moreover, the PCI device is added as an argument for apm_init(),
so we can register IO inside the PCI IO address space.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
[AF: Rebased onto hwaddr and q35]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/apm.h')
-rw-r--r-- | hw/apm.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,6 +4,7 @@ #include <stdint.h> #include "qemu-common.h" #include "hw.h" +#include "memory.h" typedef void (*apm_ctrl_changed_t)(uint32_t val, void *arg); @@ -13,9 +14,11 @@ typedef struct APMState { apm_ctrl_changed_t callback; void *arg; + MemoryRegion io; } APMState; -void apm_init(APMState *s, apm_ctrl_changed_t callback, void *arg); +void apm_init(PCIDevice *dev, APMState *s, apm_ctrl_changed_t callback, + void *arg); extern const VMStateDescription vmstate_apm; |