From af3076b1f923a1defba52bd8bf173079e5074f9a Mon Sep 17 00:00:00 2001 From: Mike Lin Date: Tue, 24 Dec 2024 15:44:27 +0800 Subject: [PATCH] soc/mediatek/mt8196: Move TX TRACKING from MT8196 to common folder The configuration method of the reserved DRAM buffer used for HW TX TRACING on MT8196 is also applicable to other SoCs, such as MT8189. To facilitate reuse, we move the relevant files to the common directory. BUG=b:379008996 BRANCH=none TEST=Reserve memory ok Firmware shows the following log with 12GB DDR board: 00000001ffff0000-00000001ffffffff: RESERVED 000000037fff0000-000000037fffffff: RESERVED Change-Id: I3fdd9d2f7ab1bbdcc097510556929da2134f7d95 Signed-off-by: Mike Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/87036 Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin --- src/soc/mediatek/{mt8196 => common}/dramc_info.c | 0 src/soc/mediatek/common/include/soc/dramc_info.h | 8 ++++++++ src/soc/mediatek/mt8196/Makefile.mk | 2 +- src/soc/mediatek/mt8196/include/soc/dramc_info.h | 8 -------- 4 files changed, 9 insertions(+), 9 deletions(-) rename src/soc/mediatek/{mt8196 => common}/dramc_info.c (100%) create mode 100644 src/soc/mediatek/common/include/soc/dramc_info.h delete mode 100644 src/soc/mediatek/mt8196/include/soc/dramc_info.h diff --git a/src/soc/mediatek/mt8196/dramc_info.c b/src/soc/mediatek/common/dramc_info.c similarity index 100% rename from src/soc/mediatek/mt8196/dramc_info.c rename to src/soc/mediatek/common/dramc_info.c diff --git a/src/soc/mediatek/common/include/soc/dramc_info.h b/src/soc/mediatek/common/include/soc/dramc_info.h new file mode 100644 index 0000000000..a0be6403e5 --- /dev/null +++ b/src/soc/mediatek/common/include/soc/dramc_info.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __SOC_MEDIATEK_COMMON_DRAMC_INFO_H__ +#define __SOC_MEDIATEK_COMMON_DRAMC_INFO_H__ + +void reserve_buffer_for_dramc(void); + +#endif /* __SOC_MEDIATEK_COMMON_DRAMC_INFO_H__ */ diff --git a/src/soc/mediatek/mt8196/Makefile.mk b/src/soc/mediatek/mt8196/Makefile.mk index 1793104d42..fa0e3fe0be 100644 --- a/src/soc/mediatek/mt8196/Makefile.mk +++ b/src/soc/mediatek/mt8196/Makefile.mk @@ -60,7 +60,7 @@ ramstage-y += ../common/display.c ramstage-y += ../common/dpm_v2.c ramstage-y += ../common/dp/dptx_common.c ../common/dp/dptx_hal_common.c ramstage-y += dptx.c dptx_hal.c dp_intf.c -ramstage-y += dramc_info.c +ramstage-y += ../common/dramc_info.c ramstage-y += ../common/early_init.c ramstage-y += ../common/emi.c ramstage-y += gpueb.c diff --git a/src/soc/mediatek/mt8196/include/soc/dramc_info.h b/src/soc/mediatek/mt8196/include/soc/dramc_info.h deleted file mode 100644 index ccc7ff9b97..0000000000 --- a/src/soc/mediatek/mt8196/include/soc/dramc_info.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __SOC_MEDIATEK_MT8196_DRAMC_INFO_H__ -#define __SOC_MEDIATEK_MT8196_DRAMC_INFO_H__ - -void reserve_buffer_for_dramc(void); - -#endif /* __SOC_MEDIATEK_MT8196_DRAMC_INFO_H__ */