]> git.sur5r.net Git - u-boot/commitdiff
rockchip: Move bootrom-related declarations to a header
authorHeiko Stübner <heiko@sntech.de>
Sat, 18 Feb 2017 18:46:26 +0000 (19:46 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 16 Mar 2017 22:03:44 +0000 (16:03 -0600)
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>
arch/arm/include/asm/arch-rockchip/bootrom.h [new file with mode: 0644]
arch/arm/mach-rockchip/rk3036-board-spl.c
arch/arm/mach-rockchip/rk3288-board-spl.c

diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h
new file mode 100644 (file)
index 0000000..79fb1a0
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * (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
index 801548109b9b17fce5164ded9d8f143129e47cc0..0522d6546742b24056823050d907ffcd9b932849 100644 (file)
@@ -7,6 +7,7 @@
 #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>
@@ -20,8 +21,6 @@ static struct rk3036_grf * const grf = (void *)GRF_BASE;
 
 #define DEBUG_UART_BASE        0x20068000
 
-extern void back_to_bootrom(void);
-
 void board_init_f(ulong dummy)
 {
 #ifdef EARLY_DEBUG
index 3713c13d69c60778e6bd08010699421d48079980..74f337919457637453fe90d474b83a358976a32b 100644 (file)
@@ -14,6 +14,7 @@
 #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>
@@ -155,7 +156,7 @@ static int configure_emmc(struct udevice *pinctrl)
        return 0;
 }
 #endif
-extern void back_to_bootrom(void);
+
 void board_init_f(ulong dummy)
 {
        struct udevice *pinctrl;