Skip to content

Commit

Permalink
arm_gic: GICD_ICFGR: Write model only for pre v1 GICs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Lackorzynski authored and pm215 committed Aug 29, 2014
1 parent 71a6204 commit 24b790d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hw/intc/arm_gic.c
Expand Up @@ -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);
Expand Down

0 comments on commit 24b790d

Please sign in to comment.