video: Drop references to CONFIG_VIDEO et al

Drop the Kconfigs which are not used and all references to them. In
particular, this drops CONFIG_VIDEO to avoid confusion and allow us to
eventually rename CONFIG_DM_VIDEO to CONFIG_VIDEO.

Also drop the prototype for video_get_info_str() which is no-longer used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
diff --git a/README b/README
index 1a413bf..138de72 100644
--- a/README
+++ b/README
@@ -977,9 +977,6 @@
 		support, and should also define these other macros:
 
 			CONFIG_SYS_DIU_ADDR
-			CONFIG_VIDEO
-			CONFIG_VIDEO_SW_CURSOR
-			CONFIG_VGA_AS_SINGLE_DEVICE
 
 		The DIU driver will look for the 'video-mode' environment
 		variable, and if defined, enable the DIU as a console during
diff --git a/arch/arm/include/asm/mach-imx/mx5_video.h b/arch/arm/include/asm/mach-imx/mx5_video.h
index dc6aa00c..b55c0fe 100644
--- a/arch/arm/include/asm/mach-imx/mx5_video.h
+++ b/arch/arm/include/asm/mach-imx/mx5_video.h
@@ -6,12 +6,7 @@
 #ifndef __MX5_VIDEO_H
 #define __MX5_VIDEO_H
 
-#ifdef CONFIG_VIDEO
-void lcd_enable(void);
-void setup_iomux_lcd(void);
-#else
 static inline void lcd_enable(void) { }
 static inline void setup_iomux_lcd(void) { }
-#endif
 
 #endif
diff --git a/arch/arm/mach-nexell/include/mach/display_dev.h b/arch/arm/mach-nexell/include/mach/display_dev.h
index ffa4551..f24fb17 100644
--- a/arch/arm/mach-nexell/include/mach/display_dev.h
+++ b/arch/arm/mach-nexell/include/mach/display_dev.h
@@ -8,15 +8,12 @@
 #ifndef _NX__DISPLAY_DEV_H_
 #define _NX__DISPLAY_DEV_H_
 
-#if defined CONFIG_VIDEO || defined CONFIG_DM_VIDEO
-#elif defined CONFIG_LCD
+#if !defined(CONFIG_DM_VIDEO) && defined(CONFIG_LCD)
 #include <lcd.h>
 #endif
 
 struct nx_display_dev {
-#if defined CONFIG_DM_VIDEO
-	/* GraphicDevice graphic_device;   -- not defined anymore */
-#elif defined CONFIG_LCD
+#if !defined(CONFIG_DM_VIDEO) && defined(CONFIG_LCD)
 	vidinfo_t *panel_info;
 #endif
 	unsigned long base;
diff --git a/board/freescale/mx51evk/Makefile b/board/freescale/mx51evk/Makefile
index 1a9581c..808e350 100644
--- a/board/freescale/mx51evk/Makefile
+++ b/board/freescale/mx51evk/Makefile
@@ -5,4 +5,3 @@
 # (C) Copyright 2009 Freescale Semiconductor, Inc.
 
 obj-y			+= mx51evk.o
-obj-$(CONFIG_VIDEO)	+= mx51evk_video.o
diff --git a/board/freescale/mx53loco/Makefile b/board/freescale/mx53loco/Makefile
index d2ebd94..9befe42 100644
--- a/board/freescale/mx53loco/Makefile
+++ b/board/freescale/mx53loco/Makefile
@@ -4,4 +4,3 @@
 # Jason Liu <r64343@freescale.com>
 
 obj-y			+= mx53loco.o
-obj-$(CONFIG_VIDEO)	+= mx53loco_video.o
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index 3d22f20..24c0fb2 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -379,30 +379,7 @@
 	imx_iomux_v3_setup_multiple_pads(uart4_pads, ARRAY_SIZE(uart4_pads));
 }
 
-/*
- * Video
- */
-#ifdef CONFIG_VIDEO
-static iomux_v3_cfg_t hdmi_pads[] = {
-	/* "Ghost HPD" pin */
-	MX6_PAD_EIM_A24__GPIO5_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL),
-
-	/* LCD_PWR_CTL */
-	MX6_PAD_CSI0_DAT10__GPIO5_IO28 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* LCD_BL_ON */
-	MX6_PAD_KEY_ROW4__GPIO4_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* GPIO_PWM1 */
-	MX6_PAD_DISP0_DAT8__GPIO4_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-static void novena_spl_setup_iomux_video(void)
-{
-	imx_iomux_v3_setup_multiple_pads(hdmi_pads, ARRAY_SIZE(hdmi_pads));
-	gpio_direction_input(NOVENA_HDMI_GHOST_HPD);
-}
-#else
 static inline void novena_spl_setup_iomux_video(void) {}
-#endif
 
 /*
  * SPL boots from uSDHC card
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 25c9fde..1d84012 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1786,7 +1786,7 @@
 
 config CMD_CLS
 	bool "Enable clear screen command 'cls'"
-	depends on CFB_CONSOLE || DM_VIDEO || LCD || VIDEO
+	depends on DM_VIDEO || LCD || VIDEO
 	default y if LCD
 	help
 	  Enable the 'cls' command which clears the screen contents
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index c56b3f4..37cd8a5 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -117,7 +117,7 @@
 	bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size);
 	if (IS_ENABLED(CONFIG_DM_VIDEO))
 		show_video_info();
-#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
+#if defined(CONFIG_LCD)
 	bdinfo_print_num_l("FB base  ", gd->fb_base);
 #endif
 #if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
diff --git a/cmd/bmp.c b/cmd/bmp.c
index 071ba90..45f4c12 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -268,10 +268,8 @@
 	}
 #elif defined(CONFIG_LCD)
 	ret = lcd_display_bitmap(addr, x, y);
-#elif defined(CONFIG_VIDEO)
-	ret = video_display_bitmap(addr, x, y);
 #else
-# error bmp_display() requires CONFIG_LCD or CONFIG_VIDEO
+# error bmp_display() requires CONFIG_LCD
 #endif
 
 	if (bmp_alloc_addr)
diff --git a/common/fdt_support.c b/common/fdt_support.c
index ea18ea3..8662bd2 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -1725,7 +1725,7 @@
 	return fdt_set_node_status(fdt, offset, status);
 }
 
-#if defined(CONFIG_VIDEO) || defined(CONFIG_LCD)
+#if defined(CONFIG_LCD)
 int fdt_add_edid(void *blob, const char *compat, unsigned char *edid_buf)
 {
 	int noff;
diff --git a/common/stdio.c b/common/stdio.c
index 97f21ea..92161a0 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -367,8 +367,7 @@
 	} else {
 		if (IS_ENABLED(CONFIG_LCD))
 			drv_lcd_init();
-		if (IS_ENABLED(CONFIG_VIDEO) ||
-		    IS_ENABLED(CONFIG_VIDEO_VCXK))
+		if (IS_ENABLED(CONFIG_VIDEO_VCXK))
 			drv_video_init();
 	}
 
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index c8c85c6..d074546 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -708,39 +708,9 @@
 	  model. Video drivers typically provide a colour text console and
 	  cursor.
 
-config VGA_AS_SINGLE_DEVICE
-	bool "Set the video as an output-only device"
-	depends on CFB_CONSOLE
-	default y
-	help
-	  If enable the framebuffer device will be initialized as an
-	  output-only device. The Keyboard driver will not be set up. This
-	  may be used if you have no keyboard device, or more than one
-	  (USB Keyboard, AT Keyboard).
-
-config VIDEO_SW_CURSOR
-	bool "Enable a software cursor"
-	depends on CFB_CONSOLE
-	default y if CFB_CONSOLE
-	help
-	  This draws a cursor after the last character. No blinking is
-	  provided. This makes it possible to see the current cursor
-	  position when entering text on the console. It is recommended to
-	  enable this.
-
-config CONSOLE_EXTRA_INFO
-	bool "Display additional board information"
-	depends on CFB_CONSOLE
-	help
-	  Display additional board information strings that normally go to
-	  the serial port. When this option is enabled, a board-specific
-	  function video_get_info_str() is called to get the string for
-	  each line of the display. The function should return the string,
-	  which can be empty if there is nothing to display for that line.
-
 config CONSOLE_SCROLL_LINES
 	int "Number of lines to scroll the console by"
-	depends on CFB_CONSOLE || DM_VIDEO || LCD
+	depends on DM_VIDEO || LCD
 	default 1
 	help
 	  When the console need to be scrolled, this is the number of
@@ -748,28 +718,6 @@
 	  console jump but can help speed up operation when scrolling
 	  is slow.
 
-config SYS_CONSOLE_BG_COL
-	hex "Background colour"
-	depends on CFB_CONSOLE
-	default 0x00
-	help
-	  Defines the background colour for the console. The value is from
-	  0x00 to 0xff and the meaning depends on the graphics card.
-	  Typically, 0x00 means black and 0xff means white. Do not set
-	  the background and foreground to the same colour or you will see
-	  nothing.
-
-config SYS_CONSOLE_FG_COL
-	hex "Foreground colour"
-	depends on CFB_CONSOLE
-	default 0xa0
-	help
-	  Defines the foreground colour for the console. The value is from
-	  0x00 to 0xff and the meaning depends on the graphics card.
-	  Typically, 0x00 means black and 0xff means white. Do not set
-	  the background and foreground to the same colour or you will see
-	  nothing.
-
 config LCD
 	bool "Enable legacy LCD support"
 	help
@@ -967,7 +915,7 @@
 
 config VIDEO_BMP_RLE8
 	bool "Run length encoded BMP image (RLE8) support"
-	depends on DM_VIDEO || CFB_CONSOLE
+	depends on DM_VIDEO
 	help
 	  If this option is set, the 8-bit RLE compressed BMP images
 	  is supported.
diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c
index 0a9cea6..090fd6e 100644
--- a/drivers/video/nexell_display.c
+++ b/drivers/video/nexell_display.c
@@ -562,7 +562,6 @@
 	}
 
 	struct nx_display_dev *dp;
-	/* unsigned int pp_index = 0; */
 
 	dp = nx_display_setup();
 	if (!dp) {
@@ -572,9 +571,7 @@
 	}
 
 	switch (dp->depth) {
-#if 0 /* GDF_16BIT_565RGB is not defined in video.h */
 	case 2:
-		pp_index = GDF_16BIT_565RGB;
 		uc_priv->bpix = VIDEO_BPP16;
 		break;
 	case 3:
@@ -582,10 +579,8 @@
 		 * type video_log2_bpp
 		 */
 	case 4:
-		pp_index = GDF_32BIT_X888RGB;
 		uc_priv->bpix = VIDEO_BPP32;
 		break;
-#endif
 	default:
 		printf("fail : not support LCD bit per pixel %d\n",
 		       dp->depth * 8);
@@ -598,8 +593,7 @@
 
 	/*
 	 * set environment variable "fb_addr" (frame buffer address), required
-	 * for splash image. Because drv_video_init() in common/stdio.c is only
-	 * called when CONFIG_VIDEO is set (and not if CONFIG_DM_VIDEO is set).
+	 * for splash image, which is not set if CONFIG_DM_VIDEO is enabled).
 	 */
 	sprintf(addr, "0x%x", dp->fb_addr);
 	debug("%s(): env_set(\"fb_addr\", %s) ...\n", __func__, addr);
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index e49f5bf..beb8bb9 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -67,7 +67,7 @@
 	 * @mem_clk: memory clock rate in Hz
 	 */
 	unsigned long mem_clk;
-#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO)
+#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
 	/**
 	 * @fb_base: base address of frame buffer memory
 	 */
diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h
index 6cd7929..7272470 100644
--- a/include/configs/pxm2.h
+++ b/include/configs/pxm2.h
@@ -74,11 +74,4 @@
 #endif
 #endif	/* CONFIG_SPL_BUILD */
 
-#if defined(CONFIG_VIDEO)
-#define CONFIG_VIDEO_DA8XX
-#define DA8XX_LCD_CNTL_BASE	LCD_CNTL_BASE
-#define PWM_TICKS	0x1388
-#define PWM_DUTY	0x200
-#endif
-
 #endif	/* ! __CONFIG_PXM2_H */
diff --git a/include/configs/rut.h b/include/configs/rut.h
index 410c6d3..b30b12a 100644
--- a/include/configs/rut.h
+++ b/include/configs/rut.h
@@ -67,13 +67,4 @@
 
 #endif /* CONFIG_SPL_BUILD */
 
-#if defined(CONFIG_VIDEO)
-#define CONFIG_VIDEO_DA8XX
-#define DA8XX_LCD_CNTL_BASE	LCD_CNTL_BASE
-
-#define BOARD_LCD_RESET		115	/* Bank 3 pin 19 */
-#define CONFIG_FORMIKE
-#define DISPL_PLL_SPREAD_SPECTRUM
-#endif
-
 #endif	/* ! __CONFIG_RUT_H */
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index e5e35fe..28657f5 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -18,7 +18,6 @@
 	select PARTITION_UUIDS
 	select HAVE_BLOCK_DEVICE
 	select REGEX
-	imply CFB_CONSOLE_ANSI
 	imply FAT
 	imply FAT_WRITE
 	imply USB_KEYBOARD_FN_KEYS