summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-11-24 12:05:53 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-11-24 12:05:53 +0000
commited13fd6dca3503b4513ba7b6a61b01a4e59fd363 (patch)
tree6ef67348cb49fe7fde7aac42c0ba5c0da49874ce /firmware
parent4314ceb73b68cc36e28e8d3711159578b0404c8c (diff)
downloadrockbox-ed13fd6dca3503b4513ba7b6a61b01a4e59fd363.tar.gz
rockbox-ed13fd6dca3503b4513ba7b6a61b01a4e59fd363.zip
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.c6
-rw-r--r--firmware/target/arm/as3525/dma-pl081.c2
-rw-r--r--firmware/target/arm/as3525/kernel-as3525.c2
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c6
-rw-r--r--firmware/target/arm/as3525/timer-as3525.c2
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525.c2
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)
456 MCI_MASK0(drive) = MCI_ERROR | MCI_DATA_END; 456 MCI_MASK0(drive) = MCI_ERROR | MCI_DATA_END;
457 MCI_MASK1(drive) = 0; 457 MCI_MASK1(drive) = 0;
458#ifdef HAVE_MULTIDRIVE 458#ifdef HAVE_MULTIDRIVE
459 VIC_INT_ENABLE |= 459 VIC_INT_ENABLE =
460 (drive == INTERNAL_AS3525) ? INTERRUPT_NAND : INTERRUPT_MCI0; 460 (drive == INTERNAL_AS3525) ? INTERRUPT_NAND : INTERRUPT_MCI0;
461 461
462 /* setup isr for microsd monitoring */ 462 /* setup isr for microsd monitoring */
463 VIC_INT_ENABLE |= (INTERRUPT_GPIOA); 463 VIC_INT_ENABLE = (INTERRUPT_GPIOA);
464 /* clear previous irq */ 464 /* clear previous irq */
465 GPIOA_IC = (1<<2); 465 GPIOA_IC = (1<<2);
466 /* enable edge detecting */ 466 /* enable edge detecting */
@@ -469,7 +469,7 @@ static void init_pl180_controller(const int drive)
469 GPIOA_IBE |= (1<<2); 469 GPIOA_IBE |= (1<<2);
470 470
471#else 471#else
472 VIC_INT_ENABLE |= INTERRUPT_NAND; 472 VIC_INT_ENABLE = INTERRUPT_NAND;
473#endif 473#endif
474 474
475 MCI_POWER(drive) = MCI_POWER_UP | (MCI_VDD_3_0); /* OF Setting */ 475 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)
49void dma_init(void) 49void dma_init(void)
50{ 50{
51 DMAC_SYNC = 0xffff; /* disable synchronisation logic */ 51 DMAC_SYNC = 0xffff; /* disable synchronisation logic */
52 VIC_INT_ENABLE |= INTERRUPT_DMAC; 52 VIC_INT_ENABLE = INTERRUPT_DMAC;
53} 53}
54 54
55inline void dma_disable_channel(int channel) 55inline 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)
64 int cycles = KERNEL_TIMER_FREQ / 1000 * interval_in_ms; 64 int cycles = KERNEL_TIMER_FREQ / 1000 * interval_in_ms;
65 65
66 CGU_PERI |= CGU_TIMER2_CLOCK_ENABLE; /* enable peripheral */ 66 CGU_PERI |= CGU_TIMER2_CLOCK_ENABLE; /* enable peripheral */
67 VIC_INT_ENABLE |= INTERRUPT_TIMER2; /* enable interrupt */ 67 VIC_INT_ENABLE = INTERRUPT_TIMER2; /* enable interrupt */
68 68
69 TIMER2_LOAD = TIMER2_BGLOAD = cycles; /* timer period */ 69 TIMER2_LOAD = TIMER2_BGLOAD = cycles; /* timer period */
70 70
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)
51void pcm_play_unlock(void) 51void pcm_play_unlock(void)
52{ 52{
53 if(--locked == 0) 53 if(--locked == 0)
54 VIC_INT_ENABLE |= INTERRUPT_DMAC; 54 VIC_INT_ENABLE = INTERRUPT_DMAC;
55} 55}
56 56
57static void play_start_pcm(void) 57static void play_start_pcm(void)
@@ -196,7 +196,7 @@ void pcm_rec_lock(void)
196void pcm_rec_unlock(void) 196void pcm_rec_unlock(void)
197{ 197{
198 if(--rec_locked == 0) 198 if(--rec_locked == 0)
199 VIC_INT_ENABLE |= INTERRUPT_I2SIN; 199 VIC_INT_ENABLE = INTERRUPT_I2SIN;
200} 200}
201 201
202 202
@@ -275,7 +275,7 @@ void pcm_rec_dma_start(void *addr, size_t size)
275 I2SIN_MASK = (1<<6) | (1<<0) | 275 I2SIN_MASK = (1<<6) | (1<<0) |
276 (1<<3) | (1<<2) | (1<<1); /* half full, almost full, full */ 276 (1<<3) | (1<<2) | (1<<1); /* half full, almost full, full */
277 277
278 VIC_INT_ENABLE |= INTERRUPT_I2SIN; 278 VIC_INT_ENABLE = INTERRUPT_I2SIN;
279} 279}
280 280
281 281
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)
56bool timer_start(void) 56bool timer_start(void)
57{ 57{
58 CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */ 58 CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */
59 VIC_INT_ENABLE |= INTERRUPT_TIMER1; 59 VIC_INT_ENABLE = INTERRUPT_TIMER1;
60 return true; 60 return true;
61} 61}
62 62
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)
187 187
188 USB_DEV_EP_INTR_MASK &= ~((1<<0) | (1<<16)); /* ep 0 */ 188 USB_DEV_EP_INTR_MASK &= ~((1<<0) | (1<<16)); /* ep 0 */
189 189
190 VIC_INT_ENABLE |= INTERRUPT_USB; 190 VIC_INT_ENABLE = INTERRUPT_USB;
191 191
192 USB_IEP_CTRL(0) |= (1<<7); /* set NAK */ 192 USB_IEP_CTRL(0) |= (1<<7); /* set NAK */
193 USB_OEP_CTRL(0) |= (1<<7); /* set NAK */ 193 USB_OEP_CTRL(0) |= (1<<7); /* set NAK */