]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
nitrogen6x: use common board_video_skip
authorEric Benard <eric@eukrea.com>
Fri, 4 Apr 2014 17:05:53 +0000 (19:05 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 15 Apr 2014 10:23:56 +0000 (12:23 +0200)
Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
board/boundary/nitrogen6x/nitrogen6x.c
include/configs/nitrogen6x.h

index d9c05b07bfae83466513735cbec95c7f949de7a5..cb5f787b517a105e9e981040b8937dfed7f89580 100644 (file)
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/imx-common/sata.h>
 #include <asm/imx-common/boot_mode.h>
+#include <asm/imx-common/video.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <micrel.h>
 #include <miiphy.h>
 #include <netdev.h>
-#include <linux/fb.h>
-#include <ipu_pixfmt.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <i2c.h>
@@ -446,16 +445,6 @@ static iomux_v3_cfg_t const rgb_pads[] = {
        MX6_PAD_DISP0_DAT23__IPU1_DISP0_DATA23,
 };
 
-struct display_info_t {
-       int     bus;
-       int     addr;
-       int     pixfmt;
-       int     (*detect)(struct display_info_t const *dev);
-       void    (*enable)(struct display_info_t const *dev);
-       struct  fb_videomode mode;
-};
-
-
 static int detect_hdmi(struct display_info_t const *dev)
 {
        struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
@@ -492,7 +481,7 @@ static void enable_rgb(struct display_info_t const *dev)
        gpio_direction_output(RGB_BACKLIGHT_GP, 1);
 }
 
-static struct display_info_t const displays[] = {{
+struct display_info_t const displays[] = {{
        .bus    = -1,
        .addr   = 0,
        .pixfmt = IPU_PIX_FMT_RGB24,
@@ -573,51 +562,7 @@ static struct display_info_t const displays[] = {{
                .sync           = 0,
                .vmode          = FB_VMODE_NONINTERLACED
 } } };
-
-int board_video_skip(void)
-{
-       int i;
-       int ret;
-       char const *panel = getenv("panel");
-       if (!panel) {
-               for (i = 0; i < ARRAY_SIZE(displays); i++) {
-                       struct display_info_t const *dev = displays+i;
-                       if (dev->detect(dev)) {
-                               panel = dev->mode.name;
-                               printf("auto-detected panel %s\n", panel);
-                               break;
-                       }
-               }
-               if (!panel) {
-                       panel = displays[0].mode.name;
-                       printf("No panel detected: default to %s\n", panel);
-                       i = 0;
-               }
-       } else {
-               for (i = 0; i < ARRAY_SIZE(displays); i++) {
-                       if (!strcmp(panel, displays[i].mode.name))
-                               break;
-               }
-       }
-       if (i < ARRAY_SIZE(displays)) {
-               ret = ipuv3_fb_init(&displays[i].mode, 0,
-                                   displays[i].pixfmt);
-               if (!ret) {
-                       displays[i].enable(displays+i);
-                       printf("Display: %s (%ux%u)\n",
-                              displays[i].mode.name,
-                              displays[i].mode.xres,
-                              displays[i].mode.yres);
-               } else {
-                       printf("LCD %s cannot be configured: %d\n",
-                              displays[i].mode.name, ret);
-               }
-       } else {
-               printf("unsupported panel %s\n", panel);
-               ret = -EINVAL;
-       }
-       return (0 != ret);
-}
+size_t display_count = ARRAY_SIZE(displays);
 
 static void setup_display(void)
 {
index f7e7315a9b695ed8a378f5efcf3b329f5e450cfb..5805a037f5e6abe993cb2d11622d7fc310e63693 100644 (file)
 #define CONFIG_CMD_HDMIDETECT
 #define CONFIG_CONSOLE_MUX
 #define CONFIG_IMX_HDMI
+#define CONFIG_IMX_VIDEO_SKIP
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE