aboutsummaryrefslogtreecommitdiffstats
path: root/hw/m48t59.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 11:52:49 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:47 -0600
commit8f04ee0882aec9fe91fb70f767edf5dacff59835 (patch)
tree01ebc9678569233858c2343c9cb04e62c2df55ad /hw/m48t59.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff)
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and converting subclasses independently is extremely hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/m48t59.c')
-rw-r--r--hw/m48t59.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/hw/m48t59.c b/hw/m48t59.c
index c0439966c..5912cd6b4 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -720,13 +720,19 @@ static int m48t59_init1(SysBusDevice *dev)
return 0;
}
-static ISADeviceInfo m48t59_isa_info = {
- .init = m48t59_init_isa1,
- .qdev.name = "m48t59_isa",
- .qdev.size = sizeof(M48t59ISAState),
- .qdev.reset = m48t59_reset_isa,
- .qdev.no_user = 1,
- .qdev.props = (Property[]) {
+static void m48t59_init_class_isa1(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
+ ic->init = m48t59_init_isa1;
+}
+
+static DeviceInfo m48t59_isa_info = {
+ .class_init = m48t59_init_class_isa1,
+ .name = "m48t59_isa",
+ .size = sizeof(M48t59ISAState),
+ .reset = m48t59_reset_isa,
+ .no_user = 1,
+ .props = (Property[]) {
DEFINE_PROP_UINT32("size", M48t59ISAState, state.size, -1),
DEFINE_PROP_UINT32("type", M48t59ISAState, state.type, -1),
DEFINE_PROP_HEX32( "io_base", M48t59ISAState, state.io_base, 0),