+// 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 <miiphy.h>
-#include <asm/arch/kirkwood.h>
+#include <spi.h>
+#include <spi_flash.h>
+#include <asm/arch/soc.h>
#include <asm/arch/cpu.h>
#include <asm/arch/mpp.h>
#include <asm/arch/gpio.h>
-#include <spi_flash.h>
+#include <asm/global_data.h>
+#include <linux/delay.h>
#include "lsxl.h"
* There are maximum 64 gpios controlled through 2 sets of registers
* the below configuration configures mainly initial LED status
*/
- kw_config_gpio(LSXL_OE_VAL_LOW,
- LSXL_OE_VAL_HIGH,
- LSXL_OE_LOW, LSXL_OE_HIGH);
+ mvebu_config_gpio(LSXL_OE_VAL_LOW,
+ LSXL_OE_VAL_HIGH,
+ LSXL_OE_LOW, LSXL_OE_HIGH);
/*
* Multi-Purpose Pins Functionality configuration
int board_init(void)
{
/* address of boot parameters */
- gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
+ gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
set_led(LED_POWER_BLINKING);
{
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)) {
- eth_random_enetaddr(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)