URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 102 |
Rev 123 |
Line 48... |
Line 48... |
unsigned long picpr;
|
unsigned long picpr;
|
|
|
picsr = mfspr(SPR_PICSR);
|
picsr = mfspr(SPR_PICSR);
|
picpr = mfspr(SPR_PICPR);
|
picpr = mfspr(SPR_PICPR);
|
|
|
|
/* SIMON: This is a bug */
|
|
/* if (picsr & picpr) {
|
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR))
|
|
except_handle(EXCEPT_HPINT, 0);
|
|
} else
|
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR))
|
|
except_handle(EXCEPT_LPINT, 0);
|
|
*/
|
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR)) {
|
|
picsr = mfspr(SPR_PICSR);
|
|
picpr = mfspr(SPR_PICPR);
|
if (picsr & picpr) {
|
if (picsr & picpr) {
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR))
|
|
except_handle(EXCEPT_HPINT, 0);
|
except_handle(EXCEPT_HPINT, 0);
|
} else
|
} else if(picsr) {
|
if ((mfspr(SPR_SR) & (SPR_SR_EIR | SPR_SR_EXR)) == (SPR_SR_EIR | SPR_SR_EXR))
|
|
except_handle(EXCEPT_LPINT, 0);
|
except_handle(EXCEPT_LPINT, 0);
|
}
|
}
|
|
}
|
|
}
|
|
|
/* Asserts interrupt to the PIC. */
|
/* Asserts interrupt to the PIC. */
|
void report_interrupt(int line)
|
void report_interrupt(int line)
|
{
|
{
|
setsprbits(SPR_PMR, SPR_PMR_DME, 0); /* Disable doze mode */
|
setsprbits(SPR_PMR, SPR_PMR_DME, 0); /* Disable doze mode */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.