From 63f832fbb89d519ee61bff4fa299b1c83ae8eed2 Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Wed, 28 Sep 2011 11:21:15 +0200 Subject: VIDEO: MX5: Switch MX5 to CONFIG_VIDEO The framebuffer driver for MX5 is based on CONFIG_LCD. In the current implementation, there is a serious bug because the required memory is allocated before relocation, but the driver knows only later which is the resolution of the display. The patch switches the driver to CONFIG_VIDEO and the memory is allocated by the driver itself. We also need to switch the vision2 board code and config file in the same commit so that this commit will be bisectable. Signed-off-by: Stefano Babic CC: Anatolij Gustschin Tested-by: Stefano Babic Signed-off-by: Anatolij Gustschin --- board/ttcontrol/vision2/vision2.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'board') diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index ebca7b6..ca0c100 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -600,6 +600,21 @@ int board_mmc_init(bd_t *bis) } #endif +void lcd_enable(void) +{ + int ret; + + mxc_request_iomux(MX51_PIN_DI1_PIN2, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX51_PIN_DI1_PIN3, IOMUX_CONFIG_ALT0); + + gpio_set_value(2, 1); + mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0); + + ret = mx51_fb_init(&nec_nl6448bc26_09c); + if (ret) + puts("LCD cannot be configured\n"); +} + int board_early_init_f(void) { @@ -636,26 +651,15 @@ static void backlight(int on) } } -void lcd_enable(void) -{ - int ret; - - mxc_request_iomux(MX51_PIN_DI1_PIN2, IOMUX_CONFIG_ALT0); - mxc_request_iomux(MX51_PIN_DI1_PIN3, IOMUX_CONFIG_ALT0); - - gpio_set_value(2, 1); - mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0); - - ret = mx51_fb_init(&nec_nl6448bc26_09c); - if (ret) - puts("LCD cannot be configured\n"); -} - int board_init(void) { /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; + lcd_enable(); + + backlight(1); + return 0; } @@ -676,6 +680,8 @@ int board_late_init(void) udelay(2000); #endif + setenv("stdout", "serial"); + return 0; } -- cgit v1.1