qemu/hw/apm.h
Julien Grall 42d8a3cf96 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>
2012-12-04 14:50:21 +01:00

26 lines
482 B
C

#ifndef APM_H
#define APM_H
#include <stdint.h>
#include "qemu-common.h"
#include "hw.h"
#include "memory.h"
typedef void (*apm_ctrl_changed_t)(uint32_t val, void *arg);
typedef struct APMState {
uint8_t apmc;
uint8_t apms;
apm_ctrl_changed_t callback;
void *arg;
MemoryRegion io;
} APMState;
void apm_init(PCIDevice *dev, APMState *s, apm_ctrl_changed_t callback,
void *arg);
extern const VMStateDescription vmstate_apm;
#endif /* APM_H */