Commit 4a2b3e53 authored by Greg Ungerer's avatar Greg Ungerer Committed by Jaroslav Kysela

[PATCH] m68knommu/5407 check timer irq pending

Add a function to allow checking if the timer interrupt is pending for
the m68knommu/5407 CPU.  This is used by the architecture timer code for
microsecond accurate time calculations.
parent 6ef4015d
......@@ -83,6 +83,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