From: notaz Date: Sat, 2 Jul 2016 13:41:30 +0000 (+0300) Subject: pandora/video: use gpiolib X-Git-Tag: sz_175~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b95bd3fea385584011f3abda3cad178fa04d7367;p=pandora-u-boot.git pandora/video: use gpiolib also setting gpio164 low was wrong, it should actually be high to avoid problems... --- diff --git a/board/pandora/video.c b/board/pandora/video.c index fdf2a58815e..633cb939ddb 100644 --- a/board/pandora/video.c +++ b/board/pandora/video.c @@ -4,6 +4,7 @@ #include #include #include +#include #ifdef CONFIG_LCD #include "logo.h" @@ -103,11 +104,9 @@ static void lcd_init(void) /* 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); + gpio_direction_output(157, 0); + /* also GPIO164 should be high (some audible noise otherwise) */ + gpio_direction_output(164, 1); lcd_spi_init(); @@ -126,7 +125,7 @@ static void lcd_init(void) /* Clear frame buffer */ memset((void *)gd->fb_base, 0, 800*480*2); - writel(0x20000000, 0x49056094); /* Bring LCD out of reset (157) */ + gpio_direction_output(157, 1); udelay(2000); /* Need to wait at least 1ms after reset to start sending signals */ dss_lcd_init((uint)gd->fb_base);