mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-22 15:11:24 +02:00
board: ti: am62x: Use fdt functions for ram and bank init
Use the appropriate fdtdec_setup_mem_size_base() call in dram_init() and fdtdec_setup_bank_size() in dram_bank_init() to pull these values from DT, where they are already available, instead of hardcoding them. Signed-off-by: Georgi Vlaev <g-vlaev@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
362b0d2e6e
commit
249e9f3d19
@ -23,17 +23,10 @@ int board_init(void)
|
|||||||
|
|
||||||
int dram_init(void)
|
int dram_init(void)
|
||||||
{
|
{
|
||||||
gd->ram_size = 0x80000000;
|
return fdtdec_setup_mem_size_base();
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int dram_init_banksize(void)
|
int dram_init_banksize(void)
|
||||||
{
|
{
|
||||||
/* Bank 0 declares the memory available in the DDR low region */
|
return fdtdec_setup_memory_banksize();
|
||||||
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
|
|
||||||
gd->bd->bi_dram[0].size = 0x80000000;
|
|
||||||
gd->ram_size = 0x80000000;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user