Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / board / BuS / eb_cpu5282 / eb_cpu5282.c
index a00a83a4a545a2c9d7385b46368e79448669caab..1d05e40c209b66985e5f8e725ecf31fd98b0013c 100644 (file)
@@ -1,17 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2005-2009
  * BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
  *
  * (C) Copyright 2000-2003
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
 #include "asm/m5282.h"
 #include <bmp_layout.h>
+#include <env.h>
+#include <init.h>
 #include <status_led.h>
 #include <bus_vcxk.h>
 
@@ -98,7 +99,7 @@ int dram_init(void)
 }
 
 #if defined(CONFIG_SYS_DRAM_TEST)
-int testdram (void)
+int testdram(void)
 {
        uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START;
        uint *pend = (uint *) CONFIG_SYS_MEMTEST_END;
@@ -139,7 +140,7 @@ void hw_watchdog_init(void)
        int enable;
 
        enable = 1;
-       s = getenv("watchdog");
+       s = env_get("watchdog");
        if (s != NULL)
                if ((strncmp(s, "off", 3) == 0) || (strncmp(s, "0", 1) == 0))
                        enable = 0;
@@ -191,13 +192,13 @@ int drv_video_init(void)
        unsigned long splash;
 #endif
        printf("Init Video as ");
-       s = getenv("displaywidth");
+       s = env_get("displaywidth");
        if (s != NULL)
                display_width = simple_strtoul(s, NULL, 10);
        else
                display_width = 256;
 
-       s = getenv("displayheight");
+       s = env_get("displayheight");
        if (s != NULL)
                display_height = simple_strtoul(s, NULL, 10);
        else
@@ -211,7 +212,7 @@ int drv_video_init(void)
        vcxk_init(display_width, display_height);
 
 #ifdef CONFIG_SPLASH_SCREEN
-       s = getenv("splashimage");
+       s = env_get("splashimage");
        if (s != NULL) {
                splash = simple_strtoul(s, NULL, 16);
                vcxk_acknowledge_wait();
@@ -225,7 +226,7 @@ int drv_video_init(void)
 /*---------------------------------------------------------------------------*/
 
 #ifdef CONFIG_VIDEO
-int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        int rcode = 0;
        ulong side;