Patchwork hw/omap2: Wire up the IRQ for the 2430's fifth GPIO module

login
register
mail settings
Submitter Peter Maydell
Date Oct. 18, 2011, 3:12 p.m.
Message ID <1318950774-31787-1-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/120447/
State New
Headers show

Comments

Peter Maydell - Oct. 18, 2011, 3:12 p.m.
The OMAP2430 version of the omap-gpio device has five GPIO modules,
not four like the other OMAP2 versions; wire up the fifth module's
IRQ line correctly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
A minor issue noted by Juha; strictly this is currently unreachable
code since the mpu_model is always set to omap2420, but best not to
leave boobytraps in the code for later...

 hw/omap2.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
andrzej zaborowski - Oct. 21, 2011, 3:08 p.m.
On 18 October 2011 17:12, Peter Maydell <peter.maydell@linaro.org> wrote:
> The OMAP2430 version of the omap-gpio device has five GPIO modules,
> not four like the other OMAP2 versions; wire up the fifth module's
> IRQ line correctly.

Thanks, pushed this patch.

Cheers

Patch

diff --git a/hw/omap2.c b/hw/omap2.c
index 838c32f..5197fef 100644
--- a/hw/omap2.c
+++ b/hw/omap2.c
@@ -2409,6 +2409,11 @@  struct omap_mpu_state_s *omap2420_mpu_init(unsigned long sdram_size,
                        qdev_get_gpio_in(s->ih[0], OMAP_INT_24XX_GPIO_BANK3));
     sysbus_connect_irq(busdev, 9,
                        qdev_get_gpio_in(s->ih[0], OMAP_INT_24XX_GPIO_BANK4));
+    if (s->mpu_model == omap2430) {
+        sysbus_connect_irq(busdev, 12,
+                           qdev_get_gpio_in(s->ih[0],
+                                            OMAP_INT_243X_GPIO_BANK5));
+    }
     ta = omap_l4ta(s->l4, 3);
     sysbus_mmio_map(busdev, 0, omap_l4_region_base(ta, 1));
     sysbus_mmio_map(busdev, 1, omap_l4_region_base(ta, 0));