[PATCH 00/17] arm: mediatek: clean up init code
Julien Stephan
jstephan at baylibre.com
Fri Mar 20 13:38:46 CET 2026
Le jeu. 19 mars 2026 à 21:02, David Lechner <dlechner at baylibre.com> a écrit :
>
> While debugging an issue for Genio 520 EVK support [1], we found some
> issue with the various init functions that have clearly been copy-pasted
> between the different MediaTek SoCs. Most of this is cleaning up
> duplicate or dead code.
>
> The "fix gd->ram_top limit" patches are fixing actual bugs on a couple
> of platforms that were introduced during this development cycle. It
> turns out that this was the root cause of DMA not working on MCC on
> on those platforms, so we should not need [2] after all.
>
> [1]: https://lore.kernel.org/u-boot/f2545bf9-3709-40fd-8d0b-b68f4d841d02@baylibre.com/
> [2]: https://lore.kernel.org/u-boot/20260317-mt8188-mt8195-disable-mmc-disable-dma-v1-1-220da4144920@baylibre.com/
>
> Signed-off-by: David Lechner <dlechner at baylibre.com>
> ---
> David Lechner (17):
> arm: mediatek: mt7987: drop dram_init_banksize()
> arm: mediatek: mt7988: drop dram_init_banksize()
> arm: mediatek: mt8183: drop dram_init_banksize()
> arm: mediatek: mt8183: remove call to fdtdec_setup_memory_banksize()
> arm: mediatek: mt8188: drop dram_init_banksize()
> arm: mediatek: mt8188: check return value of fdtdec_setup_mem_size_base()
> arm: mediatek: mt8188: remove call to fdtdec_setup_memory_banksize()
> arm: mediatek: mt8188: fix gd->ram_top limit
> arm: mediatek: mt8195: drop dram_init_banksize()
> arm: mediatek: mt8195: check return value of fdtdec_setup_mem_size_base()
> arm: mediatek: mt8195: remove call to fdtdec_setup_memory_banksize()
> arm: mediatek: mt8195: fix gd->ram_top limit
> arm: mediatek: mt8365: drop dram_init_banksize()
> arm: mediatek: mt8512: drop dram_init_banksize()
> arm: mediatek: mt8516: drop dram_init_banksize()
> arm: mediatek: mt8518: drop dram_init_banksize()
> arm: mediatek: mt8518: remove call to fdtdec_setup_memory_banksize()
>
> arch/arm/mach-mediatek/mt7987/init.c | 8 --------
> arch/arm/mach-mediatek/mt7988/init.c | 8 --------
> arch/arm/mach-mediatek/mt8183/init.c | 14 --------------
> arch/arm/mach-mediatek/mt8188/init.c | 32 ++++++++------------------------
> arch/arm/mach-mediatek/mt8195/init.c | 32 ++++++++------------------------
> arch/arm/mach-mediatek/mt8365/init.c | 8 --------
> arch/arm/mach-mediatek/mt8512/init.c | 8 --------
> arch/arm/mach-mediatek/mt8516/init.c | 8 --------
> arch/arm/mach-mediatek/mt8518/init.c | 14 --------------
> 9 files changed, 16 insertions(+), 116 deletions(-)
> ---
> base-commit: a27980786cfb3c430aa1c05da8e79180c584d221
> change-id: 20260319-mtk-init-fix-dram-51bd6157bb63
>
> Best regards,
> --
> David Lechner <dlechner at baylibre.com>
>
Thank you David for this!
I tested on genio-510, genio-700 and genio-1200 and it fixex the dma
issue on these platforms.
Reviewed-by: Julien Stephan <jstephan at baylibre.com>
Tested-by: Julien Stephan <jstephan at baylibre.com>
More information about the U-Boot
mailing list