summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/include/asm/arch-sunxi/spl.h4
-rw-r--r--board/sunxi/Kconfig1
-rw-r--r--include/configs/sunxi-common.h8
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/spl.h b/arch/arm/include/asm/arch-sunxi/spl.h
index a129dd4ee0..2564d4ab0d 100644
--- a/arch/arm/include/asm/arch-sunxi/spl.h
+++ b/arch/arm/include/asm/arch-sunxi/spl.h
@@ -13,7 +13,11 @@
#define SPL_HEADER_VERSION 1
/* Note: A80 will require special handling here: SPL_ADDR 0x10000 */
+#if defined(CONFIG_MACH_SUN9I)
+#define SPL_ADDR 0x10000
+#else
#define SPL_ADDR 0x0
+#endif
/* boot head definition from sun4i boot code */
struct boot_file_head {
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index c37df000c0..7136fb237f 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -87,6 +87,7 @@ config MACH_SUN9I
bool "sun9i (Allwinner A80)"
select CPU_V7
select SUNXI_GEN_SUN6I
+ select SUPPORT_SPL
endchoice
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 7fd1cd1f7e..5952e5e50d 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -193,7 +193,11 @@
#define CONFIG_SPL_BOARD_LOAD_IMAGE
+#if defined(CONFIG_MACH_SUN9I)
+#define CONFIG_SPL_TEXT_BASE 0x10020 /* sram start+header */
+#else
#define CONFIG_SPL_TEXT_BASE 0x20 /* sram start+header */
+#endif
#define CONFIG_SPL_MAX_SIZE 0x5fe0 /* 24KB on sun4i/sun7i */
#define CONFIG_SPL_LIBDISK_SUPPORT
@@ -208,7 +212,11 @@
#define CONFIG_SPL_PAD_TO 32768 /* decimal for 'dd' */
/* end of 32 KiB in sram */
+#if defined(CONFIG_MACH_SUN9I)
+#define LOW_LEVEL_SRAM_STACK 0x0001a000 /* 40KiB */
+#else
#define LOW_LEVEL_SRAM_STACK 0x00008000 /* End of sram */
+#endif
#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
/* I2C */