diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-04 11:52:49 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:47 -0600 |
commit | 8f04ee0882aec9fe91fb70f767edf5dacff59835 (patch) | |
tree | 01ebc9678569233858c2343c9cb04e62c2df55ad /hw/debugcon.c | |
parent | e855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff) | |
download | qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.zip qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.gz qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.bz2 |
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/debugcon.c')
-rw-r--r-- | hw/debugcon.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/debugcon.c b/hw/debugcon.c index c9ee6d9..f290122 100644 --- a/hw/debugcon.c +++ b/hw/debugcon.c @@ -87,11 +87,17 @@ static int debugcon_isa_initfn(ISADevice *dev) return 0; } -static ISADeviceInfo debugcon_isa_info = { - .qdev.name = "isa-debugcon", - .qdev.size = sizeof(ISADebugconState), - .init = debugcon_isa_initfn, - .qdev.props = (Property[]) { +static void debugcon_isa_class_initfn(ObjectClass *klass, void *data) +{ + ISADeviceClass *ic = ISA_DEVICE_CLASS(klass); + ic->init = debugcon_isa_initfn; +} + +static DeviceInfo debugcon_isa_info = { + .name = "isa-debugcon", + .size = sizeof(ISADebugconState), + .class_init = debugcon_isa_class_initfn, + .props = (Property[]) { DEFINE_PROP_HEX32("iobase", ISADebugconState, iobase, 0xe9), DEFINE_PROP_CHR("chardev", ISADebugconState, state.chr), DEFINE_PROP_HEX32("readback", ISADebugconState, state.readback, 0xe9), |