diff mbox series

[for-3.0,2/2] hw/arm/iotkit: Fix IRQ number for timer1

Message ID 20180727113854.20283-3-peter.maydell@linaro.org
State Superseded
Headers show
Series MPS/v8M bug fixes | expand

Commit Message

Peter Maydell July 27, 2018, 11:38 a.m. UTC
A cut-and-paste error meant we were incorrectly wiring up the timer1
IRQ to IRQ3. IRQ3 is the interrupt for timer0 -- move timer0 to
IRQ4 where it belongs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 hw/arm/iotkit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Philippe Mathieu-Daudé July 27, 2018, 12:05 p.m. UTC | #1
On 07/27/2018 08:38 AM, Peter Maydell wrote:
> A cut-and-paste error meant we were incorrectly wiring up the timer1

> IRQ to IRQ3. IRQ3 is the interrupt for timer0 -- move timer0 to

> IRQ4 where it belongs.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

(ARM-ECM-0601256 Table 66 Interrupt Map)

> ---

>  hw/arm/iotkit.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/hw/arm/iotkit.c b/hw/arm/iotkit.c

> index c76d3ed7435..8cadc8b1608 100644

> --- a/hw/arm/iotkit.c

> +++ b/hw/arm/iotkit.c

> @@ -382,7 +382,7 @@ static void iotkit_realize(DeviceState *dev, Error **errp)

>          return;

>      }

>      sysbus_connect_irq(SYS_BUS_DEVICE(&s->timer1), 0,

> -                       qdev_get_gpio_in(DEVICE(&s->armv7m), 3));

> +                       qdev_get_gpio_in(DEVICE(&s->armv7m), 4));

>      mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->timer1), 0);

>      object_property_set_link(OBJECT(&s->apb_ppc0), OBJECT(mr), "port[1]", &err);

>      if (err) {

>
diff mbox series

Patch

diff --git a/hw/arm/iotkit.c b/hw/arm/iotkit.c
index c76d3ed7435..8cadc8b1608 100644
--- a/hw/arm/iotkit.c
+++ b/hw/arm/iotkit.c
@@ -382,7 +382,7 @@  static void iotkit_realize(DeviceState *dev, Error **errp)
         return;
     }
     sysbus_connect_irq(SYS_BUS_DEVICE(&s->timer1), 0,
-                       qdev_get_gpio_in(DEVICE(&s->armv7m), 3));
+                       qdev_get_gpio_in(DEVICE(&s->armv7m), 4));
     mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->timer1), 0);
     object_property_set_link(OBJECT(&s->apb_ppc0), OBJECT(mr), "port[1]", &err);
     if (err) {