提交 dffdb1f8 编写于 作者: D Dave Gerlach 提交者: Tom Rini

board: ti: am64x: Use fdt functions for ram and bank init

Use the appropriate fdtdec_setup_mem_size_base and
fdtdec_setup_bank_size calls in dram_init and dram_bank_init to pull
these values from DT, where they are already available, instead of
hardcoding them.
Signed-off-by: NDave Gerlach <d-gerlach@ti.com>
上级 adbe138a
......@@ -29,19 +29,24 @@ int board_init(void)
int dram_init(void)
{
gd->ram_size = 0x80000000;
s32 ret;
return 0;
ret = fdtdec_setup_mem_size_base();
if (ret)
printf("Error setting up mem size and base. %d\n", ret);
return ret;
}
int dram_init_banksize(void)
{
/* Bank 0 declares the memory available in the DDR low region */
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = 0x80000000;
gd->ram_size = 0x80000000;
s32 ret;
return 0;
ret = fdtdec_setup_memory_banksize();
if (ret)
printf("Error setting up memory banksize. %d\n", ret);
return ret;
}
#if defined(CONFIG_SPL_LOAD_FIT)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册