summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-01-18 13:12:33 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-01-18 13:12:33 +0000
commit6a8379674c43103c008f841968b84287b8fdaf89 (patch)
tree39003a711cfff5cdf5ad00a56c70ae34f34d5100 /firmware/target/arm/ipod
parent3b36b98ff8dea187bd6c25174978da4f7b5e3231 (diff)
Finally, out goes struct spinlock for anything but mutiprocessor targets where it becomes a reenterable corelock.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16105 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-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 3a854afcdc..f80412023d 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 @@
#include "hwcompat.h"
#include "kernel.h"
-static struct spinlock adc_spin NOCACHEBSS_ATTR;
+static struct mutex adc_mtx NOCACHEBSS_ATTR;
/* used in the 2nd gen ADC interrupt */
static unsigned int_data;
@@ -33,7 +33,7 @@ unsigned short adc_scan(int channel)
unsigned short data = 0;
(void)channel; /* there is only one */
- spinlock_lock(&adc_spin);
+ mutex_lock(&adc_mtx);
if ((IPOD_HW_REVISION >> 16) == 1)
{
@@ -69,7 +69,7 @@ unsigned short adc_scan(int channel)
data = int_data & 0xff;
}
- spinlock_unlock(&adc_spin);
+ mutex_unlock(&adc_mtx);
return data;
}
@@ -100,7 +100,7 @@ void ipod_2g_adc_int(void)
void adc_init(void)
{
- spinlock_init(&adc_spin IF_COP(, SPINLOCK_TASK_SWITCH));
+ mutex_init(&adc_mtx);
GPIOB_ENABLE |= 0x1e; /* enable B1..B4 */