diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-11-24 12:05:53 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-11-24 12:05:53 +0000 |
commit | ed13fd6dca3503b4513ba7b6a61b01a4e59fd363 (patch) | |
tree | 6ef67348cb49fe7fde7aac42c0ba5c0da49874ce /firmware | |
parent | 4314ceb73b68cc36e28e8d3711159578b0404c8c (diff) |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/as3525/dma-pl081.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/kernel-as3525.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/pcm-as3525.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/as3525/timer-as3525.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/usb-drv-as3525.c | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 734d29a8d1..9f2514d8ba 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c @@ -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 */ diff --git a/firmware/target/arm/as3525/dma-pl081.c b/firmware/target/arm/as3525/dma-pl081.c index 5bde46565b..e0620dc688 100644 --- a/firmware/target/arm/as3525/dma-pl081.c +++ b/firmware/target/arm/as3525/dma-pl081.c @@ -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) diff --git a/firmware/target/arm/as3525/kernel-as3525.c b/firmware/target/arm/as3525/kernel-as3525.c index cb7622aef1..9250f320b9 100644 --- a/firmware/target/arm/as3525/kernel-as3525.c +++ b/firmware/target/arm/as3525/kernel-as3525.c @@ -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 */ diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index 2de047b8f0..a0d983fe43 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -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; } diff --git a/firmware/target/arm/as3525/timer-as3525.c b/firmware/target/arm/as3525/timer-as3525.c index 673e3b8f47..f5ff60e0f8 100644 --- a/firmware/target/arm/as3525/timer-as3525.c +++ b/firmware/target/arm/as3525/timer-as3525.c @@ -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; } diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c index 445cc72725..5582eebade 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525.c +++ b/firmware/target/arm/as3525/usb-drv-as3525.c @@ -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 */ |