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>
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();
}
#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 */
#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