summaryrefslogtreecommitdiff
path: root/src/soc/rockchip/rk3399/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/rockchip/rk3399/clock.c')
-rw-r--r--src/soc/rockchip/rk3399/clock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/rockchip/rk3399/clock.c b/src/soc/rockchip/rk3399/clock.c
index 428a210e00..3eeda3863e 100644
--- a/src/soc/rockchip/rk3399/clock.c
+++ b/src/soc/rockchip/rk3399/clock.c
@@ -834,3 +834,9 @@ void rkclk_configure_emmc(void)
CLK_EMMC_PLL_SEL_GPLL << CLK_EMMC_PLL_SHIFT |
(src_clk_div - 1) << CLK_EMMC_DIV_CON_SHIFT));
}
+
+int rkclk_was_watchdog_reset(void)
+{
+ /* Bits 5 and 4 are "second" and "first" global watchdog reset. */
+ return read32(&cru_ptr->glb_rst_st) & 0x30;
+}