diff options
author | Tom Rini <trini@konsulko.com> | 2018-10-31 17:15:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-10-31 17:15:55 -0400 |
commit | fdaccfeb5e03e18c05be386b8a7c6be02be2cf15 (patch) | |
tree | 0379c34582486705e60c9308202a3b1a6e5ed389 /include | |
parent | a744370e6f1a4b8f8b578ce41ca2416e8c232c5b (diff) | |
parent | f48db4ede07b52290477e188de714e327e4954de (diff) | |
download | u-boot-fdaccfeb5e03e18c05be386b8a7c6be02be2cf15.tar.gz u-boot-fdaccfeb5e03e18c05be386b8a7c6be02be2cf15.tar.bz2 u-boot-fdaccfeb5e03e18c05be386b8a7c6be02be2cf15.zip |
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/socfpga_common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 2330143cf1..bd8f5c8c41 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -31,8 +31,21 @@ #define CONFIG_SYS_INIT_RAM_ADDR 0xFFE00000 #define CONFIG_SYS_INIT_RAM_SIZE 0x40000 /* 256KB */ #endif + +/* + * Some boards (e.g. socfpga_sr1500) use 8 bytes at the end of the internal + * SRAM as bootcounter storage. Make sure to not put the stack directly + * at this address to not overwrite the bootcounter by checking, if the + * bootcounter address is located in the internal SRAM. + */ +#if ((CONFIG_SYS_BOOTCOUNT_ADDR > CONFIG_SYS_INIT_RAM_ADDR) && \ + (CONFIG_SYS_BOOTCOUNT_ADDR < (CONFIG_SYS_INIT_RAM_ADDR + \ + CONFIG_SYS_INIT_RAM_SIZE))) +#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_BOOTCOUNT_ADDR +#else #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE) +#endif #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |