summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8173
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8173')
-rw-r--r--src/soc/mediatek/mt8173/include/soc/memlayout.ld3
-rw-r--r--src/soc/mediatek/mt8173/wdt.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/soc/mediatek/mt8173/include/soc/memlayout.ld b/src/soc/mediatek/mt8173/include/soc/memlayout.ld
index 771f32652e..5b92153142 100644
--- a/src/soc/mediatek/mt8173/include/soc/memlayout.ld
+++ b/src/soc/mediatek/mt8173/include/soc/memlayout.ld
@@ -40,7 +40,8 @@ SECTIONS
SRAM_START(0x00100000)
VBOOT2_WORK(0x00100000, 12K)
PRERAM_CBMEM_CONSOLE(0x00103000, 16K)
- PRERAM_CBFS_CACHE(0x00107000, 16K)
+ WATCHDOG_TOMBSTONE(0x00107000, 4)
+ PRERAM_CBFS_CACHE(0x00107004, 16K - 4)
TIMESTAMP(0x0010B000, 4K)
ROMSTAGE(0x0010C000, 92K)
STACK(0x00124000, 16K)
diff --git a/src/soc/mediatek/mt8173/wdt.c b/src/soc/mediatek/mt8173/wdt.c
index ba63c13b6d..93ffe09209 100644
--- a/src/soc/mediatek/mt8173/wdt.c
+++ b/src/soc/mediatek/mt8173/wdt.c
@@ -18,6 +18,7 @@
#include <reset.h>
#include <soc/addressmap.h>
#include <soc/wdt.h>
+#include <vendorcode/google/chromeos/chromeos.h>
static struct mt8173_wdt_regs * const mt8173_wdt = (void *)RGU_BASE;
@@ -29,9 +30,10 @@ int mtk_wdt_init(void)
wdt_sta = read32(&mt8173_wdt->wdt_status);
printk(BIOS_INFO, "WDT: Last reset was ");
- if (wdt_sta & MTK_WDT_STA_HW_RST)
+ if (wdt_sta & MTK_WDT_STA_HW_RST) {
printk(BIOS_INFO, "hardware watchdog\n");
- else if (wdt_sta & MTK_WDT_STA_SW_RST)
+ mark_watchdog_tombstone();
+ } else if (wdt_sta & MTK_WDT_STA_SW_RST)
printk(BIOS_INFO, "normal software reboot\n");
else if (wdt_sta & MTK_WDT_STA_SPM_RST)
printk(BIOS_INFO, "SPM reboot\n");