Skip to content
Snippets Groups Projects
Commit d8bd6431 authored by Stefan Roese's avatar Stefan Roese
Browse files

ppc4xx: Mask 'vec' with 0x1f in uic_interrupt() for bit set/clear


Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 234ea73c
No related branches found
No related tags found
No related merge requests found
...@@ -218,15 +218,16 @@ static void uic_interrupt(u32 uic_base, int vec_base) ...@@ -218,15 +218,16 @@ static void uic_interrupt(u32 uic_base, int vec_base)
} else { } else {
set_dcr(uic_base + UIC_ER, set_dcr(uic_base + UIC_ER,
get_dcr(uic_base + UIC_ER) & get_dcr(uic_base + UIC_ER) &
~(0x80000000 >> vec)); ~(0x80000000 >> (vec & 0x1f)));
printf("Masking bogus interrupt vector %d" printf("Masking bogus interrupt vector %d"
" (UIC_BASE=0x%x)\n", vec, uic_base); " (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)));
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment