]> Git Repo - J-u-boot.git/blobdiff - drivers/video/mb862xx.c
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
[J-u-boot.git] / drivers / video / mb862xx.c
index 868c51254d3aff3be3092508348b50e188baf2bc..04e435f913c7a1649ddaa5c5fe9e6a449a06bb59 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2007
  * DENX Software Engineering, Anatolij Gustschin, [email protected]
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
+#include <env.h>
 #include <pci.h>
 #include <video_fb.h>
 #include "videomodes.h"
@@ -79,7 +80,7 @@ static void gdc_sw_reset (void)
        GraphicDevice *dev = &mb862xx;
 
        HOST_WR_REG (GC_SRST, 0x1);
-       udelay (500);
+       udelay(500);
        video_hw_init ();
 }
 
@@ -222,9 +223,9 @@ unsigned int pci_video_init (void)
 
        /* Setup clocks and memory mode for Coral-P(A) */
        HOST_WR_REG(GC_CCF, CONFIG_SYS_MB862xx_CCF);
-       udelay (200);
+       udelay(200);
        HOST_WR_REG(GC_MMR, CONFIG_SYS_MB862xx_MMR);
-       udelay (100);
+       udelay(100);
        return dev->frameAdrs;
 }
 
@@ -246,7 +247,8 @@ unsigned int card_init (void)
        tmp = 0;
        videomode = 0x310;
        /* get video mode via environment */
-       if ((penv = getenv ("videomode")) != NULL) {
+       penv = env_get("videomode");
+       if (penv) {
                /* decide if it is a string */
                if (penv[0] <= '9') {
                        videomode = (int) simple_strtoul (penv, NULL, 16);
@@ -419,7 +421,8 @@ void *video_hw_init (void)
        board_disp_init ();
 #endif
 
-#if defined(CONFIG_SOCRATES) && !(CONFIG_POST & CONFIG_SYS_POST_SYSMON)
+#if (defined(CONFIG_LWMON5) || \
+     defined(CONFIG_SOCRATES)) && !(CONFIG_POST & CONFIG_SYS_POST_SYSMON)
        /* Lamp on */
        board_backlight_switch (1);
 #endif
This page took 0.027505 seconds and 4 git commands to generate.