From 4d92b2c16eed5fdf75b2e9a7745bc49e8c0d6c1c Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Tue, 18 May 2010 23:42:00 +0300 Subject: [PATCH] tune LCD init procedure --- board/pandora/video.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/board/pandora/video.c b/board/pandora/video.c index 63ffef4eb59..d86293dcd96 100644 --- a/board/pandora/video.c +++ b/board/pandora/video.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -47,6 +48,14 @@ static void lcd_init(void) DECLARE_GLOBAL_DATA_PTR; u8 d; + /* make sure LCD nreset is driven low (GPIO157) + * (we are called before misc_init_r() which normally handles this stuff) */ + writel(0x20000000, 0x49056090); + writel(readl(0x49056034) & ~0x20000000, 0x49056034); + /* also GPIO164 (some audible noise otherwise) */ + writel(0x10, 0x49058094); + writel(readl(0x49058034) & ~0x10, 0x49058034); + /* set VPLL2 to 1.8V */ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, 0x05, TWL4030_PM_RECEIVER_VPLL2_DEDICATED); @@ -63,7 +72,7 @@ static void lcd_init(void) //memset(gd->fb_base, 0, 800*480*2); udelay(2000); - *((volatile uint *) 0x49056094) = 0x20000000; /* Bring LCD out of reset (157) */ + writel(0x20000000, 0x49056094); /* Bring LCD out of reset (157) */ udelay(2000); /* Need to wait at least 1ms after reset to start sending signals */ dss_lcd_init((uint)gd->fb_base); -- 2.39.5