diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-03-02 08:49:38 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-03-02 08:49:38 +0000 |
commit | 12375d1d3aa41f7d277a9af584c7b810b636ec95 (patch) | |
tree | fc9ce8029a6910a8dac71b3bf60c71155a01eea4 /firmware/target/arm/ipod | |
parent | 05e180a1308a095d51d51d0e047fcd44425ea88f (diff) | |
download | rockbox-12375d1d3aa41f7d277a9af584c7b810b636ec95.tar.gz rockbox-12375d1d3aa41f7d277a9af584c7b810b636ec95.zip |
Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r-- | firmware/target/arm/ipod/button-clickwheel.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/ipod/video/lcd-video.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c index dd561b2e50..d5edd2bebc 100644 --- a/firmware/target/arm/ipod/button-clickwheel.c +++ b/firmware/target/arm/ipod/button-clickwheel.c | |||
@@ -84,7 +84,7 @@ int int_btn = BUTTON_NONE; | |||
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | #if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 | 86 | #if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 |
87 | static struct wakeup button_init_wakeup; | 87 | static struct semaphore button_init_wakeup; |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | #if CONFIG_CPU==S5L8702 | 90 | #if CONFIG_CPU==S5L8702 |
@@ -273,7 +273,7 @@ static inline int ipod_4g_button_read(void) | |||
273 | btn |= BUTTON_PLAY; | 273 | btn |= BUTTON_PLAY; |
274 | if (status & 0x00100000) | 274 | if (status & 0x00100000) |
275 | btn |= BUTTON_MENU; | 275 | btn |= BUTTON_MENU; |
276 | wakeup_signal(&button_init_wakeup); | 276 | semaphore_release(&button_init_wakeup); |
277 | } | 277 | } |
278 | #endif | 278 | #endif |
279 | 279 | ||
@@ -373,7 +373,7 @@ void s5l_clickwheel_init(void) | |||
373 | 373 | ||
374 | void button_init_device(void) | 374 | void button_init_device(void) |
375 | { | 375 | { |
376 | wakeup_init(&button_init_wakeup); | 376 | semaphore_init(&button_init_wakeup, 1, 0); |
377 | #if CONFIG_CPU==S5L8701 | 377 | #if CONFIG_CPU==S5L8701 |
378 | INTMSK |= (1<<26); | 378 | INTMSK |= (1<<26); |
379 | #elif CONFIG_CPU==S5L8702 | 379 | #elif CONFIG_CPU==S5L8702 |
@@ -381,7 +381,7 @@ void button_init_device(void) | |||
381 | holdswitch_last_value = (pmu_read(0x87) & 2) == 0; | 381 | holdswitch_last_value = (pmu_read(0x87) & 2) == 0; |
382 | #endif | 382 | #endif |
383 | s5l_clickwheel_init(); | 383 | s5l_clickwheel_init(); |
384 | wakeup_wait(&button_init_wakeup, HZ / 10); | 384 | semaphore_wait(&button_init_wakeup, HZ / 10); |
385 | } | 385 | } |
386 | 386 | ||
387 | bool button_hold(void) | 387 | bool button_hold(void) |
diff --git a/firmware/target/arm/ipod/video/lcd-video.c b/firmware/target/arm/ipod/video/lcd-video.c index 944f2c4236..c499e9f745 100644 --- a/firmware/target/arm/ipod/video/lcd-video.c +++ b/firmware/target/arm/ipod/video/lcd-video.c | |||
@@ -107,7 +107,7 @@ struct | |||
107 | #ifdef HAVE_LCD_SLEEP | 107 | #ifdef HAVE_LCD_SLEEP |
108 | bool display_on; | 108 | bool display_on; |
109 | bool waking; | 109 | bool waking; |
110 | struct wakeup initwakeup; | 110 | struct semaphore initwakeup; |
111 | #endif | 111 | #endif |
112 | } lcd_state IBSS_ATTR; | 112 | } lcd_state IBSS_ATTR; |
113 | 113 | ||
@@ -188,7 +188,7 @@ static inline unsigned bcm_read32(unsigned address) | |||
188 | static void continue_lcd_awake(void) | 188 | static void continue_lcd_awake(void) |
189 | { | 189 | { |
190 | lcd_state.waking = false; | 190 | lcd_state.waking = false; |
191 | wakeup_signal(&(lcd_state.initwakeup)); | 191 | semaphore_release(&(lcd_state.initwakeup)); |
192 | } | 192 | } |
193 | #endif | 193 | #endif |
194 | 194 | ||
@@ -357,7 +357,7 @@ void lcd_init_device(void) | |||
357 | /* lcd_write_data needs an even number of 16 bit values */ | 357 | /* lcd_write_data needs an even number of 16 bit values */ |
358 | flash_vmcs_length = ((flash_vmcs_length + 3) >> 1) & ~1; | 358 | flash_vmcs_length = ((flash_vmcs_length + 3) >> 1) & ~1; |
359 | } | 359 | } |
360 | wakeup_init(&(lcd_state.initwakeup)); | 360 | semaphore_init(&(lcd_state.initwakeup), 1, 0); |
361 | lcd_state.waking = false; | 361 | lcd_state.waking = false; |
362 | 362 | ||
363 | if (GPO32_VAL & 0x4000) | 363 | if (GPO32_VAL & 0x4000) |
@@ -620,7 +620,7 @@ void lcd_awake(void) | |||
620 | */ | 620 | */ |
621 | lcd_state.waking = true; | 621 | lcd_state.waking = true; |
622 | tick_add_task(&lcd_tick); | 622 | tick_add_task(&lcd_tick); |
623 | wakeup_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK); | 623 | semaphore_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK); |
624 | 624 | ||
625 | send_event(LCD_EVENT_ACTIVATION, NULL); | 625 | send_event(LCD_EVENT_ACTIVATION, NULL); |
626 | } | 626 | } |