summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/vf610.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-04-20 18:05:38 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-05-08 08:04:19 +0200
commitef7cd069b55be2bf63e70e421e18408ec499bdfe (patch)
tree233c3440f1940da98c60c895d6e1a97cfb683212 /arch/arm/mach-imx/vf610.c
parent0c095f9ae8215a08b223a14f487fc71d8c986ce0 (diff)
downloadbarebox-ef7cd069b55be2bf63e70e421e18408ec499bdfe.tar.gz
barebox-ef7cd069b55be2bf63e70e421e18408ec499bdfe.tar.xz
ARM: VFxxx: Record reset reason as a part of startup
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/vf610.c')
-rw-r--r--arch/arm/mach-imx/vf610.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/vf610.c b/arch/arm/mach-imx/vf610.c
index c2d02632f1..df8cfcd6b6 100644
--- a/arch/arm/mach-imx/vf610.c
+++ b/arch/arm/mach-imx/vf610.c
@@ -18,6 +18,17 @@
#include <mach/generic.h>
#include <mach/revision.h>
#include <mach/vf610.h>
+#include <mach/reset-reason.h>
+
+static const struct imx_reset_reason vf610_reset_reasons[] = {
+ { VF610_SRC_SRSR_POR_RST, RESET_POR, 0 },
+ { VF610_SRC_SRSR_WDOG_A5, RESET_WDG, 0 },
+ { VF610_SRC_SRSR_WDOG_M4, RESET_WDG, 1 },
+ { VF610_SRC_SRSR_JTAG_RST, RESET_JTAG, 0 },
+ { VF610_SRC_SRSR_RESETB, RESET_EXT, 0 },
+ { VF610_SRC_SRSR_SW_RST, RESET_RST, 0 },
+ { /* sentinel */ }
+};
int vf610_init(void)
{
@@ -43,5 +54,6 @@ int vf610_init(void)
}
imx_set_silicon_revision(cputypestr, vf610_cpu_revision());
+ imx_set_reset_reason(src + VF610_SRC_SRSR, vf610_reset_reasons);
return 0;
}