soc/mediatek/common: Move map_to_lpddr_dram_type() to common for reuse

Relocate map_to_lpddr_dram_type() to the common directory to enable
sharing across MT8189, MT8196, and other SoCs with the same
DRAM_DRAM_TYPE_T values.

BUG=b:417001336
BRANCH=none
TEST=Check boot log
LPDDR5 chan0(x16) rank0: density 16384mbits x16, MF ff rev 0800
LPDDR5 chan0(x16) rank1: density 16384mbits x16, MF ff rev 0800
LPDDR5 chan1(x16) rank0: density 16384mbits x16, MF ff rev 0800
LPDDR5 chan1(x16) rank1: density 16384mbits x16, MF ff rev 0800

Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Change-Id: I53d70aa26991f89ef05e56f8b7d972f8208d2484
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
This commit is contained in:
Crystal Guo 2025-06-16 14:00:30 +08:00 committed by Yidi Lin
commit 812379f500
3 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ romstage-y += ../common/dram_init.c
romstage-y += ../common/dramc_param.c
romstage-y += dvfs.c
romstage-y += ../common/emi.c
romstage-y += ../common/memory.c ../common/memory_test.c
romstage-y += ../common/memory.c ../common/memory_test.c ../common/memory_type.c
romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
romstage-y += ../common/mt6315.c mt6315.c
romstage-y += ../common/mt6359p.c mt6359p.c

View file

@ -36,7 +36,7 @@ romstage-y += ../common/emi.c
romstage-y += irq2axi.c
romstage-y += l2c_ops.c
romstage-y += modem_power_ctrl.c
romstage-y += ../common/memory.c memory.c
romstage-y += ../common/memory.c ../common/memory_type.c
romstage-y += ../common/memory_test.c
romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
romstage-y += ../common/mt6316.c mt6316.c