dm: arm: imx: cx9020: migrate to dm_video
authorSteffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Wed, 17 Apr 2019 11:57:17 +0000 (13:57 +0200)
committerAnatolij Gustschin <agust@denx.de>
Mon, 20 May 2019 09:57:29 +0000 (11:57 +0200)
Enable DM_VIDEO in config and don't overwrite console so it can be set
from environment

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
board/beckhoff/mx53cx9020/Makefile
board/beckhoff/mx53cx9020/mx53cx9020.c
board/beckhoff/mx53cx9020/mx53cx9020_video.c
configs/mx53cx9020_defconfig
include/configs/mx53cx9020.h

index 423a5532ca682c9f3d31df5155b7fae5e02906d7..7f15fc5746d2615ded7d0562e91c34d2e2db6e34 100644 (file)
@@ -4,4 +4,4 @@
 # Patrick Bruenn <p.bruenn@beckhoff.com>
 
 obj-y               += mx53cx9020.o
-obj-$(CONFIG_VIDEO) += mx53cx9020_video.o
+obj-$(CONFIG_DM_VIDEO) += mx53cx9020_video.o
index 79ea456028372f48415dd7946ac7030f73db4f12..fdef4477d9a9cb10f45518b04649417c34108228 100644 (file)
@@ -23,8 +23,6 @@
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <asm/gpio.h>
-#include <linux/fb.h>
-#include <ipu_pixfmt.h>
 #include <input.h>
 #include <fs.h>
 #include <dm/platform_data/serial_mxc.h>
@@ -232,15 +230,6 @@ int board_early_init_f(void)
        return 0;
 }
 
-/*
- * Do not overwrite the console
- * Use always serial for U-Boot console
- */
-int overwrite_console(void)
-{
-       return 1;
-}
-
 int board_init(void)
 {
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
index 85f1cdae8af567b407148a460aa174915a1dbc3e..bf472902562227cdf32df17eac19071d5f3bb3ab 100644 (file)
@@ -8,29 +8,34 @@
  */
 
 #include <common.h>
-#include <linux/list.h>
-#include <asm/gpio.h>
 #include <asm/arch/iomux-mx53.h>
-#include <linux/fb.h>
-#include <ipu_pixfmt.h>
+#include <asm/gpio.h>
+#include <asm/mach-imx/video.h>
 
 #define CX9020_DVI_PWD IMX_GPIO_NR(6, 1)
 
-static struct fb_videomode const vga_640x480 = {
-       .name = "VESA_VGA_640x480",
-       .refresh = 60,
-       .xres = 640,
-       .yres = 480,
-       .pixclock = 39721,      /* picosecond (25.175 MHz) */
-       .left_margin = 40,
-       .right_margin = 60,
-       .upper_margin = 10,
-       .lower_margin = 10,
-       .hsync_len = 20,
-       .vsync_len = 10,
-       .sync = 0,
-       .vmode = FB_VMODE_NONINTERLACED
-};
+struct display_info_t const displays[] = {{
+       .bus    = -1,
+       .addr   = 0,
+       .pixfmt = IPU_PIX_FMT_RGB24,
+       .detect = NULL,
+       .enable = NULL,
+       .mode   = {
+               .name           = "DVI",
+               .refresh = 60,
+               .xres = 640,
+               .yres = 480,
+               .pixclock = 39721,      /* picosecond (25.175 MHz) */
+               .left_margin = 40,
+               .right_margin = 60,
+               .upper_margin = 10,
+               .lower_margin = 10,
+               .hsync_len = 20,
+               .vsync_len = 10,
+               .sync = 0,
+               .vmode = FB_VMODE_NONINTERLACED
+} } };
+size_t display_count = ARRAY_SIZE(displays);
 
 void setup_iomux_lcd(void)
 {
@@ -39,11 +44,3 @@ void setup_iomux_lcd(void)
        gpio_request(CX9020_DVI_PWD, "CX9020_DVI_PWD");
        gpio_direction_output(CX9020_DVI_PWD, 1);
 }
-
-int board_video_skip(void)
-{
-       const int ret = ipuv3_fb_init(&vga_640x480, 0, IPU_PIX_FMT_RGB24);
-       if (ret)
-               printf("VESA VG 640x480 cannot be configured: %d\n", ret);
-       return ret;
-}
index 4f49fd20a28e53320c0f4a67d7495e9514d0a65a..b809066fd086f808fea2c539bc5ff1622779b0ea 100644 (file)
@@ -33,6 +33,5 @@ CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX5=y
 CONFIG_MXC_UART=y
+CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_IPUV3=y
-CONFIG_VIDEO=y
-# CONFIG_VIDEO_SW_CURSOR is not set
index 9bf5d9169b44f7db9500c887a747e35fcada1963..ab61a07f963f25de8fb12d2572717cb9f0510ec1 100644 (file)
 #define CONFIG_SYS_MMC_ENV_DEV 0
 
 /* Framebuffer and LCD */
+#define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_PREBOOT
-#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
-#define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_BMP_16BPP
-#define CONFIG_VIDEO_LOGO
 
 #endif /* __CONFIG_H */