diff options
Diffstat (limited to 'recipes-devtools/qemu/qemu-zynqmp-mainline/0005-arm-xlnx-zynqmp-Connect-CPU-Timers-to-GIC.patch')
-rw-r--r-- | recipes-devtools/qemu/qemu-zynqmp-mainline/0005-arm-xlnx-zynqmp-Connect-CPU-Timers-to-GIC.patch | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/recipes-devtools/qemu/qemu-zynqmp-mainline/0005-arm-xlnx-zynqmp-Connect-CPU-Timers-to-GIC.patch b/recipes-devtools/qemu/qemu-zynqmp-mainline/0005-arm-xlnx-zynqmp-Connect-CPU-Timers-to-GIC.patch deleted file mode 100644 index 487d722c..00000000 --- a/recipes-devtools/qemu/qemu-zynqmp-mainline/0005-arm-xlnx-zynqmp-Connect-CPU-Timers-to-GIC.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 6eb0b99419e4f20cef0c0af2847e1635b2dbc04e Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Crosthwaite <peter.crosthwaite@xilinx.com> | ||
3 | Date: Mon, 23 Mar 2015 04:05:14 -0700 | ||
4 | Subject: [PATCH 05/15] arm: xlnx-zynqmp: Connect CPU Timers to GIC | ||
5 | |||
6 | Connect the GPIO outputs from the individual CPUs for the timers to the | ||
7 | GIC. | ||
8 | |||
9 | Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> | ||
10 | --- | ||
11 | hw/arm/xlnx-zynqmp.c | 16 ++++++++++++++++ | ||
12 | 1 file changed, 16 insertions(+) | ||
13 | |||
14 | diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c | ||
15 | index 9465185..29954f5 100644 | ||
16 | --- a/hw/arm/xlnx-zynqmp.c | ||
17 | +++ b/hw/arm/xlnx-zynqmp.c | ||
18 | @@ -19,9 +19,17 @@ | ||
19 | |||
20 | #define GIC_NUM_SPI_INTR 128 | ||
21 | |||
22 | +#define ARM_PHYS_TIMER_PPI 30 | ||
23 | +#define ARM_VIRT_TIMER_PPI 27 | ||
24 | + | ||
25 | #define GIC_DIST_ADDR 0xf9010000 | ||
26 | #define GIC_CPU_ADDR 0xf9020000 | ||
27 | |||
28 | +static inline int arm_gic_ppi_index(int cpu_nr, int ppi_index) | ||
29 | +{ | ||
30 | + return GIC_NUM_SPI_INTR + cpu_nr * 32 + ppi_index; | ||
31 | +} | ||
32 | + | ||
33 | static void xlnx_zynqmp_init(Object *obj) | ||
34 | { | ||
35 | XlnxZynqMPState *s = XLNX_ZYNQMP(obj); | ||
36 | @@ -60,11 +68,19 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) | ||
37 | sysbus_mmio_map(SYS_BUS_DEVICE(&s->gic), 1, GIC_CPU_ADDR); | ||
38 | |||
39 | for (i = 0; i < XLNX_ZYNQMP_NUM_CPUS; i++) { | ||
40 | + qemu_irq irq; | ||
41 | + | ||
42 | object_property_set_bool(OBJECT(&s->cpu[i]), true, "realized", &err); | ||
43 | ERR_PROP_CHECK_RETURN(err, errp); | ||
44 | |||
45 | sysbus_connect_irq(SYS_BUS_DEVICE(&s->gic), i, | ||
46 | qdev_get_gpio_in(DEVICE(&s->cpu[i]), ARM_CPU_IRQ)); | ||
47 | + irq = qdev_get_gpio_in(DEVICE(&s->gic), | ||
48 | + arm_gic_ppi_index(i, ARM_PHYS_TIMER_PPI)); | ||
49 | + qdev_connect_gpio_out(DEVICE(&s->cpu[i]), 0, irq); | ||
50 | + irq = qdev_get_gpio_in(DEVICE(&s->gic), | ||
51 | + arm_gic_ppi_index(i, ARM_VIRT_TIMER_PPI)); | ||
52 | + qdev_connect_gpio_out(DEVICE(&s->cpu[i]), 1, irq); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | -- | ||
57 | 1.7.10.4 | ||
58 | |||