summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/ipod6g/lcd-ipod6g.c
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/s5l8702/ipod6g/lcd-ipod6g.c
parent05e180a1308a095d51d51d0e047fcd44425ea88f (diff)
downloadrockbox-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.c8
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
51int lcd_type; /* also needed in debug-s5l8702.c */ 51int lcd_type; /* also needed in debug-s5l8702.c */
52static struct dma_lli lcd_lli[(LCD_WIDTH * LCD_HEIGHT - 1) / 0xfff] CACHEALIGN_ATTR; 52static struct dma_lli lcd_lli[(LCD_WIDTH * LCD_HEIGHT - 1) / 0xfff] CACHEALIGN_ATTR;
53static struct wakeup lcd_wakeup; 53static struct semaphore lcd_wakeup;
54static struct mutex lcd_mutex; 54static struct mutex lcd_mutex;
55static uint16_t lcd_dblbuf[LCD_HEIGHT][LCD_WIDTH]; 55static uint16_t lcd_dblbuf[LCD_HEIGHT][LCD_WIDTH];
56 56
@@ -149,7 +149,7 @@ void lcd_sleep(void)
149void lcd_init_device(void) 149void 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;
180static void displaylcd_setup(int x, int y, int width, int height) 180static 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;
237void INT_DMAC0C4(void) 237void 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. */