diff options
author | Tobias Diedrich <ranma+coreboot@tdiedrich.de> | 2010-06-19 02:36:10 +0000 |
---|---|---|
committer | Tobias Diedrich <ranma+coreboot@tdiedrich.de> | 2010-06-19 02:36:10 +0000 |
commit | aa0736e95164fef8088fec28902645de751ba179 (patch) | |
tree | 1d1c3daff8ec223225d98f6f1722bf64bf009afe /firmware/target | |
parent | 1510777266752a886022c93c44dc435960f1d167 (diff) |
Use mdelay
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26949 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/lcd-c200_c200v2.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/firmware/target/arm/lcd-c200_c200v2.c b/firmware/target/arm/lcd-c200_c200v2.c index 5393352fd1..d2fabe73dc 100644 --- a/firmware/target/arm/lcd-c200_c200v2.c +++ b/firmware/target/arm/lcd-c200_c200v2.c @@ -124,16 +124,8 @@ static inline void c200v1_lcd_init(void) udelay(10000); } -#define lcd_delay(delay) udelay((delay) * 1000) - #elif defined(SANSA_C200V2) -static inline void lcd_delay(int delay) -{ //TUNEME : delay is in milliseconds - delay <<= 14; - while(delay--) ; -} - /* send LCD data */ void lcd_write_data(const fb_data *data, int width) { @@ -177,7 +169,7 @@ static inline void as3525_dbop_init(void) DBOP_TIMPOL_01 = 0x6e167; DBOP_TIMPOL_23 = 0xa167e06f; - lcd_delay(20); + mdelay(20); } #endif @@ -188,27 +180,27 @@ static void lcd_reset(void) /* reset lcd */ GPIOB_DIR |= (1<<6); GPIOB_PIN(6) = 0; /* pull reset low */ - lcd_delay(20); + mdelay(20); GPIOB_PIN(6) = 1<<6; /* release reset */ - lcd_delay(20); + mdelay(20); #endif lcd_send_command(R_STANDBY_OFF, 0); - lcd_delay(20); + mdelay(20); lcd_send_command(R_OSCILLATION_MODE, 0x01); - lcd_delay(20); + mdelay(20); lcd_send_command(R_DCDC_AMP_ONOFF, 0x01); - lcd_delay(20); + mdelay(20); lcd_send_command(R_DCDC_AMP_ONOFF, 0x09); - lcd_delay(20); + mdelay(20); lcd_send_command(R_DCDC_AMP_ONOFF, 0x0b); - lcd_delay(20); + mdelay(20); lcd_send_command(R_DCDC_AMP_ONOFF, 0x0f); - lcd_delay(20); + mdelay(20); lcd_send_command(R_DRIVER_OUTPUT_MODE, 0x07); @@ -238,7 +230,7 @@ static void lcd_reset(void) lcd_send_command(R_X_ADDR_AREA, 0); /* x1 */ lcd_send_command(LCD_WIDTH - 1, 0); /* x2 */ - lcd_delay(100); + mdelay(100); lcd_send_command(R_DISPLAY_ON, 0); } |