From b36fc17fb558900bf57e23af67c7850a6e73cc11 Mon Sep 17 00:00:00 2001 From: Troy Kisky <troy.kisky@boundarydevices.com> Date: Sat, 22 Mar 2014 17:13:34 -0700 Subject: [PATCH] arch/arm/imx-common/cpu: add CONFIG_RESET_CAUSE_ADDR --- arch/arm/mach-imx/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index 4a11c947167..01f7b878335 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -44,6 +44,14 @@ static char *get_reset_cause(void) writel(cause, &src_regs->srsr); reset_cause = cause; +#ifdef CONFIG_RESET_CAUSE_ADDR + { + unsigned *p = (unsigned *)CONFIG_RESET_CAUSE_ADDR; + *p++ = 0x12345678; /* magic value to check for */ + *p = cause; + } +#endif + switch (cause) { case 0x00001: case 0x00011: -- GitLab