diff options
Diffstat (limited to 'hw/spapr_vio.c')
-rw-r--r-- | hw/spapr_vio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c index ba2e1c178b..0546ccb043 100644 --- a/hw/spapr_vio.c +++ b/hw/spapr_vio.c @@ -52,6 +52,10 @@ static struct BusInfo spapr_vio_bus_info = { .name = "spapr-vio", .size = sizeof(VIOsPAPRBus), + .props = (Property[]) { + DEFINE_PROP_UINT32("irq", VIOsPAPRDevice, vio_irq_num, 0), \ + DEFINE_PROP_END_OF_LIST(), + }, }; VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg) @@ -604,7 +608,9 @@ static int spapr_vio_busdev_init(DeviceState *qdev, DeviceInfo *qinfo) } dev->qdev.id = id; - dev->vio_irq_num = bus->irq++; + if (!dev->vio_irq_num) { + dev->vio_irq_num = bus->irq++; + } dev->qirq = spapr_find_qirq(spapr, dev->vio_irq_num); rtce_init(dev); |