summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c')
-rw-r--r--firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c b/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c
index 8866c3dcde..3a854afcdc 100644
--- a/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c
+++ b/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c
@@ -22,7 +22,7 @@
22#include "hwcompat.h" 22#include "hwcompat.h"
23#include "kernel.h" 23#include "kernel.h"
24 24
25static struct mutex adc_mutex NOCACHEBSS_ATTR; 25static struct spinlock adc_spin NOCACHEBSS_ATTR;
26 26
27/* used in the 2nd gen ADC interrupt */ 27/* used in the 2nd gen ADC interrupt */
28static unsigned int_data; 28static unsigned int_data;
@@ -33,7 +33,7 @@ unsigned short adc_scan(int channel)
33 unsigned short data = 0; 33 unsigned short data = 0;
34 34
35 (void)channel; /* there is only one */ 35 (void)channel; /* there is only one */
36 spinlock_lock(&adc_mutex); 36 spinlock_lock(&adc_spin);
37 37
38 if ((IPOD_HW_REVISION >> 16) == 1) 38 if ((IPOD_HW_REVISION >> 16) == 1)
39 { 39 {
@@ -69,7 +69,7 @@ unsigned short adc_scan(int channel)
69 69
70 data = int_data & 0xff; 70 data = int_data & 0xff;
71 } 71 }
72 spinlock_unlock(&adc_mutex); 72 spinlock_unlock(&adc_spin);
73 return data; 73 return data;
74} 74}
75 75
@@ -100,7 +100,7 @@ void ipod_2g_adc_int(void)
100 100
101void adc_init(void) 101void adc_init(void)
102{ 102{
103 spinlock_init(&adc_mutex); 103 spinlock_init(&adc_spin IF_COP(, SPINLOCK_TASK_SWITCH));
104 104
105 GPIOB_ENABLE |= 0x1e; /* enable B1..B4 */ 105 GPIOB_ENABLE |= 0x1e; /* enable B1..B4 */
106 106