diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.com> | 2022-08-04 17:11:22 +0800 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-08-13 17:09:40 +0000 |
commit | c3d2e9c593c9f30a82bd94375aaac2f9cd6a16fa (patch) | |
tree | 2c0e576a547d350519a9c693974fe0ff963919d0 /src/soc/mediatek/mt8188 | |
parent | d6cea76dfa8d0cb65c22ef55c4947e7d1068dbc3 (diff) |
soc/mediatek/mt8188: Initialize DFD
DFD (Design for Debug) is a debugging tool, which scans flip-flops
and dumps to internal RAM on the WDT reset. After system reboots,
those values can be shown for debugging using MTK internal parsing
tools.
TEST=build pass
BUG=b:236331724
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I6d19dc6f4e47ed69ba2ea87c79984020a413aee9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66586
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8188')
-rw-r--r-- | src/soc/mediatek/mt8188/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/mediatek/mt8188/soc.c | 11 |
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 = { |