common: Drop linux/delay.h from common header
[oweals/u-boot.git] / board / siemens / rut / board.c
index fb840f7ed2263ad2f96107280d17d759b2aa107f..3b109e9818f3fec410e4b2ef5fcb3e25adb108e2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Board functions for TI AM335X based rut board
  * (C) Copyright 2013 Siemens Schweiz AG
@@ -7,12 +8,14 @@
  * u-boot:/board/ti/am335x/board.c
  *
  * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <env.h>
 #include <errno.h>
+#include <init.h>
+#include <malloc.h>
+#include <net.h>
 #include <spi.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <cpsw.h>
 #include <video.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 #include "board.h"
 #include "../common/factoryset.h"
 #include "../../../drivers/video/da8xx-fb.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * Read header information from EEPROM into global structure.
  */
@@ -174,7 +176,7 @@ static struct cpsw_platform_data cpsw_data = {
 };
 
 #if defined(CONFIG_DRIVER_TI_CPSW) || \
-       (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
+       (defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
 int board_eth_init(bd_t *bis)
 {
        struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
@@ -182,7 +184,7 @@ int board_eth_init(bd_t *bis)
        int rv;
 
 #ifndef CONFIG_SPL_BUILD
-       factoryset_setenv();
+       factoryset_env_set();
 #endif
 
        /* Set rgmii mode and enable rmii clock to be sourced from chip */
@@ -480,9 +482,9 @@ int board_late_init(void)
                sprintf(tmp, "%s_%s", factory_dat.asn,
                        factory_dat.comp_version);
        else
-               sprintf(tmp, "QMX7.E38_4.0");
+               strcpy(tmp, "QMX7.E38_4.0");
 
-       ret = setenv("boardid", tmp);
+       ret = env_set("boardid", tmp);
        if (ret)
                printf("error setting board id\n");