coreboot/src/soc
Yidi Lin 1e8cea55a0 soc/mediatek/common/emi: Cache SDRAM size
Optimize the `sdram_size` function by caching the calculated SDRAM
size in a static variable. This prevents redundant calls to
`mtk_dram_size()` or `mem_chip_info_total_density_bytes()` if the size
has already been determined, improving performance in scenarios where
`sdram_size` is called multiple times.

BUG=none
TEST=emerege-tanjiro coreboot

Change-Id: I0ca0df80ee9cb781a5bb6d55ee28a2c1153be0ad
Signed-off-by: Yidi Lin <yidilin@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90485
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2025-12-13 14:30:06 +00:00
..
amd Remove <swab.h> and swabXX() functions 2025-12-12 07:09:45 +00:00
cavium
example/min86
ibm/power9 soc/power9/rom_media.c: find CBFS in PNOR 2025-08-28 20:14:01 +00:00
intel soc/intel/apollolake: Add CFR objects for existing options 2025-12-11 19:47:22 +00:00
mediatek soc/mediatek/common/emi: Cache SDRAM size 2025-12-13 14:30:06 +00:00
nvidia
qualcomm soc/qualcomm/x1p42100: Update memlayout for BL31 region and realign TA region 2025-12-11 00:12:03 +00:00
rockchip
samsung
sifive
ti
ucb/riscv
xilinx