summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-03-27 08:47:26 +0100
committerStefan Roese <sr@denx.de>2008-03-27 09:54:03 +0100
commitd8bd643141af4710d7f1b69bbab6b760de0af0a1 (patch)
tree2a0b1abe76ab9990fe96d3964b207524ab741f0f /cpu/ppc4xx
parent234ea73c660cfd0b1c98de00995c32d4152d202f (diff)
downloadu-boot-imx-d8bd643141af4710d7f1b69bbab6b760de0af0a1.zip
u-boot-imx-d8bd643141af4710d7f1b69bbab6b760de0af0a1.tar.gz
u-boot-imx-d8bd643141af4710d7f1b69bbab6b760de0af0a1.tar.bz2
ppc4xx: Mask 'vec' with 0x1f in uic_interrupt() for bit set/clear
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'cpu/ppc4xx')
-rw-r--r--cpu/ppc4xx/interrupts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpu/ppc4xx/interrupts.c b/cpu/ppc4xx/interrupts.c
index 698bcb5..8620e2b 100644
--- a/cpu/ppc4xx/interrupts.c
+++ b/cpu/ppc4xx/interrupts.c
@@ -218,15 +218,16 @@ static void uic_interrupt(u32 uic_base, int vec_base)
} else {
set_dcr(uic_base + UIC_ER,
get_dcr(uic_base + UIC_ER) &
- ~(0x80000000 >> vec));
+ ~(0x80000000 >> (vec & 0x1f)));
printf("Masking bogus interrupt vector %d"
" (UIC_BASE=0x%x)\n", vec, uic_base);
}
/*
- * After servicing the interrupt, we have to remove the status indicator.
+ * After servicing the interrupt, we have to remove the
+ * status indicator
*/
- set_dcr(uic_base + UIC_SR, (0x80000000 >> vec));
+ set_dcr(uic_base + UIC_SR, (0x80000000 >> (vec & 0x1f)));
}
/*