Commit 54ebae71 authored by Robin Getz's avatar Robin Getz Committed by Mike Frysinger

Blackfin: do not configure the UART early if on wrong processor

Before we configure the early UART, check to make sure we are running on
the expected processor - otherwise, we cause problems by configuring pins
that don't exist (and causing an infinite loop of faults).
Signed-off-by: default avatarRobin Getz <robin.getz@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 86f2008b
...@@ -202,11 +202,15 @@ asmlinkage void __init init_early_exception_vectors(void) ...@@ -202,11 +202,15 @@ asmlinkage void __init init_early_exception_vectors(void)
asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr) asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr)
{ {
/* This can happen before the uart is initialized, so initialize /* This can happen before the uart is initialized, so initialize
* the UART now * the UART now (but only if we are running on the processor we think
* we are compiled for - otherwise we write to MMRs that don't exist,
* and cause other problems. Nothing comes out the UART, but it does
* end up in the __buf_log.
*/ */
if (likely(early_console == NULL)) if (likely(early_console == NULL) && CPUID == bfin_cpuid())
setup_early_printk(DEFAULT_EARLY_PORT); setup_early_printk(DEFAULT_EARLY_PORT);
printk(KERN_EMERG "Early panic\n");
dump_bfin_mem(fp); dump_bfin_mem(fp);
show_regs(fp); show_regs(fp);
dump_bfin_trace_buffer(); dump_bfin_trace_buffer();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment