summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/mediatek/mt8188/Makefile.inc1
-rw-r--r--src/soc/mediatek/mt8188/soc.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc
index c1caf3a69a..d76e6f3d77 100644
--- a/src/soc/mediatek/mt8188/Makefile.inc
+++ b/src/soc/mediatek/mt8188/Makefile.inc
@@ -25,6 +25,7 @@ romstage-y += ../common/pmif_spmi.c pmif_spmi.c
romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c
ramstage-y += ../common/auxadc.c
+ramstage-y += ../common/dfd.c
ramstage-y += emi.c
ramstage-y += ../common/mcu.c
ramstage-y += ../common/mcupm.c
diff --git a/src/soc/mediatek/mt8188/soc.c b/src/soc/mediatek/mt8188/soc.c
index 6066de476b..5b2431bc25 100644
--- a/src/soc/mediatek/mt8188/soc.c
+++ b/src/soc/mediatek/mt8188/soc.c
@@ -1,12 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
+#include <bootmem.h>
#include <device/device.h>
+#include <soc/dfd.h>
#include <soc/emi.h>
#include <soc/mcupm.h>
#include <soc/mmu_operations.h>
#include <soc/sspm.h>
#include <symbols.h>
+void bootmem_platform_add_ranges(void)
+{
+ if (CONFIG(MTK_DFD))
+ bootmem_add_range(DFD_DUMP_ADDRESS, DFD_DUMP_SIZE, BM_MEM_RESERVED);
+}
+
static void soc_read_resources(struct device *dev)
{
ram_range(dev, 0, (uintptr_t)_dram, sdram_size());
@@ -17,6 +25,9 @@ static void soc_init(struct device *dev)
mtk_mmu_disable_l2c_sram();
mcupm_init();
sspm_init();
+
+ if (CONFIG(MTK_DFD))
+ dfd_init();
}
static struct device_operations soc_ops = {