Commit f3ef0059 authored by Greg Ungerer's avatar Greg Ungerer Committed by Jaroslav Kysela

[PATCH] m68knommu/5307 check timer irq pending

Add a function to allow checking if the timer interrupt is pending for
the m68knommu/5307 CPU.  This is used by the architecture timer code for
microsecond accurate time calculations.
parent bc2ae969
...@@ -84,6 +84,20 @@ void mcf_settimericr(unsigned int timer, unsigned int level) ...@@ -84,6 +84,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) void config_BSP(char *commandp, int size)
{ {
mcf_setimr(MCFSIM_IMR_MASKALL); 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