Commit 75bca446 authored by Greg Ungerer's avatar Greg Ungerer Committed by Jaroslav Kysela

[PATCH] m68knommu/5206e check timer irq pending

Add a function to allow checking if the timer interrupt is pending for
the m68knommu/5206e CPU.  This is used by the architecture timer code
for microsecond accurate time calculations.
parent ff06b70d
......@@ -79,6 +79,20 @@ void mcf_settimericr(unsigned int timer, unsigned int level)
/***************************************************************************/
int mcf_timerirqpending(int timer)
{
unsigned int imr = 0;
switch (timer) {
case 1: imr = MCFSIM_IMR_TIMER1; break;
case 2: imr = MCFSIM_IMR_TIMER2; break;
default: break;
}
return (mcf_getipr() & imr);
}
/***************************************************************************/
void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment