X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fspl%2Fspl_net.c;h=b6967ff69ee73037b29a818fca79f64b429b5cc1;hb=8da19df5b504f1cbe79e13f859bc229c042aded5;hp=85fe508b1760f0a2ebec85057d96dddffa0e1811;hpb=01cce5fdd098add2b8aa570468cb35fca5d778fe;p=u-boot diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index 85fe508b17..b6967ff69e 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -1,21 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * (C) Copyright 2012 * Ilya Yanok - * - * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include #include -#include - -DECLARE_GLOBAL_DATA_PTR; +#include -#if defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT) +#if defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USB_ETHER) static ulong spl_net_load_read(struct spl_load_info *load, ulong sector, ulong count, void *buf) { @@ -33,14 +30,14 @@ static int spl_net_load_image(struct spl_image_info *spl_image, env_init(); env_relocate(); - setenv("autoload", "yes"); + env_set("autoload", "yes"); rv = eth_initialize(); if (rv == 0) { printf("No Ethernet devices found\n"); return -ENODEV; } if (bootdev->boot_device_name) - setenv("ethact", bootdev->boot_device_name); + env_set("ethact", bootdev->boot_device_name); rv = net_loop(BOOTP); if (rv < 0) { printf("Problem booting with BOOTP\n"); @@ -83,7 +80,7 @@ SPL_LOAD_IMAGE_METHOD("eth device", 0, BOOT_DEVICE_CPGMAC, spl_net_load_image_cpgmac); #endif -#ifdef CONFIG_SPL_USBETH_SUPPORT +#ifdef CONFIG_SPL_USB_ETHER int spl_net_load_image_usb(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) {