summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-09-13 11:02:48 (GMT)
committerHans de Goede <hdegoede@redhat.com>2015-10-20 16:40:27 (GMT)
commitff42d107bfcf2205824d3809ccbc6a94d7646309 (patch)
tree8a0a2b6e30217f5f0a2a51d8a8f093ab0536f0b6
parentdcfcb8d49a291736623b630ae977e4184590f8fe (diff)
downloadu-boot-fsl-qoriq-ff42d107bfcf2205824d3809ccbc6a94d7646309.tar.xz
sunxi: Enable CONFIG_SPL_STACK_R
Select CONFIG_SPL_STACK_R for sunxi boards, this gives us much more room on the stack once we've the DRAM running. Besides being a good change to have on itself, this also paves the way for switching to using malloc_simple in the SPL which cuts of close to 4KiB of the SPL size. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--board/sunxi/Kconfig4
-rw-r--r--include/configs/sunxi-common.h8
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7981355..1a7e916 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -522,6 +522,7 @@ config ARCH_SUNXI
select DM_USB
select OF_CONTROL
select OF_SEPARATE
+ select SPL_STACK_R if !MACH_SUN9I
select USB
select USB_STORAGE
select USB_KEYBOARD
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 55906b5..b336777 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -562,4 +562,8 @@ config GMAC_TX_DELAY
---help---
Set the GMAC Transmit Clock Delay Chain value.
+config SPL_STACK_R_ADDR
+ default 0x4fe00000 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN7I || MACH_SUN8I
+ default 0x2fe00000 if MACH_SUN9I
+
endif
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index e1ba791..2ba21b3 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -73,6 +73,10 @@
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* default load address */
#define CONFIG_SYS_TEXT_BASE 0x2a000000
#define CONFIG_PRE_CON_BUF_ADDR 0x2f000000
+/* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here
+ * since it needs to fit in with the other values. By also #defining it
+ * we get warnings if the Kconfig value mismatches. */
+#define CONFIG_SPL_STACK_R_ADDR 0x2fe00000
#define CONFIG_SYS_SPL_MALLOC_START 0x2ff00000
#define CONFIG_SPL_BSS_START_ADDR 0x2ff80000
#else
@@ -81,6 +85,10 @@
#define CONFIG_SYS_LOAD_ADDR 0x42000000 /* default load address */
#define CONFIG_SYS_TEXT_BASE 0x4a000000
#define CONFIG_PRE_CON_BUF_ADDR 0x4f000000
+/* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here
+ * since it needs to fit in with the other values. By also #defining it
+ * we get warnings if the Kconfig value mismatches. */
+#define CONFIG_SPL_STACK_R_ADDR 0x4fe00000
#define CONFIG_SYS_SPL_MALLOC_START 0x4ff00000
#define CONFIG_SPL_BSS_START_ADDR 0x4ff80000
#endif