summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/reset_manager_s10.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-21 18:59:30 -0400
committerTom Rini <trini@konsulko.com>2019-04-21 18:59:30 -0400
commitb4fde1633e67bb618fd33aad6e6322b7cecf1154 (patch)
treed427acfe3e80e6614a6b9312cb91892dd3dfd8ac /arch/arm/mach-socfpga/reset_manager_s10.c
parent1f4ae66eaab29bfb5d1eb44996f7826c9cd01ed1 (diff)
parente09c1a133155724d3369e150f3ab7b63c875101c (diff)
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- Various stratix10, gen5 updates
Diffstat (limited to 'arch/arm/mach-socfpga/reset_manager_s10.c')
-rw-r--r--arch/arm/mach-socfpga/reset_manager_s10.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/reset_manager_s10.c b/arch/arm/mach-socfpga/reset_manager_s10.c
index f176c38495..f8dd787cc6 100644
--- a/arch/arm/mach-socfpga/reset_manager_s10.c
+++ b/arch/arm/mach-socfpga/reset_manager_s10.c
@@ -103,3 +103,12 @@ void reset_deassert_peripherals_handoff(void)
writel(~RSTMGR_PER0MODRST_OCP_MASK, &reset_manager_base->per0modrst);
writel(0, &reset_manager_base->per0modrst);
}
+
+/*
+ * Return non-zero if the CPU has been warm reset
+ */
+int cpu_has_been_warmreset(void)
+{
+ return readl(&reset_manager_base->status) &
+ RSTMGR_L4WD_MPU_WARMRESET_MASK;
+}