diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-08-10 12:04:28 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-08-13 09:12:03 +0200 |
commit | 79ebe024474516a86ffeff1c583e2be57649fad2 (patch) | |
tree | bb1710e5e10f4d79be80daf41b85f4cdf861169c /arch/arm/mach-imx/imx.c | |
parent | 60a79c025a36366cb9ce4e218ff17d55d049ace6 (diff) | |
download | barebox-79ebe024474516a86ffeff1c583e2be57649fad2.tar.gz barebox-79ebe024474516a86ffeff1c583e2be57649fad2.tar.xz |
ARM: i.MX8MQ: Add code to detect reset reason
Reset reason bits and their meaning seem to be identical between i.MX7
and i.MX8MQ. Share the definitions for the former and used it for the
latter.
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/imx.c')
-rw-r--r-- | arch/arm/mach-imx/imx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c index 6fe53f3140..ad227663dd 100644 --- a/arch/arm/mach-imx/imx.c +++ b/arch/arm/mach-imx/imx.c @@ -157,6 +157,17 @@ static int imx_init(void) } postcore_initcall(imx_init); +const struct imx_reset_reason imx7_reset_reasons[] = { + { IMX_SRC_SRSR_IPP_RESET, RESET_POR, 0 }, + { IMX_SRC_SRSR_WDOG1_RESET, RESET_WDG, 0 }, + { IMX_SRC_SRSR_JTAG_RESET, RESET_JTAG, 0 }, + { IMX_SRC_SRSR_JTAG_SW_RESET, RESET_JTAG, 0 }, + { IMX_SRC_SRSR_WDOG3_RESET, RESET_WDG, 1 }, + { IMX_SRC_SRSR_WDOG4_RESET, RESET_WDG, 2 }, + { IMX_SRC_SRSR_TEMPSENSE_RESET, RESET_THERM, 0 }, + { /* sentinel */ } +}; + const struct imx_reset_reason imx_reset_reasons[] = { { IMX_SRC_SRSR_IPP_RESET, RESET_POR, 0 }, { IMX_SRC_SRSR_WDOG1_RESET, RESET_WDG, 0 }, |