aboutsummaryrefslogtreecommitdiff
path: root/hw/spapr_vio.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-10-08 10:01:46 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-10-08 10:01:46 +0000
commit6c731dc2af1e80c410e8605098deb1ac16ab72f0 (patch)
tree2d22e73f1e60ddff21fd4e6c1c8e9127b64b8868 /hw/spapr_vio.c
parent6e19a1379d3d12c2d8f934aa8154037a609f4507 (diff)
parent7c0a3409627604c111d5c5e1ce4e0224c2b56315 (diff)
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
* 'ppc-next' of git://repo.or.cz/qemu/agraf: (64 commits) ppc64: Fix linker script pseries: Implement set-time-of-day RTAS function pseries: Refactor spapr irq allocation PPC: Clean up BookE timer code PPC: booke timers KVM: PPC: Use HIOR setting for -M pseries with PR KVM KVM: Update kernel headers KVM: Update kernel headers PPC: Fix heathrow PIC to use little endian MMIO PPC: Fix via-cuda memory registration ppc: move ADB stuff from ppc_mac.h to adb.h openpic: Unfold write_IRQreg openpic: Unfold read_IRQreg ppc405: use RAM_ADDR_FMT instead of %08lx Gdbstub: handle read of fpscr vscsi: send the CHECK_CONDITION status down together with autosense data pseries: Implement hcall-bulk hypervisor interface Implement POWER7's CFAR in TCG ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages ppc: booke206: add "info tlb" support ...
Diffstat (limited to 'hw/spapr_vio.c')
-rw-r--r--hw/spapr_vio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c
index ce6558bb7e..35818e18f1 100644
--- a/hw/spapr_vio.c
+++ b/hw/spapr_vio.c
@@ -32,6 +32,7 @@
#include "hw/spapr.h"
#include "hw/spapr_vio.h"
+#include "hw/xics.h"
#ifdef CONFIG_FDT
#include <libfdt.h>
@@ -51,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)
@@ -603,6 +608,11 @@ static int spapr_vio_busdev_init(DeviceState *qdev, DeviceInfo *qinfo)
dev->qdev.id = id;
+ dev->qirq = spapr_allocate_irq(dev->vio_irq_num, &dev->vio_irq_num);
+ if (!dev->qirq) {
+ return -1;
+ }
+
rtce_init(dev);
return info->init(dev);