[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qom-next for-1.6 04/29] integratorcp: QOM'ify ic
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH qom-next for-1.6 04/29] integratorcp: QOM'ify icp_pic_state |
Date: |
Sat, 27 Jul 2013 16:04:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Am 24.07.2013 09:47, schrieb Andreas Färber:
> diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
> index 58f4ed7..af31007 100644
> --- a/hw/arm/integratorcp.c
> +++ b/hw/arm/integratorcp.c
[...]
> @@ -376,7 +382,7 @@ static const MemoryRegionOps icp_pic_ops = {
>
> static int icp_pic_init(SysBusDevice *dev)
> {
> - icp_pic_state *s = FROM_SYSBUS(icp_pic_state, dev);
> + icp_pic_state *s = INTEGRATOR_PIC(dev);
>
> qdev_init_gpio_in(&dev->qdev, icp_pic_set_irq, 32);
> sysbus_init_irq(dev, &s->parent_irq);
[snip]
Needs the following addition for ->qdev.
Andreas
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index af31007..d518188 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -380,16 +380,17 @@ static const MemoryRegionOps icp_pic_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-static int icp_pic_init(SysBusDevice *dev)
+static int icp_pic_init(SysBusDevice *sbd)
{
+ DeviceState *dev = DEVICE(sbd);
icp_pic_state *s = INTEGRATOR_PIC(dev);
- qdev_init_gpio_in(&dev->qdev, icp_pic_set_irq, 32);
- sysbus_init_irq(dev, &s->parent_irq);
- sysbus_init_irq(dev, &s->parent_fiq);
+ qdev_init_gpio_in(dev, icp_pic_set_irq, 32);
+ sysbus_init_irq(sbd, &s->parent_irq);
+ sysbus_init_irq(sbd, &s->parent_fiq);
memory_region_init_io(&s->iomem, OBJECT(s), &icp_pic_ops, s,
"icp-pic", 0x00800000);
- sysbus_init_mmio(dev, &s->iomem);
+ sysbus_init_mmio(sbd, &s->iomem);
return 0;
}
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH qom-next for-1.6 00/29] arm: QOM cast cleanups, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 01/29] armv7m: QOM'ify BitBandState, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 02/29] highbank: QOM'ify HighbankRegsState, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 04/29] integratorcp: QOM'ify icp_pic_state, Andreas Färber, 2013/07/24
- Re: [Qemu-devel] [PATCH qom-next for-1.6 04/29] integratorcp: QOM'ify icp_pic_state,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-next for-1.6 03/29] integratorcp: QOM'ify integratorcm_state, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 05/29] musicpal: QOM'ify mv88w8618_eth_state, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 06/29] musicpal: QOM'ify musicpal_lcd_state, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 07/29] musicpal: Use TYPE_MV88W8618_ETH, Andreas Färber, 2013/07/24
- [Qemu-devel] [PATCH qom-next for-1.6 08/29] musicpal: QOM'ify mv88w8618_pic_state, Andreas Färber, 2013/07/24