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/s5l8702/ipod6g/lcd-ipod6g.c | |
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/s5l8702/ipod6g/lcd-ipod6g.c')
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c index de731a91b8..0ad9da22bb 100644 --- a/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c | |||
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | int lcd_type; /* also needed in debug-s5l8702.c */ | 51 | int lcd_type; /* also needed in debug-s5l8702.c */ |
52 | static struct dma_lli lcd_lli[(LCD_WIDTH * LCD_HEIGHT - 1) / 0xfff] CACHEALIGN_ATTR; | 52 | static struct dma_lli lcd_lli[(LCD_WIDTH * LCD_HEIGHT - 1) / 0xfff] CACHEALIGN_ATTR; |
53 | static struct wakeup lcd_wakeup; | 53 | static struct semaphore lcd_wakeup; |
54 | static struct mutex lcd_mutex; | 54 | static struct mutex lcd_mutex; |
55 | static uint16_t lcd_dblbuf[LCD_HEIGHT][LCD_WIDTH]; | 55 | static uint16_t lcd_dblbuf[LCD_HEIGHT][LCD_WIDTH]; |
56 | 56 | ||
@@ -149,7 +149,7 @@ void lcd_sleep(void) | |||
149 | void lcd_init_device(void) | 149 | void lcd_init_device(void) |
150 | { | 150 | { |
151 | /* Detect lcd type */ | 151 | /* Detect lcd type */ |
152 | wakeup_init(&lcd_wakeup); | 152 | semaphore_init(&lcd_wakeup, 1, 0); |
153 | mutex_init(&lcd_mutex); | 153 | mutex_init(&lcd_mutex); |
154 | lcd_type = (PDAT6 & 0x30) >> 4; | 154 | lcd_type = (PDAT6 & 0x30) >> 4; |
155 | } | 155 | } |
@@ -180,7 +180,7 @@ static void displaylcd_setup(int x, int y, int width, int height) ICODE_ATTR; | |||
180 | static void displaylcd_setup(int x, int y, int width, int height) | 180 | static void displaylcd_setup(int x, int y, int width, int height) |
181 | { | 181 | { |
182 | mutex_lock(&lcd_mutex); | 182 | mutex_lock(&lcd_mutex); |
183 | while (DMAC0C4CONFIG & 1) wakeup_wait(&lcd_wakeup, HZ / 10); | 183 | while (DMAC0C4CONFIG & 1) semaphore_wait(&lcd_wakeup, HZ / 10); |
184 | 184 | ||
185 | int xe = (x + width) - 1; /* max horiz */ | 185 | int xe = (x + width) - 1; /* max horiz */ |
186 | int ye = (y + height) - 1; /* max vert */ | 186 | int ye = (y + height) - 1; /* max vert */ |
@@ -237,7 +237,7 @@ void INT_DMAC0C4(void) ICODE_ATTR; | |||
237 | void INT_DMAC0C4(void) | 237 | void INT_DMAC0C4(void) |
238 | { | 238 | { |
239 | DMAC0INTTCCLR = 0x10; | 239 | DMAC0INTTCCLR = 0x10; |
240 | wakeup_signal(&lcd_wakeup); | 240 | semaphore_release(&lcd_wakeup); |
241 | } | 241 | } |
242 | 242 | ||
243 | /* Update a fraction of the display. */ | 243 | /* Update a fraction of the display. */ |