diff options
author | Adam Lackorzynski <adam@os.inf.tu-dresden.de> | 2014-08-29 15:00:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-29 15:00:28 +0100 |
commit | 24b790df4388009c25cee311a4eff792c89cada1 (patch) | |
tree | 91e3666de71a9dda805730002be73eddd1da6730 | |
parent | 71a62046ae7accb4fdd4b2413a77342fc5e0c554 (diff) |
arm_gic: GICD_ICFGR: Write model only for pre v1 GICs
Setting the model is only available in pre-v1 GIC models.
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Message-id: 1408372255-12358-3-git-send-email-adam@os.inf.tu-dresden.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/intc/arm_gic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index d2b1aaf485..e5466470b0 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -561,10 +561,12 @@ static void gic_dist_writeb(void *opaque, hwaddr offset, if (irq < GIC_INTERNAL) value |= 0xaa; for (i = 0; i < 4; i++) { - if (value & (1 << (i * 2))) { - GIC_SET_MODEL(irq + i); - } else { - GIC_CLEAR_MODEL(irq + i); + if (s->revision == REV_11MPCORE || s->revision == REV_NVIC) { + if (value & (1 << (i * 2))) { + GIC_SET_MODEL(irq + i); + } else { + GIC_CLEAR_MODEL(irq + i); + } } if (value & (2 << (i * 2))) { GIC_SET_EDGE_TRIGGER(irq + i); |