From 1dcc669aca5c098fc8e407302f8d99c08ea7019f Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Thu, 4 Aug 2022 15:21:48 +0800 Subject: soc/mediatek/mt8188: Add tracker dump Tracker is a debugging tool. When bus timeout occurs, the system will reboot and latch some values of tracker registers which could be used for debugging. This function will be triggered only when it encounters the bus hanging issue. TEST=build pass BUG=b:236331724 Signed-off-by: Bo-Chen Chen Change-Id: I78f676c08ea44e9bb10bd99bbfed70e3e8ece993 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66584 Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/mt8188/Makefile.inc | 1 + src/soc/mediatek/mt8188/bootblock.c | 2 ++ src/soc/mediatek/mt8188/include/soc/addressmap.h | 4 ++++ src/soc/mediatek/mt8188/include/soc/tracker.h | 8 ++++++++ 4 files changed, 15 insertions(+) create mode 100644 src/soc/mediatek/mt8188/include/soc/tracker.h (limited to 'src/soc/mediatek/mt8188') diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc index d82b19cda7..c1caf3a69a 100644 --- a/src/soc/mediatek/mt8188/Makefile.inc +++ b/src/soc/mediatek/mt8188/Makefile.inc @@ -10,6 +10,7 @@ all-y += ../common/uart.c bootblock-y += bootblock.c bootblock-y += ../common/mmu_operations.c +bootblock-y += ../common/tracker.c ../common/tracker_v2.c bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c romstage-y += ../common/cbmem.c diff --git a/src/soc/mediatek/mt8188/bootblock.c b/src/soc/mediatek/mt8188/bootblock.c index e7ff97aeae..75fab9a90b 100644 --- a/src/soc/mediatek/mt8188/bootblock.c +++ b/src/soc/mediatek/mt8188/bootblock.c @@ -3,11 +3,13 @@ #include #include #include +#include #include void bootblock_soc_init(void) { mtk_mmu_init(); + bustracker_init(); mtk_wdt_init(); mt_pll_init(); } diff --git a/src/soc/mediatek/mt8188/include/soc/addressmap.h b/src/soc/mediatek/mt8188/include/soc/addressmap.h index 3ae61fa8f0..e117f749bb 100644 --- a/src/soc/mediatek/mt8188/include/soc/addressmap.h +++ b/src/soc/mediatek/mt8188/include/soc/addressmap.h @@ -11,6 +11,7 @@ enum { MCUSYS_BASE = 0x0C530000, MCUPM_SRAM_BASE = 0x0C540000, MCUPM_CFG_BASE = 0x0C560000, + BUS_TRACE_MONITOR_BASE = 0x0D040000, IO_PHYS = 0x10000000, MCUCFG_BASE = MCUSYS_BASE + 0x00008000, }; @@ -30,6 +31,8 @@ enum { PMICSPI_MST_BASE = IO_PHYS + 0x00025000, PMIF_SPMI_BASE = IO_PHYS + 0x00027000, SPMI_MST_BASE = IO_PHYS + 0x00029000, + DBG_TRACKER_BASE = IO_PHYS + 0x00208000, + PERI_TRACKER_BASE = IO_PHYS + 0x00218000, EMI0_BASE = IO_PHYS + 0x00219000, EMI1_BASE = IO_PHYS + 0x0021D000, I2C0_DMA_BASE = IO_PHYS + 0x00220080, @@ -41,6 +44,7 @@ enum { I2C6_DMA_BASE = IO_PHYS + 0x00220600, SCP_ADSP_CFG_BASE = IO_PHYS + 0x00720000, DRAMC_CHA_AO_BASE = IO_PHYS + 0x00230000, + INFRA_TRACKER_BASE = IO_PHYS + 0x00314000, SSPM_SRAM_BASE = IO_PHYS + 0x00400000, SSPM_CFG_BASE = IO_PHYS + 0x00440000, DPM_PM_SRAM_BASE = IO_PHYS + 0x00900000, diff --git a/src/soc/mediatek/mt8188/include/soc/tracker.h b/src/soc/mediatek/mt8188/include/soc/tracker.h new file mode 100644 index 0000000000..6555d70182 --- /dev/null +++ b/src/soc/mediatek/mt8188/include/soc/tracker.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8188_TRACKER_H +#define SOC_MEDIATEK_MT8188_TRACKER_H + +#include + +#endif -- cgit v1.2.3