SPDX: Convert all of our single license tags to Linux Kernel style
[platform/kernel/u-boot.git] / board / toradex / common / tdx-common.c
index 77ebb88..fde230c 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2016 Toradex, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <environment.h>
 #include <g_dnl.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 
 #include "tdx-cfg-block.h"
 #include <asm/setup.h>
@@ -86,18 +86,18 @@ int show_board_info(void)
         * Check if environment contains a valid MAC address,
         * set the one from config block if not
         */
-       if (!eth_getenv_enetaddr("ethaddr", ethaddr))
-               eth_setenv_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
+       if (!eth_env_get_enetaddr("ethaddr", ethaddr))
+               eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
 
 #ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR
-       if (!eth_getenv_enetaddr("eth1addr", ethaddr)) {
+       if (!eth_env_get_enetaddr("eth1addr", ethaddr)) {
                /*
                 * Secondary MAC address is allocated from block
                 * 0x100000 higher then the first MAC address
                 */
                memcpy(ethaddr, &tdx_eth_addr, 6);
                ethaddr[3] += 0x10;
-               eth_setenv_enetaddr("eth1addr", ethaddr);
+               eth_env_set_enetaddr("eth1addr", ethaddr);
        }
 #endif