diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-20 18:14:26 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-06-20 18:14:26 +0100 |
commit | 7e13ea57f47710de2c19f22b27b34ab9fb045700 (patch) | |
tree | 85cecfb3f35ef76fc7d9f54725df4f5f2627a149 /hw/intc | |
parent | 7fa124b273acd22a808e742ead78c065ccd9b4c4 (diff) | |
parent | 6dbbe24337b7a8d4cac23d1cd4eedf6645ccf09b (diff) |
Merge remote-tracking branch 'remotes/mwalle/tags/lm32-queue/20160620' into staging
lm32/milkymist: some qomifying
# gpg: Signature made Mon 20 Jun 2016 17:27:53 BST
# gpg: using RSA key 0xB458ABB0D8D378E3
# gpg: Good signature from "Michael Walle <michael@walle.cc>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 2190 3E48 4537 A7C2 90CE 3EB2 B458 ABB0 D8D3 78E3
* remotes/mwalle/tags/lm32-queue/20160620:
milkymist: update specification URLs
hw/intc: QOM'ify lm32_pic.c
hw/display: QOM'ify milkymist-vgafb.c
hw/display: QOM'ify milkymist-tmu2.c
hw/timer: QOM'ify milkymist_sysctl
hw/timer: QOM'ify lm32_timer
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/lm32_pic.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c index edc08f184a..3dad01c5ba 100644 --- a/hw/intc/lm32_pic.c +++ b/hw/intc/lm32_pic.c @@ -152,17 +152,16 @@ static void pic_reset(DeviceState *d) } } -static int lm32_pic_init(SysBusDevice *sbd) +static void lm32_pic_init(Object *obj) { - DeviceState *dev = DEVICE(sbd); - LM32PicState *s = LM32_PIC(dev); + DeviceState *dev = DEVICE(obj); + LM32PicState *s = LM32_PIC(obj); + SysBusDevice *sbd = SYS_BUS_DEVICE(obj); qdev_init_gpio_in(dev, irq_handler, 32); sysbus_init_irq(sbd, &s->parent_irq); pic = s; - - return 0; } static const VMStateDescription vmstate_lm32_pic = { @@ -181,9 +180,7 @@ static const VMStateDescription vmstate_lm32_pic = { static void lm32_pic_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - k->init = lm32_pic_init; dc->reset = pic_reset; dc->vmsd = &vmstate_lm32_pic; } @@ -192,6 +189,7 @@ static const TypeInfo lm32_pic_info = { .name = TYPE_LM32_PIC, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(LM32PicState), + .instance_init = lm32_pic_init, .class_init = lm32_pic_class_init, }; |