diff options
Diffstat (limited to 'firmware/target/arm/s5l8700')
-rw-r--r-- | firmware/target/arm/s5l8700/adc-s5l8700.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/arm/s5l8700/adc-s5l8700.c b/firmware/target/arm/s5l8700/adc-s5l8700.c index f979a9d54f..270c133e94 100644 --- a/firmware/target/arm/s5l8700/adc-s5l8700.c +++ b/firmware/target/arm/s5l8700/adc-s5l8700.c | |||
@@ -42,11 +42,11 @@ | |||
42 | 42 | ||
43 | 43 | ||
44 | static struct mutex adc_mtx; | 44 | static struct mutex adc_mtx; |
45 | static struct wakeup adc_wakeup; | 45 | static struct semaphore adc_wakeup; |
46 | 46 | ||
47 | void INT_ADC(void) | 47 | void INT_ADC(void) |
48 | { | 48 | { |
49 | wakeup_signal(&adc_wakeup); | 49 | semaphore_release(&adc_wakeup); |
50 | } | 50 | } |
51 | 51 | ||
52 | unsigned short adc_read(int channel) | 52 | unsigned short adc_read(int channel) |
@@ -61,7 +61,7 @@ unsigned short adc_read(int channel) | |||
61 | (1 << 0); /* enable start */ | 61 | (1 << 0); /* enable start */ |
62 | 62 | ||
63 | /* wait for conversion */ | 63 | /* wait for conversion */ |
64 | wakeup_wait(&adc_wakeup, TIMEOUT_BLOCK); | 64 | semaphore_wait(&adc_wakeup, TIMEOUT_BLOCK); |
65 | 65 | ||
66 | /* get the converted data */ | 66 | /* get the converted data */ |
67 | data = ADCDAT0 & 0x3FF; | 67 | data = ADCDAT0 & 0x3FF; |
@@ -77,7 +77,7 @@ unsigned short adc_read(int channel) | |||
77 | void adc_init(void) | 77 | void adc_init(void) |
78 | { | 78 | { |
79 | mutex_init(&adc_mtx); | 79 | mutex_init(&adc_mtx); |
80 | wakeup_init(&adc_wakeup); | 80 | semaphore_init(&adc_wakeup, 1, 0); |
81 | 81 | ||
82 | /* enable clock to ADC */ | 82 | /* enable clock to ADC */ |
83 | PWRCON &= ~(1 << 10); | 83 | PWRCON &= ~(1 << 10); |
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c index 8a4541a226..9261e5b3a0 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c +++ b/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c | |||
@@ -94,9 +94,9 @@ static long nand_last_activity_value = -1; | |||
94 | static long nand_stack[DEFAULT_STACK_SIZE]; | 94 | static long nand_stack[DEFAULT_STACK_SIZE]; |
95 | 95 | ||
96 | static struct mutex nand_mtx; | 96 | static struct mutex nand_mtx; |
97 | static struct wakeup nand_wakeup; | 97 | static struct semaphore nand_complete; |
98 | static struct mutex ecc_mtx; | 98 | static struct mutex ecc_mtx; |
99 | static struct wakeup ecc_wakeup; | 99 | static struct semaphore ecc_complete; |
100 | 100 | ||
101 | static uint8_t nand_data[0x800] STORAGE_ALIGN_ATTR; | 101 | static uint8_t nand_data[0x800] STORAGE_ALIGN_ATTR; |
102 | static uint8_t nand_ctrl[0x200] STORAGE_ALIGN_ATTR; | 102 | static uint8_t nand_ctrl[0x200] STORAGE_ALIGN_ATTR; |
@@ -731,9 +731,9 @@ static void nand_thread(void) | |||
731 | int nand_device_init(void) | 731 | int nand_device_init(void) |
732 | { | 732 | { |
733 | mutex_init(&nand_mtx); | 733 | mutex_init(&nand_mtx); |
734 | wakeup_init(&nand_wakeup); | 734 | semaphore_init(&nand_complete, 1, 0); |
735 | mutex_init(&ecc_mtx); | 735 | mutex_init(&ecc_mtx); |
736 | wakeup_init(&ecc_wakeup); | 736 | semaphore_init(&ecc_complete, 1, 0); |
737 | 737 | ||
738 | uint32_t type; | 738 | uint32_t type; |
739 | uint32_t i, j; | 739 | uint32_t i, j; |