summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-10-16 01:25:17 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-10-16 01:25:17 +0000
commita9b2fb5ee3114fe835f6515b6aeae7454f66d821 (patch)
treefc4e96d0c1f215565918406c8827b16b806c1345 /firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c
parenta3fbbc9fa7e12fd3fce122bbd235dc362050e024 (diff)
downloadrockbox-a9b2fb5ee3114fe835f6515b6aeae7454f66d821.tar.gz
rockbox-a9b2fb5ee3114fe835f6515b6aeae7454f66d821.zip
Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
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