+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2012 Michael Walle
* Michael Walle <michael@walle.cc>
*
* Based on sheevaplug/sheevaplug.c by
* Marvell Semiconductor <www.marvell.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <bootstage.h>
+#include <command.h>
+#include <env.h>
+#include <env_internal.h>
+#include <init.h>
#include <net.h>
#include <malloc.h>
#include <netdev.h>
#include <asm/arch/cpu.h>
#include <asm/arch/mpp.h>
#include <asm/arch/gpio.h>
+#include <asm/global_data.h>
+#include <linux/delay.h>
#include "lsxl.h"
{
uchar enetaddr[6];
- if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
+ if (!eth_env_get_enetaddr("ethaddr", enetaddr)) {
/* signal unset/invalid ethaddr to user */
set_led(LED_INFO_BLINKING);
}
static void rescue_mode(void)
{
- uchar enetaddr[6];
-
printf("Entering rescue mode..\n");
-#ifdef CONFIG_RANDOM_MACADDR
- if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
- net_random_ethaddr(enetaddr);
- if (eth_setenv_enetaddr("ethaddr", enetaddr)) {
- printf("Failed to set ethernet address\n");
- set_led(LED_ALARM_BLINKING);
- return;
- }
- }
-#endif
- setenv("bootsource", "rescue");
+ env_set("bootsource", "rescue");
}
static void check_push_button(void)
}
#endif
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
void show_boot_progress(int progress)
{
if (progress > 0)