intc/xilinx_intc: Inhibit write to ISR when HIE

When the Hardware Interrupt Enable (HIE) bit is set, software cannot
change ISR. Add write guard accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
master
Peter Crosthwaite 2013-06-11 10:59:55 +10:00 committed by Edgar E. Iglesias
parent 45fdd3bf5a
commit fa96d6142f
1 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,11 @@ pic_write(void *opaque, hwaddr addr,
case R_CIE:
p->regs[R_IER] &= ~value; /* Atomic clear ie. */
break;
case R_ISR:
if ((p->regs[R_MER] & 2)) {
break;
}
/* fallthrough */
default:
if (addr < ARRAY_SIZE(p->regs))
p->regs[addr] = value;