Re: [PATCH 3/5] board: ti: am62x: Use fdt functions for ram and bank init
On Tue, Jun 14, 2022 at 05:45:32PM +0300, Georgi Vlaev wrote: > 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 > Reviewed-by: Tom Rini Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 3/5] board: ti: am62x: Use fdt functions for ram and bank init
On Tue, Jun 14, 2022 at 05:45:32PM +0300, Georgi Vlaev wrote: > 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 Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature
[PATCH 3/5] 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 --- board/ti/am62x/evm.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 4dd5e64299bf..fb5106d1f3c8 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -23,17 +23,10 @@ int board_init(void) int dram_init(void) { - gd->ram_size = 0x8000; - - return 0; + return fdtdec_setup_mem_size_base(); } 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 = 0x8000; - gd->ram_size = 0x8000; - - return 0; + return fdtdec_setup_memory_banksize(); } -- 2.30.2