aboutsummaryrefslogtreecommitdiff
path: root/hw/i8259_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i8259_internal.h')
-rw-r--r--hw/i8259_internal.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/hw/i8259_internal.h b/hw/i8259_internal.h
index 13deb14b63..e9d1732759 100644
--- a/hw/i8259_internal.h
+++ b/hw/i8259_internal.h
@@ -31,6 +31,22 @@
typedef struct PICCommonState PICCommonState;
+#define TYPE_PIC_COMMON "pic-common"
+#define PIC_COMMON(obj) \
+ OBJECT_CHECK(PICCommon, (obj), TYPE_PIC_COMMON)
+#define PIC_COMMON_CLASS(klass) \
+ OBJECT_CLASS_CHECK(PICCommonClass, (klass), TYPE_PIC_COMMON)
+#define PIC_COMMON_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(PICCommonClass, (obj), TYPE_PIC_COMMON)
+
+typedef struct PICCommonClass
+{
+ ISADeviceClass parent_class;
+ void (*init)(PICCommonState *s);
+ void (*pre_save)(PICCommonState *s);
+ void (*post_load)(PICCommonState *s);
+} PICCommonClass;
+
struct PICCommonState {
ISADevice dev;
uint8_t last_irr; /* edge detection */
@@ -58,19 +74,10 @@ struct PICCommonState {
MemoryRegion elcr_io;
};
-typedef struct PICCommonInfo PICCommonInfo;
-
-struct PICCommonInfo {
- ISADeviceInfo isadev;
- void (*init)(PICCommonState *s);
- void (*pre_save)(PICCommonState *s);
- void (*post_load)(PICCommonState *s);
-};
-
void pic_reset_common(PICCommonState *s);
ISADevice *i8259_init_chip(const char *name, ISABus *bus, bool master);
-void pic_qdev_register(PICCommonInfo *info);
+void pic_qdev_register(DeviceInfo *info);
#endif /* !QEMU_I8259_INTERNAL_H */