summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-03-02 08:49:38 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-03-02 08:49:38 +0000
commit12375d1d3aa41f7d277a9af584c7b810b636ec95 (patch)
treefc9ce8029a6910a8dac71b3bf60c71155a01eea4 /firmware/target/arm/ipod
parent05e180a1308a095d51d51d0e047fcd44425ea88f (diff)
downloadrockbox-12375d1d3aa41f7d277a9af584c7b810b636ec95.tar.gz
rockbox-12375d1d3aa41f7d277a9af584c7b810b636ec95.tar.bz2
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.c8
-rw-r--r--firmware/target/arm/ipod/video/lcd-video.c8
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;
#endif
#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702
-static struct wakeup button_init_wakeup;
+static struct semaphore button_init_wakeup;
#endif
#if CONFIG_CPU==S5L8702
@@ -273,7 +273,7 @@ static inline int ipod_4g_button_read(void)
btn |= BUTTON_PLAY;
if (status & 0x00100000)
btn |= BUTTON_MENU;
- wakeup_signal(&button_init_wakeup);
+ semaphore_release(&button_init_wakeup);
}
#endif
@@ -373,7 +373,7 @@ void s5l_clickwheel_init(void)
void button_init_device(void)
{
- wakeup_init(&button_init_wakeup);
+ semaphore_init(&button_init_wakeup, 1, 0);
#if CONFIG_CPU==S5L8701
INTMSK |= (1<<26);
#elif CONFIG_CPU==S5L8702
@@ -381,7 +381,7 @@ void button_init_device(void)
holdswitch_last_value = (pmu_read(0x87) & 2) == 0;
#endif
s5l_clickwheel_init();
- wakeup_wait(&button_init_wakeup, HZ / 10);
+ semaphore_wait(&button_init_wakeup, HZ / 10);
}
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
#ifdef HAVE_LCD_SLEEP
bool display_on;
bool waking;
- struct wakeup initwakeup;
+ struct semaphore initwakeup;
#endif
} lcd_state IBSS_ATTR;
@@ -188,7 +188,7 @@ static inline unsigned bcm_read32(unsigned address)
static void continue_lcd_awake(void)
{
lcd_state.waking = false;
- wakeup_signal(&(lcd_state.initwakeup));
+ semaphore_release(&(lcd_state.initwakeup));
}
#endif
@@ -357,7 +357,7 @@ void lcd_init_device(void)
/* lcd_write_data needs an even number of 16 bit values */
flash_vmcs_length = ((flash_vmcs_length + 3) >> 1) & ~1;
}
- wakeup_init(&(lcd_state.initwakeup));
+ semaphore_init(&(lcd_state.initwakeup), 1, 0);
lcd_state.waking = false;
if (GPO32_VAL & 0x4000)
@@ -620,7 +620,7 @@ void lcd_awake(void)
*/
lcd_state.waking = true;
tick_add_task(&lcd_tick);
- wakeup_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK);
+ semaphore_wait(&(lcd_state.initwakeup), TIMEOUT_BLOCK);
send_event(LCD_EVENT_ACTIVATION, NULL);
}