mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Sansa AMS: VIC_INT_ENABLE register is not a mask
When read it returns all enabled interrupt sources When written it enables interrupt sources for each bit set So just like VIC_INT_EN_CLEAR, we don't have to read the previous value before writing to it (VIC_INT_EN_CLEAR is write-only anyway) Thanks to Fred Bauer for spotting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23734 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4314ceb73b
commit
ed13fd6dca
6 changed files with 10 additions and 10 deletions
|
|
@ -456,11 +456,11 @@ static void init_pl180_controller(const int drive)
|
|||
MCI_MASK0(drive) = MCI_ERROR | MCI_DATA_END;
|
||||
MCI_MASK1(drive) = 0;
|
||||
#ifdef HAVE_MULTIDRIVE
|
||||
VIC_INT_ENABLE |=
|
||||
VIC_INT_ENABLE =
|
||||
(drive == INTERNAL_AS3525) ? INTERRUPT_NAND : INTERRUPT_MCI0;
|
||||
|
||||
/* setup isr for microsd monitoring */
|
||||
VIC_INT_ENABLE |= (INTERRUPT_GPIOA);
|
||||
VIC_INT_ENABLE = (INTERRUPT_GPIOA);
|
||||
/* clear previous irq */
|
||||
GPIOA_IC = (1<<2);
|
||||
/* enable edge detecting */
|
||||
|
|
@ -469,7 +469,7 @@ static void init_pl180_controller(const int drive)
|
|||
GPIOA_IBE |= (1<<2);
|
||||
|
||||
#else
|
||||
VIC_INT_ENABLE |= INTERRUPT_NAND;
|
||||
VIC_INT_ENABLE = INTERRUPT_NAND;
|
||||
#endif
|
||||
|
||||
MCI_POWER(drive) = MCI_POWER_UP | (MCI_VDD_3_0); /* OF Setting */
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void dma_release(void)
|
|||
void dma_init(void)
|
||||
{
|
||||
DMAC_SYNC = 0xffff; /* disable synchronisation logic */
|
||||
VIC_INT_ENABLE |= INTERRUPT_DMAC;
|
||||
VIC_INT_ENABLE = INTERRUPT_DMAC;
|
||||
}
|
||||
|
||||
inline void dma_disable_channel(int channel)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ void tick_start(unsigned int interval_in_ms)
|
|||
int cycles = KERNEL_TIMER_FREQ / 1000 * interval_in_ms;
|
||||
|
||||
CGU_PERI |= CGU_TIMER2_CLOCK_ENABLE; /* enable peripheral */
|
||||
VIC_INT_ENABLE |= INTERRUPT_TIMER2; /* enable interrupt */
|
||||
VIC_INT_ENABLE = INTERRUPT_TIMER2; /* enable interrupt */
|
||||
|
||||
TIMER2_LOAD = TIMER2_BGLOAD = cycles; /* timer period */
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ void pcm_play_lock(void)
|
|||
void pcm_play_unlock(void)
|
||||
{
|
||||
if(--locked == 0)
|
||||
VIC_INT_ENABLE |= INTERRUPT_DMAC;
|
||||
VIC_INT_ENABLE = INTERRUPT_DMAC;
|
||||
}
|
||||
|
||||
static void play_start_pcm(void)
|
||||
|
|
@ -196,7 +196,7 @@ void pcm_rec_lock(void)
|
|||
void pcm_rec_unlock(void)
|
||||
{
|
||||
if(--rec_locked == 0)
|
||||
VIC_INT_ENABLE |= INTERRUPT_I2SIN;
|
||||
VIC_INT_ENABLE = INTERRUPT_I2SIN;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ void pcm_rec_dma_start(void *addr, size_t size)
|
|||
I2SIN_MASK = (1<<6) | (1<<0) |
|
||||
(1<<3) | (1<<2) | (1<<1); /* half full, almost full, full */
|
||||
|
||||
VIC_INT_ENABLE |= INTERRUPT_I2SIN;
|
||||
VIC_INT_ENABLE = INTERRUPT_I2SIN;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ bool timer_set(long cycles, bool start)
|
|||
bool timer_start(void)
|
||||
{
|
||||
CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */
|
||||
VIC_INT_ENABLE |= INTERRUPT_TIMER1;
|
||||
VIC_INT_ENABLE = INTERRUPT_TIMER1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ void usb_drv_init(void)
|
|||
|
||||
USB_DEV_EP_INTR_MASK &= ~((1<<0) | (1<<16)); /* ep 0 */
|
||||
|
||||
VIC_INT_ENABLE |= INTERRUPT_USB;
|
||||
VIC_INT_ENABLE = INTERRUPT_USB;
|
||||
|
||||
USB_IEP_CTRL(0) |= (1<<7); /* set NAK */
|
||||
USB_OEP_CTRL(0) |= (1<<7); /* set NAK */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue