diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-03-02 10:01:26 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-03-02 10:01:26 +0000 |
commit | aa5b23d6162a5ac6cbfc1d871ed9360ffa946c56 (patch) | |
tree | 1794c4afe151ef50305f94f73403576c3063c232 /firmware | |
parent | 68331ffb08a7ea044e68133bc23ee458b9f98bd2 (diff) | |
download | rockbox-aa5b23d6162a5ac6cbfc1d871ed9360ffa946c56.tar.gz rockbox-aa5b23d6162a5ac6cbfc1d871ed9360ffa946c56.zip |
Removed the interrupt disabling in lcd_write_data()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4329 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index 950f8b5057..fa072ac3f5 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c | |||
@@ -195,9 +195,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) | |||
195 | 195 | ||
196 | byte = *p_bytes++ << 24; /* fetch to MSB position */ | 196 | byte = *p_bytes++ << 24; /* fetch to MSB position */ |
197 | 197 | ||
198 | /* make port modifications atomic, in case an IRQ uses PBDRL */ | 198 | /* This code will fail if an interrupt changes the contents of PBDRL. |
199 | /* (currently not the case, so this could be optimized away) */ | 199 | If so, we must disable the interrupt here. */ |
200 | oldlevel = set_irq_level(15); | ||
201 | 200 | ||
202 | /* precalculate the values for later bit toggling, init data write */ | 201 | /* precalculate the values for later bit toggling, init data write */ |
203 | asm ( | 202 | asm ( |
@@ -287,7 +286,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) | |||
287 | : "r0" | 286 | : "r0" |
288 | ); | 287 | ); |
289 | 288 | ||
290 | set_irq_level(oldlevel); | 289 | /* This is the place to reenable the interrupts, if we have disabled |
290 | them. See above. */ | ||
291 | 291 | ||
292 | } while (--count); /* tail loop is faster */ | 292 | } while (--count); /* tail loop is faster */ |
293 | } | 293 | } |
@@ -306,9 +306,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) | |||
306 | the only carry add/sub which does not destroy a source register */ | 306 | the only carry add/sub which does not destroy a source register */ |
307 | byte = ~(*p_bytes++ << 24); /* fetch to MSB position */ | 307 | byte = ~(*p_bytes++ << 24); /* fetch to MSB position */ |
308 | 308 | ||
309 | /* make port modifications atomic, in case an IRQ uses PBDRL */ | 309 | /* This code will fail if an interrupt changes the contents of PBDRL. |
310 | /* (currently not the case, so this could be optimized away) */ | 310 | If so, we must disable the interrupt here. */ |
311 | oldlevel = set_irq_level(15); | ||
312 | 311 | ||
313 | /* precalculate the values for later bit toggling, init data write */ | 312 | /* precalculate the values for later bit toggling, init data write */ |
314 | asm ( | 313 | asm ( |
@@ -390,7 +389,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) | |||
390 | "r0" | 389 | "r0" |
391 | ); | 390 | ); |
392 | 391 | ||
393 | set_irq_level(oldlevel); | 392 | /* This is the place to reenable the interrupts, if we have disabled |
393 | them. See above. */ | ||
394 | 394 | ||
395 | } while (--count); /* tail loop is faster */ | 395 | } while (--count); /* tail loop is faster */ |
396 | } | 396 | } |