diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-14 16:04:25 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-06-14 16:04:25 +0100 |
commit | 1be08a0946b1a189ac72822182c37367e8cd3d87 (patch) | |
tree | 2c41b2e3abf67957ea1b75e7d5330ab2b1dff4fe /hw/misc/mst_fpga.c | |
parent | 7474f1be701f136b224af5e1abe55e97dc3f29a5 (diff) | |
parent | fe8fcf3d642b4de1369841bf6acac13e0ec8770d (diff) | |
download | qemu-1be08a0946b1a189ac72822182c37367e8cd3d87.zip qemu-1be08a0946b1a189ac72822182c37367e8cd3d87.tar.gz qemu-1be08a0946b1a189ac72822182c37367e8cd3d87.tar.bz2 |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160614-2' into staging
target-arm queue:
* add PMU support for virt machine under KVM
* fix reset and migration of TTBCR(S)
* add virt-2.7 machine type
* QOMify various ARM devices
* implement xilinx DisplayPort device
* don't permit ARMv8-only Neon insns to work on ARMv7
# gpg: Signature made Tue 14 Jun 2016 16:01:45 BST
# gpg: using RSA key 0x3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg: aka "Peter Maydell <pmaydell@gmail.com>"
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-target-arm-20160614-2: (30 commits)
target-arm: Don't permit ARMv8-only Neon insns on ARMv7
arm: xlnx-zynqmp: Add xlnx-dp and xlnx-dpdma
introduce xlnx-dp
introduce xlnx-dpdma
hw/i2c-ddc.c: Implement DDC I2C slave
introduce dpcd module
introduce aux-bus
i2c: Factor our send() and recv() common logic
i2c: implement broadcast write
i2cbus: remove unused dev field
hw/sd: QOM'ify pl181.c
hw/dma: QOM'ify pxa2xx_dma.c
hw/misc: QOM'ify mst_fpga.c
hw/misc: QOM'ify exynos4210_pmu.c
hw/misc: QOM'ify arm_l2x0.c
hw/gpio: QOM'ify zaurus.c
hw/gpio: QOM'ify pl061.c
hw/gpio: QOM'ify omap_gpio.c
hw/i2c: QOM'ify versatile_i2c.c
hw/i2c: QOM'ify omap_i2c.c
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc/mst_fpga.c')
-rw-r--r-- | hw/misc/mst_fpga.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/hw/misc/mst_fpga.c b/hw/misc/mst_fpga.c index 48d7dfb..a10f049 100644 --- a/hw/misc/mst_fpga.c +++ b/hw/misc/mst_fpga.c @@ -200,10 +200,11 @@ static int mst_fpga_post_load(void *opaque, int version_id) return 0; } -static int mst_fpga_init(SysBusDevice *sbd) +static void mst_fpga_init(Object *obj) { - DeviceState *dev = DEVICE(sbd); - mst_irq_state *s = MAINSTONE_FPGA(dev); + DeviceState *dev = DEVICE(obj); + mst_irq_state *s = MAINSTONE_FPGA(obj); + SysBusDevice *sbd = SYS_BUS_DEVICE(obj); s->pcmcia0 = MST_PCMCIAx_READY | MST_PCMCIAx_nCD; s->pcmcia1 = MST_PCMCIAx_READY | MST_PCMCIAx_nCD; @@ -213,10 +214,9 @@ static int mst_fpga_init(SysBusDevice *sbd) /* alloc the external 16 irqs */ qdev_init_gpio_in(dev, mst_fpga_set_irq, MST_NUM_IRQS); - memory_region_init_io(&s->iomem, OBJECT(s), &mst_fpga_ops, s, + memory_region_init_io(&s->iomem, obj, &mst_fpga_ops, s, "fpga", 0x00100000); sysbus_init_mmio(sbd, &s->iomem); - return 0; } static VMStateDescription vmstate_mst_fpga_regs = { @@ -245,9 +245,7 @@ static VMStateDescription vmstate_mst_fpga_regs = { static void mst_fpga_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - k->init = mst_fpga_init; dc->desc = "Mainstone II FPGA"; dc->vmsd = &vmstate_mst_fpga_regs; } @@ -256,6 +254,7 @@ static const TypeInfo mst_fpga_info = { .name = TYPE_MAINSTONE_FPGA, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(mst_irq_state), + .instance_init = mst_fpga_init, .class_init = mst_fpga_class_init, }; |