]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: mediatek: mt8188: remove call to fdtdec_setup_memory_banksize()
authorDavid Lechner <dlechner@baylibre.com>
Thu, 19 Mar 2026 20:00:10 +0000 (15:00 -0500)
committerDavid Lechner <dlechner@baylibre.com>
Mon, 6 Apr 2026 23:39:10 +0000 (18:39 -0500)
Remove an incorrect call to fdtdec_setup_memory_banksize() in
dram_init() for mt8188.

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-7-6171ec141f40@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
arch/arm/mach-mediatek/mt8188/init.c

index 8f0db7455eddf7a9d9ddb40972603be2d64b841a..fc80bc92bd8a7855ba2591c3d642528cafca8fa6 100644 (file)
@@ -18,10 +18,6 @@ int dram_init(void)
 {
        int ret;
 
-       ret = fdtdec_setup_memory_banksize();
-       if (ret)
-               return ret;
-
        ret = fdtdec_setup_mem_size_base();
        if (ret)
                return ret;