From 812379f5007346d440ce86926e1e610231eabcff Mon Sep 17 00:00:00 2001 From: Crystal Guo Date: Mon, 16 Jun 2025 14:00:30 +0800 Subject: [PATCH] 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 Change-Id: I53d70aa26991f89ef05e56f8b7d972f8208d2484 Reviewed-on: https://review.coreboot.org/c/coreboot/+/88123 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu Reviewed-by: Yidi Lin --- src/soc/mediatek/{mt8196/memory.c => common/memory_type.c} | 0 src/soc/mediatek/mt8189/Makefile.mk | 2 +- src/soc/mediatek/mt8196/Makefile.mk | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/soc/mediatek/{mt8196/memory.c => common/memory_type.c} (100%) diff --git a/src/soc/mediatek/mt8196/memory.c b/src/soc/mediatek/common/memory_type.c similarity index 100% rename from src/soc/mediatek/mt8196/memory.c rename to src/soc/mediatek/common/memory_type.c diff --git a/src/soc/mediatek/mt8189/Makefile.mk b/src/soc/mediatek/mt8189/Makefile.mk index 1014d1959c..eb1ce41b48 100644 --- a/src/soc/mediatek/mt8189/Makefile.mk +++ b/src/soc/mediatek/mt8189/Makefile.mk @@ -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 diff --git a/src/soc/mediatek/mt8196/Makefile.mk b/src/soc/mediatek/mt8196/Makefile.mk index 9cf46ac809..2e47a0e970 100644 --- a/src/soc/mediatek/mt8196/Makefile.mk +++ b/src/soc/mediatek/mt8196/Makefile.mk @@ -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