summaryrefslogtreecommitdiff
path: root/src/soc/mediatek
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2021-12-02 19:57:46 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-12-14 17:06:12 +0000
commitac6070a79fb531975d83a32932f2ad66b5af7825 (patch)
treee459ac5d8e1e580fd385d8eea93bbd40c4d7ea69 /src/soc/mediatek
parentda83d2c97fe414a3b2fbf6f55b61da5f1533f819 (diff)
soc/mediatek/mt8186: add tracker dump
Tracker is a debugging tool, and MT8186 only supports AP tracker. When bus timeout occurs, the system reboots and latches some values which could be used for debugging. This function will be triggered only when it encounters the bug hanging issue. BUG=b:202871018 TEST=range of registers are dumped as expected. Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: Ie023de2a6f7421a16b2516baa0bf0bf6fff589e2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59990 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r--src/soc/mediatek/common/tracker.c5
-rw-r--r--src/soc/mediatek/mt8186/Makefile.inc1
-rw-r--r--src/soc/mediatek/mt8186/bootblock.c2
-rw-r--r--src/soc/mediatek/mt8186/include/soc/addressmap.h1
-rw-r--r--src/soc/mediatek/mt8186/include/soc/tracker.h8
5 files changed, 17 insertions, 0 deletions
diff --git a/src/soc/mediatek/common/tracker.c b/src/soc/mediatek/common/tracker.c
index f3b2e9bfd8..3485449b6b 100644
--- a/src/soc/mediatek/common/tracker.c
+++ b/src/soc/mediatek/common/tracker.c
@@ -6,6 +6,11 @@
#include <soc/tracker.h>
#include <soc/tracker_common.h>
+__weak void tracker_setup(void)
+{
+ /* do nothing. */
+}
+
static void tracker_dump_data(void)
{
int i, j, k;
diff --git a/src/soc/mediatek/mt8186/Makefile.inc b/src/soc/mediatek/mt8186/Makefile.inc
index 7a2f997153..2a22e6ef2a 100644
--- a/src/soc/mediatek/mt8186/Makefile.inc
+++ b/src/soc/mediatek/mt8186/Makefile.inc
@@ -11,6 +11,7 @@ bootblock-y += ../common/mmu_operations.c
bootblock-y += ../common/pll.c pll.c
bootblock-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c
bootblock-y += ../common/timer.c timer.c
+bootblock-y += ../common/tracker.c ../common/tracker_v1.c
bootblock-y += ../common/uart.c
bootblock-y += ../common/wdt.c wdt.c
diff --git a/src/soc/mediatek/mt8186/bootblock.c b/src/soc/mediatek/mt8186/bootblock.c
index d5b288a168..e5d1e73047 100644
--- a/src/soc/mediatek/mt8186/bootblock.c
+++ b/src/soc/mediatek/mt8186/bootblock.c
@@ -5,11 +5,13 @@
#include <soc/gic.h>
#include <soc/mmu_operations.h>
#include <soc/pll.h>
+#include <soc/tracker_common.h>
#include <soc/wdt.h>
void bootblock_soc_init(void)
{
mtk_mmu_init();
+ bustracker_init();
mtk_wdt_init();
mt_pll_init();
unmask_eint_event_mask();
diff --git a/src/soc/mediatek/mt8186/include/soc/addressmap.h b/src/soc/mediatek/mt8186/include/soc/addressmap.h
index 6a5ce5c350..adb1d59140 100644
--- a/src/soc/mediatek/mt8186/include/soc/addressmap.h
+++ b/src/soc/mediatek/mt8186/include/soc/addressmap.h
@@ -42,6 +42,7 @@ enum {
I2C8_DMA_BASE = IO_PHYS + 0x00200A80,
I2C9_DMA_BASE = IO_PHYS + 0x00200C00,
DEVAPC_BASE = IO_PHYS + 0x00207000,
+ DBG_TRACKER_BASE = IO_PHYS + 0x00208000,
EMI0_BASE = IO_PHYS + 0x00219000,
EMI0_MPU_BASE = IO_PHYS + 0x0021B000,
DRAMC_CHA_AO_BASE = IO_PHYS + 0x00220000,
diff --git a/src/soc/mediatek/mt8186/include/soc/tracker.h b/src/soc/mediatek/mt8186/include/soc/tracker.h
new file mode 100644
index 0000000000..9c671c9e38
--- /dev/null
+++ b/src/soc/mediatek/mt8186/include/soc/tracker.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef SOC_MEDIATEK_MT8186_TRACKER_H
+#define SOC_MEDIATEK_MT8186_TRACKER_H
+
+#include <soc/tracker_v1.h>
+
+#endif