summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam <festevam@denx.de>2025-05-07 21:07:10 -0300
committerEugen Hristev <eugen.hristev@linaro.org>2025-06-19 13:56:43 +0300
commitf414dbcc13dd8709e03ac3f935f5e5c2eebfa5a0 (patch)
tree6de1e34047eec4dcf72e8c8d7f0eb0a216d6ac9e
parent57fb27c027a89c8b9f58157179454a0b95853df6 (diff)
board: sama5d27_wlsom1_ek: Get RAM size and base from devicetree
Instead of using defines for the RAM size and base address, retrieve these information from the devicetree. This aligns with the sama5d27_som1_ek board in commit 73c1589f025d9 ("board: sama5d27_som1_ek: Get dram size and base from device tree"). While at it, remove a spurious '/* SPL */' comment. Signed-off-by: Fabio Estevam <festevam@denx.de>
-rw-r--r--board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c11
-rw-r--r--include/configs/sama5d27_wlsom1_ek.h6
2 files changed, 7 insertions, 10 deletions
diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
index 04de1257eca..897fab58eba 100644
--- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
+++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
@@ -65,7 +65,7 @@ int board_early_init_f(void)
int board_init(void)
{
/* address of boot parameters */
- gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
+ gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
rgb_leds_init();
@@ -82,11 +82,14 @@ int misc_init_r(void)
}
#endif
+int dram_init_banksize(void)
+{
+ return fdtdec_setup_memory_banksize();
+}
+
int dram_init(void)
{
- gd->ram_size = get_ram_size((void *)CFG_SYS_SDRAM_BASE,
- CFG_SYS_SDRAM_SIZE);
- return 0;
+ return fdtdec_setup_mem_size_base();
}
/* SPL */
diff --git a/include/configs/sama5d27_wlsom1_ek.h b/include/configs/sama5d27_wlsom1_ek.h
index 1979cb366e5..b54e3d5c710 100644
--- a/include/configs/sama5d27_wlsom1_ek.h
+++ b/include/configs/sama5d27_wlsom1_ek.h
@@ -15,10 +15,4 @@
#undef CFG_SYS_AT91_MAIN_CLOCK
#define CFG_SYS_AT91_MAIN_CLOCK 24000000 /* from 24 MHz crystal */
-/* SDRAM */
-#define CFG_SYS_SDRAM_BASE 0x20000000
-#define CFG_SYS_SDRAM_SIZE 0x10000000
-
-/* SPL */
-
#endif