summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-07-12 15:23:28 +0200
committerMarek Vasut <marex@denx.de>2015-08-08 14:14:09 +0200
commit7599b53dc1a1c89457a755858d4b6946e0e7fadd (patch)
treed1123227a547d96eb662a5fcd5a7f119bd38116d /include
parent6ab00db226296b9512baf00d1dc1728e599e385d (diff)
downloadtalos-obmc-uboot-7599b53dc1a1c89457a755858d4b6946e0e7fadd.tar.gz
talos-obmc-uboot-7599b53dc1a1c89457a755858d4b6946e0e7fadd.zip
arm: socfpga: config: Move SPL GD and malloc to RAM
Now that the SPL structure is organised such that it matches the U-Boot's SPL design, it is possible to use the option of relocating GD to RAM. And since we have GD in RAM, move malloc area to RAM as well. We point the malloc base pointer 1 MiB past U-Boot's load address. We use simple malloc for SPL because it is 3kiB smaller in terms of code size than regular malloc which was used thus far. Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/configs/socfpga_common.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index bed8600a94..60a602517f 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -39,10 +39,11 @@
#define CONFIG_SYS_MEMTEST_END PHYS_SDRAM_1_SIZE
#define CONFIG_SYS_INIT_RAM_ADDR 0xFFFF0000
-#define CONFIG_SYS_INIT_RAM_SIZE (0x10000 - CONFIG_SYS_SPL_MALLOC_SIZE)
-#define CONFIG_SYS_INIT_SP_ADDR \
- (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE - \
- GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_RAM_SIZE 0x10000
+#define CONFIG_SYS_INIT_SP_OFFSET \
+ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
@@ -290,9 +291,10 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#define CONFIG_SPL_FRAMEWORK
#define CONFIG_SPL_RAM_DEVICE
#define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR
-#define CONFIG_SYS_SPL_MALLOC_START CONFIG_SYS_INIT_SP_ADDR
-#define CONFIG_SYS_SPL_MALLOC_SIZE (5 * 1024)
#define CONFIG_SPL_MAX_SIZE (64 * 1024)
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SYS_MALLOC_SIMPLE
+#endif
#define CHUNKSZ_CRC32 (1 * 1024) /* FIXME: ewww */
#define CONFIG_CRC32_VERIFY
OpenPOWER on IntegriCloud