forked from len0rd/rockbox
Split the enable_fiq(fiq_handler) function into separate set_fiq_handler(fiq_handler) and enable_fiq(void) functions. This allows temporary disabling of the FIQ without knowing which fiq handler is in use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11875 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9d9b8c08de
commit
147693819d
3 changed files with 12 additions and 5 deletions
|
|
@ -314,11 +314,14 @@ static inline int set_irq_level(int level)
|
|||
return (cpsr >> 7) & 1;
|
||||
}
|
||||
|
||||
static inline void enable_fiq(void(*fiq_handler)(void))
|
||||
static inline void set_fiq_handler(void(*fiq_handler)(void))
|
||||
{
|
||||
/* Install the FIQ handler */
|
||||
*((unsigned int*)(15*4)) = (unsigned int)fiq_handler;
|
||||
}
|
||||
|
||||
static inline void enable_fiq(void)
|
||||
{
|
||||
/* Clear FIQ disable bit */
|
||||
asm volatile (
|
||||
"mrs r0, cpsr \n"\
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ void pcm_play_dma_start(const void *addr, size_t size)
|
|||
/* clear pending DMA interrupt */
|
||||
SRCPND = 1<<19;
|
||||
|
||||
enable_fiq(fiq);
|
||||
set_fiq_handler(fiq);
|
||||
enable_fiq();
|
||||
|
||||
/* unmask the DMA interrupt */
|
||||
INTMSK &= ~(1<<19);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,8 @@ void pcm_play_dma_start(const void *addr, size_t size)
|
|||
#endif
|
||||
|
||||
/* Clear the FIQ disable bit in cpsr_c */
|
||||
enable_fiq(fiq);
|
||||
set_fiq_handler(fiq);
|
||||
enable_fiq();
|
||||
|
||||
/* Enable playback FIFO */
|
||||
#if CONFIG_CPU == PP5020
|
||||
|
|
@ -290,7 +291,8 @@ void pcm_play_pause_unpause(void)
|
|||
{
|
||||
/* Enable the FIFO and fill it */
|
||||
|
||||
enable_fiq(fiq);
|
||||
set_fiq_handler(fiq);
|
||||
enable_fiq();
|
||||
|
||||
/* Enable playback FIFO */
|
||||
#if CONFIG_CPU == PP5020
|
||||
|
|
@ -459,7 +461,8 @@ void pcm_rec_dma_start(void *addr, size_t size)
|
|||
/* enable record fifo */
|
||||
outl(inl(0x70002800) | 0x10000000, 0x70002800);
|
||||
|
||||
enable_fiq(fiq_record);
|
||||
set_fiq_handler(fiq_record);
|
||||
enable_fiq();
|
||||
}
|
||||
|
||||
void pcm_close_recording(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue