diff options
author | Tom Rini <trini@konsulko.com> | 2015-03-05 07:22:18 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-03-05 07:22:18 -0500 |
commit | 02ebe6f702ec8d025926b0ea7c2088e302c5a302 (patch) | |
tree | 15e249ac39e9c547668327218e63a0faf54a3283 /arch/arm/imx-common/cpu.c | |
parent | 7ae8350f67eea861280a4cbd2d067777a0e87153 (diff) | |
parent | 32df39c741788e8637cffe6633d73594b26d70fb (diff) | |
download | u-boot-imx-02ebe6f702ec8d025926b0ea7c2088e302c5a302.zip u-boot-imx-02ebe6f702ec8d025926b0ea7c2088e302c5a302.tar.gz u-boot-imx-02ebe6f702ec8d025926b0ea7c2088e302c5a302.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'arch/arm/imx-common/cpu.c')
-rw-r--r-- | arch/arm/imx-common/cpu.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 28ccd29..067d08f 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -24,13 +24,16 @@ #include <fsl_esdhc.h> #endif -char *get_reset_cause(void) +static u32 reset_cause = -1; + +static char *get_reset_cause(void) { u32 cause; struct src *src_regs = (struct src *)SRC_BASE_ADDR; cause = readl(&src_regs->srsr); writel(cause, &src_regs->srsr); + reset_cause = cause; switch (cause) { case 0x00001: @@ -53,6 +56,11 @@ char *get_reset_cause(void) } } +u32 get_imx_reset_cause(void) +{ + return reset_cause; +} + #if defined(CONFIG_MX53) || defined(CONFIG_MX6) #if defined(CONFIG_MX53) #define MEMCTL_BASE ESDCTL_BASE_ADDR |