diff mbox

[v2,2/2] arm: hw: virt: Store information about GPEX legacy interrupt numbers

Message ID 1430394771-19617-3-git-send-email-pranavkumar@linaro.org
State New
Headers show

Commit Message

PranavkumarSawargaonkar April 30, 2015, 11:52 a.m. UTC
This patch stores information about assigned legacy interrupt numbers in
GPEX host structure.
This is used during GPEX INTx number determination from a pin during
INTx routing.

Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org>
---
 hw/arm/virt.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 565f573..fdafdcc 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -658,6 +658,7 @@  static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
     MemoryRegion *ecam_alias;
     MemoryRegion *ecam_reg;
     DeviceState *dev;
+    GPEXHost *s;
     char *nodename;
     int i;
 
@@ -689,8 +690,11 @@  static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
     /* Map IO port space */
     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 2, base_ioport);
 
+    s = GPEX_HOST(dev);
+
     for (i = 0; i < GPEX_NUM_IRQS; i++) {
         sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, pic[irq + i]);
+        s->irq_num[i] = irq + i;
     }
 
     nodename = g_strdup_printf("/pcie@%" PRIx64, base);