From e9934f0b6032d5f4304fa17241c870b95e7e60f8 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/ttcontrol') 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 From 02ae1a1860af28164b41e0b29e53e1a1ee913225 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 6 Oct 2011 00:25:03 +0200 Subject: MX5: Make IPU display output and pixel format configurable Signed-off-by: Marek Vasut Signed-off-by: Stefano Babic Tested-by: Stefano Babic Signed-off-by: Anatolij Gustschin --- board/ttcontrol/vision2/vision2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/ttcontrol') diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index ca0c100..e496f64 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -39,12 +39,12 @@ #include #include +#include + DECLARE_GLOBAL_DATA_PTR; static u32 system_rev; -extern int mx51_fb_init(struct fb_videomode *mode); - static struct fb_videomode nec_nl6448bc26_09c = { "NEC_NL6448BC26-09C", 60, /* Refresh */ @@ -610,7 +610,7 @@ void lcd_enable(void) gpio_set_value(2, 1); mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0); - ret = mx51_fb_init(&nec_nl6448bc26_09c); + ret = mx51_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666); if (ret) puts("LCD cannot be configured\n"); } -- cgit v1.1