diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2008-03-05 00:21:56 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2008-03-05 00:21:56 +0000 |
commit | 562b9de7cbf3affed3979a8884c31b716734b03c (patch) | |
tree | 283d01b5a54e285ea1f0df49c1f13066bdfd8ac5 | |
parent | 6ef63a53737ba772ea4ffddcb16d6a3979644f79 (diff) |
D2: Make lcd_init_device() actually turn on the LCD, in preparation for booting the main image. Previously this required an explicit lcd_enable(true).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16523 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | bootloader/telechips.c | 7 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | 27 |
2 files changed, 19 insertions, 15 deletions
diff --git a/bootloader/telechips.c b/bootloader/telechips.c index e1b80f9be6..dcb0c48d6c 100644 --- a/bootloader/telechips.c +++ b/bootloader/telechips.c @@ -62,8 +62,8 @@ void* main(void) #endif power_init(); - lcd_init(); system_init(); + lcd_init(); #if defined(COWON_D2) kernel_init(); @@ -74,13 +74,8 @@ void* main(void) backlight_init(); font_init(); - lcd_setfont(FONT_SYSFIXED); -#if defined(COWON_D2) - lcd_enable(true); -#endif - _backlight_on(); #if defined(COWON_D2) diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c index 181c58669e..7514f93886 100644 --- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c @@ -222,12 +222,14 @@ void lcd_enable(bool on) if (on) { - lcd_display_on(); /* Turn on display */ - lcd_update(); /* Resync display */ + LCDC_CTRL |= 1; /* controller enable */ + GPIOA_SET = (1<<6); /* backlight enable - not visible otherwise */ + lcd_update(); /* Resync display */ } else { - lcd_display_off(); /* Turn off display */ + LCDC_CTRL &= ~1; /* controller disable */ + GPIOA_CLEAR = (1<<6); /* backlight off */ } } @@ -236,6 +238,7 @@ bool lcd_enabled(void) return display_on; } +/* TODO: implement lcd_sleep() and separate out the power on/off functions */ void lcd_init_device(void) { @@ -264,22 +267,28 @@ void lcd_init_device(void) LCDC_I1BASE = (unsigned int)lcd_framebuffer; /* dirty, dirty hack */ LCDC_I1SIZE = (LCD_HEIGHT<<16) | LCD_WIDTH; /* image 1 size */ - //LCDC_I1POS = (0<<16) | 0; /* position */ - //LCDC_I1OFF = 0; /* address offset */ - //LCDC_I1SCALE = 0; /* scaling */ + LCDC_I1POS = (0<<16) | 0; /* position */ + LCDC_I1OFF = 0; /* address offset */ + LCDC_I1SCALE = 0; /* scaling */ LCDC_I1CTRL = 5; /* 565bpp (7 = 888bpp) */ - //LCDC_CTRL &= ~(1<<28); + LCDC_CTRL &= ~(1<<28); LCDC_CLKDIV = (LCDC_CLKDIV &~ 0xFF00FF) | (1<<16) | 2; /* and this means? */ /* set and clear various flags - not investigated yet */ - //LCDC_CTRL &~ 0x090006AA; /* clear bits 1,3,5,7,9,10,24,27 */ + LCDC_CTRL &~ 0x090006AA; /* clear bits 1,3,5,7,9,10,24,27 */ LCDC_CTRL |= 0x02800144; /* set bits 2,6,8,25,23 */ LCDC_CTRL = (LCDC_CTRL &~ 0xF0000) | 0x20000; - //LCDC_CTRL = (LCDC_CTRL &~ 0x700000) | 0x700000; + LCDC_CTRL = (LCDC_CTRL &~ 0x700000) | 0x700000; /* enable LCD controller */ LCDC_CTRL |= 1; + + /* enable LTV250QV panel */ + lcd_display_on(); + + /* turn on the backlight, without it the LCD is not visible at all */ + GPIOA_SET = (1<<6); } |