]> git.baikalelectronics.ru Git - uboot.git/commitdiff
video: mxs: Drop old video code
authorSimon Glass <sjg@chromium.org>
Sun, 23 Jan 2022 14:04:13 +0000 (07:04 -0700)
committerAnatolij Gustschin <agust@denx.de>
Mon, 28 Mar 2022 18:18:26 +0000 (20:18 +0200)
This is no-longer used and is the last reference to video_hw_init(). Drop
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/mxsfb.c

index 99a15e0c25d2c1fbe1c42729852bc51a3d10b5ca..10433949bb80b180c033d580e3f2aa3b57cf1b94 100644 (file)
@@ -252,94 +252,6 @@ static int mxs_remove_common(u32 fb)
        return 0;
 }
 
-#ifndef CONFIG_DM_VIDEO
-
-static GraphicDevice panel;
-
-void lcdif_power_down(void)
-{
-       mxs_remove_common(panel.frameAdrs);
-}
-
-void *video_hw_init(void)
-{
-       int bpp = -1;
-       int ret = 0;
-       char *penv;
-       void *fb = NULL;
-       struct ctfb_res_modes mode;
-       struct display_timing timings;
-
-       puts("Video: ");
-
-       /* Suck display configuration from "videomode" variable */
-       penv = env_get("videomode");
-       if (!penv) {
-               puts("MXSFB: 'videomode' variable not set!\n");
-               return NULL;
-       }
-
-       bpp = video_get_params(&mode, penv);
-
-       /* fill in Graphic device struct */
-       sprintf(panel.modeIdent, "%dx%dx%d", mode.xres, mode.yres, bpp);
-
-       panel.winSizeX = mode.xres;
-       panel.winSizeY = mode.yres;
-       panel.plnSizeX = mode.xres;
-       panel.plnSizeY = mode.yres;
-
-       switch (bpp) {
-       case 24:
-       case 18:
-               panel.gdfBytesPP = 4;
-               panel.gdfIndex = GDF_32BIT_X888RGB;
-               break;
-       case 16:
-               panel.gdfBytesPP = 2;
-               panel.gdfIndex = GDF_16BIT_565RGB;
-               break;
-       case 8:
-               panel.gdfBytesPP = 1;
-               panel.gdfIndex = GDF__8BIT_INDEX;
-               break;
-       default:
-               printf("MXSFB: Invalid BPP specified! (bpp = %i)\n", bpp);
-               return NULL;
-       }
-
-       panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;
-
-       /* Allocate framebuffer */
-       fb = memalign(ARCH_DMA_MINALIGN,
-                     roundup(panel.memSize, ARCH_DMA_MINALIGN));
-       if (!fb) {
-               printf("MXSFB: Error allocating framebuffer!\n");
-               return NULL;
-       }
-
-       /* Wipe framebuffer */
-       memset(fb, 0, panel.memSize);
-
-       panel.frameAdrs = (u32)fb;
-
-       printf("%s\n", panel.modeIdent);
-
-       video_ctfb_mode_to_display_timing(&mode, &timings);
-
-       ret = mxs_probe_common(NULL, &timings, bpp, (u32)fb);
-       if (ret)
-               goto dealloc_fb;
-
-       return (void *)&panel;
-
-dealloc_fb:
-       free(fb);
-
-       return NULL;
-}
-#else /* ifndef CONFIG_DM_VIDEO */
-
 static int mxs_of_get_timings(struct udevice *dev,
                              struct display_timing *timings,
                              u32 *bpp)
@@ -489,4 +401,3 @@ U_BOOT_DRIVER(mxs_video) = {
        .remove = mxs_video_remove,
        .flags  = DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE,
 };
-#endif /* ifndef CONFIG_DM_VIDEO */