diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-04-12 17:49:30 +0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2014-05-28 12:11:53 +0400 |
commit | c46f46d02c90959b82b99badfadc575081666aae (patch) | |
tree | eef1f9bde612c02693fbd8042e4a57b89783ade8 /arch/m68k/kernel/early_printk.c | |
parent | 7913ad1ad83409e7f9ed5758bb4324bf64c95a73 (diff) | |
download | linux-c46f46d02c90959b82b99badfadc575081666aae.tar.xz |
m68k/mvme16x: Adopt common boot console
In a multi-platform kernel binary we only need one early console instance.
The difficulty here is that the common early console is started by
early_param(), whereas the MVME16x instance is started later by
config_mvme16x(). That means some interrupt setup must be done earlier.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Stephen N Chivers <schivers@csc.com.au>
[Geert] Tag debug_cons_write() with __ref to kill section mismatch warning
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/kernel/early_printk.c')
-rw-r--r-- | arch/m68k/kernel/early_printk.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/m68k/kernel/early_printk.c b/arch/m68k/kernel/early_printk.c index 919b83794545..ff9708d71921 100644 --- a/arch/m68k/kernel/early_printk.c +++ b/arch/m68k/kernel/early_printk.c @@ -12,12 +12,21 @@ #include <linux/string.h> #include <asm/setup.h> +extern void mvme16x_cons_write(struct console *co, + const char *str, unsigned count); + asmlinkage void __init debug_cons_nputs(const char *s, unsigned n); -static void debug_cons_write(struct console *c, - const char *s, unsigned n) +static void __ref debug_cons_write(struct console *c, + const char *s, unsigned n) { - debug_cons_nputs(s, n); +#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68360) || \ + defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)) + if (MACH_IS_MVME16x) + mvme16x_cons_write(c, s, n); + else + debug_cons_nputs(s, n); +#endif } static struct console early_console_instance = { @@ -29,10 +38,6 @@ static struct console early_console_instance = { static int __init setup_early_printk(char *buf) { - /* MVME16x registers an early console after interrupt setup. */ - if (MACH_IS_MVME16x) - return 0; - if (early_console || buf) return 0; @@ -52,7 +57,7 @@ early_param("earlyprintk", setup_early_printk); static int __init unregister_early_console(void) { - if (!early_console) + if (!early_console || MACH_IS_MVME16x) return 0; return unregister_console(early_console); |