diff options
author | Robin Getz <robin.getz@analog.com> | 2009-06-10 02:11:21 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-13 07:20:10 -0400 |
commit | 54ebae7166275a618f0228138e67ff7d10a3b9d0 (patch) | |
tree | 403fc7decea11e2e15367b241a22c5f071a925c2 /arch | |
parent | 86f2008bf546af9a434f480710e8d33891616bf5 (diff) |
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: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/kernel/early_printk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c index 3302719173ca..2ab56811841c 100644 --- a/arch/blackfin/kernel/early_printk.c +++ b/arch/blackfin/kernel/early_printk.c | |||
@@ -202,11 +202,15 @@ asmlinkage void __init init_early_exception_vectors(void) | |||
202 | asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr) | 202 | asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr) |
203 | { | 203 | { |
204 | /* This can happen before the uart is initialized, so initialize | 204 | /* This can happen before the uart is initialized, so initialize |
205 | * the UART now | 205 | * the UART now (but only if we are running on the processor we think |
206 | * we are compiled for - otherwise we write to MMRs that don't exist, | ||
207 | * and cause other problems. Nothing comes out the UART, but it does | ||
208 | * end up in the __buf_log. | ||
206 | */ | 209 | */ |
207 | if (likely(early_console == NULL)) | 210 | if (likely(early_console == NULL) && CPUID == bfin_cpuid()) |
208 | setup_early_printk(DEFAULT_EARLY_PORT); | 211 | setup_early_printk(DEFAULT_EARLY_PORT); |
209 | 212 | ||
213 | printk(KERN_EMERG "Early panic\n"); | ||
210 | dump_bfin_mem(fp); | 214 | dump_bfin_mem(fp); |
211 | show_regs(fp); | 215 | show_regs(fp); |
212 | dump_bfin_trace_buffer(); | 216 | dump_bfin_trace_buffer(); |