mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
arm: mediatek: mt8183: remove call to fdtdec_setup_memory_banksize()
Remove an incorrect call to fdtdec_setup_memory_banksize() in dram_init() for mt8183. fdtdec_setup_memory_banksize() populates gd->bd->bi_dram[bank].start and gd->bd->bi_dram[bank].size base on the "memory" node in the device tree. However, calling it from dram_init() is too early because gd->bd has not been allocated yet. gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size are already correctly initialized later in dram_init_banksize(), so we do not need to replace the removed function call with anything else. Reviewed-by: Julien Stephan <jstephan@baylibre.com> Tested-by: Julien Stephan <jstephan@baylibre.com> Link: https://patch.msgid.link/20260319-mtk-init-fix-dram-v1-4-6171ec141f40@baylibre.com Signed-off-by: David Lechner <dlechner@baylibre.com>
This commit is contained in:
@@ -20,12 +20,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = fdtdec_setup_memory_banksize();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return fdtdec_setup_mem_size_base();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user