#include <twl4030.h>
 #include <asm/arch/dss.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
 
 #ifdef CONFIG_LCD
 #include "logo.h"
 
        /* 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();
 
        /* 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);