diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com> | 2021-08-10 12:39:32 +0800 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2021-09-29 06:57:15 +0000 |
commit | 61be50dafb308f4b54a4ec329c324e2c89048f98 (patch) | |
tree | 93b7094e2d9e66f6153de154574bd697ec262ab3 /src/soc/mediatek/mt8195/soc.c | |
parent | 98affb68f04d74eebd4ce98a64b21935caf63562 (diff) |
soc/mediatek/mt8195: 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 could be showed for
debugging.
BUG=b:192429713
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Ied63913db94b2e52ab394a66c70f7edfd507c99b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57980
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>
Reviewed-by: Hung-Te Lin <hungte@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/mt8195/soc.c')
-rw-r--r-- | src/soc/mediatek/mt8195/soc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8195/soc.c b/src/soc/mediatek/mt8195/soc.c index 638056487b..399196489a 100644 --- a/src/soc/mediatek/mt8195/soc.c +++ b/src/soc/mediatek/mt8195/soc.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <bootmem.h> #include <device/device.h> #include <soc/devapc.h> +#include <soc/dfd.h> #include <soc/emi.h> #include <soc/hdmi.h> #include <soc/mcupm.h> @@ -10,6 +12,12 @@ #include <soc/ufs.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_resource(dev, 0, (uintptr_t)_dram / KiB, sdram_size() / KiB); @@ -21,6 +29,10 @@ static void soc_init(struct device *dev) dapc_init(); mcupm_init(); sspm_init(); + + if (CONFIG(MTK_DFD)) + dfd_init(); + ufs_disable_refclk(); hdmi_low_power_setting(); } |