aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2011-10-23 10:11:12 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-12-10 13:52:45 -0500
commit93edd023a7de1ea4fe6e5de631982b96156eef03 (patch)
tree9ded40176536ef7ab552adef368592dc648d4c8d /arch/m68k/mac
parentf9994894953d6bd9d5ed2719a34d027a4e0c2131 (diff)
m68k/mac: early console
Revive the old mac_serial_print() routine as mac_early_print(). mac_serial_print() did not function because it did not use the right offsets for its stack arguments. Fix this and make compilation conditional on CONFIG_EARLY_PRINTK instead of the obscure MAC_SERIAL_DEBUG macro. Give mac_early_print() a new string length parameter to fit the early console API. Send output to the framebuffer as well as serial ports. Change the line rate to 38400 baud to match the default for the real (pmac_zilog) serial console. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r--arch/m68k/mac/config.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index c247de02bc7e..55db101dd36d 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -71,6 +71,31 @@ static void mac_get_model(char *str);
71static void mac_identify(void); 71static void mac_identify(void);
72static void mac_report_hardware(void); 72static void mac_report_hardware(void);
73 73
74#ifdef CONFIG_EARLY_PRINTK
75asmlinkage void __init mac_early_print(const char *s, unsigned n);
76
77static void __init mac_early_cons_write(struct console *con,
78 const char *s, unsigned n)
79{
80 mac_early_print(s, n);
81}
82
83static struct console __initdata mac_early_cons = {
84 .name = "early",
85 .write = mac_early_cons_write,
86 .flags = CON_PRINTBUFFER | CON_BOOT,
87 .index = -1
88};
89
90int __init mac_unregister_early_cons(void)
91{
92 /* mac_early_print can't be used after init sections are discarded */
93 return unregister_console(&mac_early_cons);
94}
95
96late_initcall(mac_unregister_early_cons);
97#endif
98
74static void __init mac_sched_init(irq_handler_t vector) 99static void __init mac_sched_init(irq_handler_t vector)
75{ 100{
76 via_init_clock(vector); 101 via_init_clock(vector);
@@ -164,6 +189,10 @@ void __init config_mac(void)
164 mach_beep = mac_mksound; 189 mach_beep = mac_mksound;
165#endif 190#endif
166 191
192#ifdef CONFIG_EARLY_PRINTK
193 register_console(&mac_early_cons);
194#endif
195
167 /* 196 /*
168 * Determine hardware present 197 * Determine hardware present
169 */ 198 */