Hi Ahmad. On Tue, Feb 19, 2019 at 01:06:12PM +0100, Ahmad Fatoum wrote: > Both at91_get_ddram_size and at91sama5_get_ddram_size are the > same if is_sdram == false and is_nb == true. > > is_sdram is always false, because according to the sama5d{2,3,4} > datasheets, the lowest possible value for AT91_DDRSDRC_MD is 3 > (i.e. none of them supports SDR SDRAM). > > Therefore have at91sama5_get_ddram_size call at91_get_ddram_size > with is_nb == true and remove the duplicate code. This patch breaks the build of sama5d4_xplained and sama5d4ek. The root cause is the use of wrong definitions. Following patch fixes this: If you apply this patch before the offending patch you can add my: Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx> Tested-by: Sam Ravnborg <sam@xxxxxxxxxxxx> For all patches in this series. Sam >From 050e9fa72d67e5f5c6cb4b95c18d52e4c3e31625 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@xxxxxxxxxxxx> Date: Sun, 24 Feb 2019 13:31:08 +0100 Subject: [PATCH 1/3] arm: sama5d4: fix stack setup The code that configure the stack uses sama5d3 constants. Fix this to use the proper sama5d4 constants. Boot tested on sama5d4_xplained. Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx> --- arch/arm/boards/sama5d4_xplained/lowlevel.c | 2 +- arch/arm/boards/sama5d4ek/lowlevel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/sama5d4_xplained/lowlevel.c b/arch/arm/boards/sama5d4_xplained/lowlevel.c index b791f2a03..d4d27d2ec 100644 --- a/arch/arm/boards/sama5d4_xplained/lowlevel.c +++ b/arch/arm/boards/sama5d4_xplained/lowlevel.c @@ -17,7 +17,7 @@ void __naked __bare_init barebox_arm_reset_vector(void) { arm_cpu_lowlevel_init(); - arm_setup_stack(SAMA5D3_SRAM_BASE + SAMA5D3_SRAM_SIZE - 16); + arm_setup_stack(SAMA5D4_SRAM_BASE + SAMA5D4_SRAM_SIZE - 16); barebox_arm_entry(SAMA5_DDRCS, at91sama5_get_ddram_size(), NULL); } diff --git a/arch/arm/boards/sama5d4ek/lowlevel.c b/arch/arm/boards/sama5d4ek/lowlevel.c index b791f2a03..d4d27d2ec 100644 --- a/arch/arm/boards/sama5d4ek/lowlevel.c +++ b/arch/arm/boards/sama5d4ek/lowlevel.c @@ -17,7 +17,7 @@ void __naked __bare_init barebox_arm_reset_vector(void) { arm_cpu_lowlevel_init(); - arm_setup_stack(SAMA5D3_SRAM_BASE + SAMA5D3_SRAM_SIZE - 16); + arm_setup_stack(SAMA5D4_SRAM_BASE + SAMA5D4_SRAM_SIZE - 16); barebox_arm_entry(SAMA5_DDRCS, at91sama5_get_ddram_size(), NULL); } -- 2.12.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox