So far spl-boards have declared the back_to_brom() function as simple
extern in the files themself. That doesn't scale well if every boards
defines this on its own.
Therefore move the declarations to a bootrom header.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
--- /dev/null
+/*
+ * (C) Copyright 2017 Heiko Stuebner <heiko@sntech.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef _ASM_ARCH_BOOTROM_H
+#define _ASM_ARCH_BOOTROM_H
+
+/*
+ * Saved Stack pointer address.
+ * Access might be needed in some special cases.
+ */
+extern u32 SAVE_SP_ADDR;
+
+/*
+ * Hand control back to the bootrom to load another
+ * boot stage.
+ */
+extern void back_to_bootrom(void);
+
+#endif
#include <common.h>
#include <debug_uart.h>
#include <asm/io.h>
+#include <asm/arch/bootrom.h>
#include <asm/arch/grf_rk3036.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sdram_rk3036.h>
#define DEBUG_UART_BASE 0x20068000
-extern void back_to_bootrom(void);
-
void board_init_f(ulong dummy)
{
#ifdef EARLY_DEBUG
#include <spl.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <asm/arch/bootrom.h>
#include <asm/arch/clock.h>
#include <asm/arch/hardware.h>
#include <asm/arch/periph.h>
return 0;
}
#endif
-extern void back_to_bootrom(void);
+
void board_init_f(ulong dummy)
{
struct udevice *pinctrl;