diff options
| author | David Lechner <[email protected]> | 2026-06-15 14:23:34 -0500 |
|---|---|---|
| committer | David Lechner <[email protected]> | 2026-06-24 10:06:16 -0500 |
| commit | 3b7adad0b5223422d9993e08faa9c879c023742d (patch) | |
| tree | 40553700bafcdd1045c13b7d382cdd31d771648c /include | |
| parent | c074950b489957931296bc1efdb5e19f6f64e9a5 (diff) | |
arm: mediatek: mt7988: fix gd->bd->bi_dram[0].size
Use board_get_usable_ram_top() instead of get_effective_memsize() to
set gd->ram_top to something <= 4GiB.
Both board_get_usable_ram_top() and get_effective_memsize() are used to
set gd->ram_top in setup_dest_addr(). However, get_effective_memsize()
also sets gd->bd->bi_dram[0].size in dram_init_banksize(), which is
undesirable.
Prior to commit bddd6bbef3dc ("arm: mediatek: mt7988:
drop dram_init_banksize()"), gd->bd->bi_dram[0].size was overridden in
a board-specific dram_init_banksize() implementation. When that was
removed get_effective_memsize() set gd->bd->bi_dram[0].size to the wrong
value because of CFG_MAX_MEM_MAPPED.
Rather than continue to use an old-style CFG_ option and the potentially
confusing overriding of gd->bd->bi_dram[0].size (it is difficult to see
which order the functions that set it are called), we can just use
board_get_usable_ram_top() to set gd->ram_top to the correct value
instead. This is possible now, thanks to LMB_LIMIT_DMA_BELOW_RAM_TOP
being set by default for 64-bit Mediatek ARM SoCs.
The CFG_MAX_MEM_MAPPED option is removed since it is no longer needed.
The config header and Kconfig option are also removed since that was
the last CFG_ option.
Reported-by: Rudy Andram <[email protected]>
Closes: https://lore.kernel.org/u-boot/[email protected]/
Fixes: bddd6bbef3dc ("arm: mediatek: mt7988: drop dram_init_banksize()")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: David Lechner <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/configs/mt7988.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/configs/mt7988.h b/include/configs/mt7988.h deleted file mode 100644 index e63825a5a19..00000000000 --- a/include/configs/mt7988.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Configuration for MediaTek MT7988 SoC - * - * Copyright (C) 2022 MediaTek Inc. - * Author: Sam Shih <[email protected]> - */ - -#ifndef __MT7988_H -#define __MT7988_H - -#define CFG_MAX_MEM_MAPPED 0xC0000000 - -#endif |
