i.MX31: Remove long udelay from DVFS interrupt handler

Split the ISR into two parts and alllow quick return from first half.

Introduces a uevent() API to have a callback happen in a specified
number of microseconds. Right now only one event is supported.

Change-Id: Ib1666165be2f6082e5275d64961f083cab104f9f
This commit is contained in:
Michael Sevakis 2013-05-11 19:59:01 -04:00
parent 4877f618d6
commit 0a7d941fb9
6 changed files with 140 additions and 88 deletions

View file

@ -56,7 +56,7 @@ void INIT_ATTR tick_start(unsigned int interval_in_ms)
EPITCR1 = EPITCR_CLKSRC_IPG_CLK | EPITCR_WAITEN | EPITCR_IOVW |
((2640-1) << EPITCR_PRESCALER_POS) | EPITCR_RLD |
EPITCR_OCIEN | EPITCR_ENMOD;
EPITLR1 = interval_in_ms*25; /* Count down from interval */
EPITCMPR1 = 0; /* Event when counter reaches 0 */
EPITSR1 = EPITSR_OCIF; /* Clear any pending interrupt */
@ -86,9 +86,3 @@ void tick_stop(void)
EPITSR1 = EPITSR_OCIF; /* Clear pending */
ccm_module_clock_gating(CG_EPIT1, CGM_OFF); /* Turn off module clock */
}
void kernel_audio_locking(bool locking)
{
dvfs_int_mask(locking);
}