blob: 680d70b2d35dfe9feec124f34246cb1cb9ab7c45 [file] [log] [blame]
Ravi Kumar Bokka6fde4c52020-08-25 15:47:59 +05301/* SPDX-License-Identifier: GPL-2.0-only */
2
Ravi Kumar Bokka6fde4c52020-08-25 15:47:59 +05303#include <soc/clock.h>
Taniya Das310edec2021-06-23 08:53:39 +05304#include <soc/watchdog.h>
Ravi Kumar Bokka6fde4c52020-08-25 15:47:59 +05305#include <device/mmio.h>
6#include <vendorcode/google/chromeos/chromeos.h>
7
Taniya Das310edec2021-06-23 08:53:39 +05308#define WDOG_RESET_BIT_MASK 1
9
Ravi Kumar Bokka6fde4c52020-08-25 15:47:59 +053010void check_wdog(void)
11{
12 uint32_t wdog_sta = read32(&aoss->aoss_cc_reset_status);
13
14 if (wdog_sta & WDOG_RESET_BIT_MASK)
15 mark_watchdog_tombstone();
16}