summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-10-11 21:44:00 -0400
committerMike Frysinger <vapier@gentoo.org>2009-01-28 13:26:15 -0500
commitb1e9435b643043dd8fbd1fcc47309c6acb7b3c8e (patch)
treeb21c55b7e58b3460c6027c04bccc2b7d6ea62443 /cpu
parentb5eba3fafcccd1979380f12a256bd0e19be3d61e (diff)
downloadu-boot-imx-b1e9435b643043dd8fbd1fcc47309c6acb7b3c8e.zip
u-boot-imx-b1e9435b643043dd8fbd1fcc47309c6acb7b3c8e.tar.gz
u-boot-imx-b1e9435b643043dd8fbd1fcc47309c6acb7b3c8e.tar.bz2
Blackfin: pass RETX to Linux
Make sure we save the value of RETX at power on and then pass it on to the kernel so that it can nicely debug a "double-fault-caused-a-reset" crash. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/blackfin/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpu/blackfin/cpu.c b/cpu/blackfin/cpu.c
index 9efd88e..30c214b 100644
--- a/cpu/blackfin/cpu.c
+++ b/cpu/blackfin/cpu.c
@@ -14,11 +14,14 @@
#include <asm/blackfin.h>
#include <asm/cplb.h>
#include <asm/mach-common/bits/core.h>
+#include <asm/mach-common/bits/ebiu.h>
#include <asm/mach-common/bits/trace.h>
#include "cpu.h"
#include "serial.h"
+ulong bfin_poweron_retx;
+
__attribute__ ((__noreturn__))
void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
{
@@ -48,6 +51,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
bfin_write_EBIU_AMGCTL(CONFIG_EBIU_AMGCTL_VAL);
#endif
+ /* Save RETX so we can pass it while booting Linux */
+ bfin_poweron_retx = bootflag;
+
#ifdef CONFIG_DEBUG_DUMP
/* Turn on hardware trace buffer */
bfin_write_TBUFCTL(TBUFPWR | TBUFEN);