diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-04-12 09:49:30 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2014-05-28 04:11:53 -0400 |
commit | c46f46d02c90959b82b99badfadc575081666aae (patch) | |
tree | eef1f9bde612c02693fbd8042e4a57b89783ade8 /arch/m68k/mvme16x | |
parent | 7913ad1ad83409e7f9ed5758bb4324bf64c95a73 (diff) |
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/mvme16x')
-rw-r--r-- | arch/m68k/mvme16x/config.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index eab7d342757e..a53803cc66cd 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c | |||
@@ -213,7 +213,7 @@ static void __init mvme16x_init_IRQ (void) | |||
213 | #define CySCRH (0x22) | 213 | #define CySCRH (0x22) |
214 | #define CyTFTC (0x80) | 214 | #define CyTFTC (0x80) |
215 | 215 | ||
216 | static void cons_write(struct console *co, const char *str, unsigned count) | 216 | void mvme16x_cons_write(struct console *co, const char *str, unsigned count) |
217 | { | 217 | { |
218 | volatile unsigned char *base_addr = (u_char *)CD2401_ADDR; | 218 | volatile unsigned char *base_addr = (u_char *)CD2401_ADDR; |
219 | volatile u_char sink; | 219 | volatile u_char sink; |
@@ -268,20 +268,6 @@ static void cons_write(struct console *co, const char *str, unsigned count) | |||
268 | base_addr[CyIER] = ier; | 268 | base_addr[CyIER] = ier; |
269 | } | 269 | } |
270 | 270 | ||
271 | static struct console cons_info = | ||
272 | { | ||
273 | .name = "sercon", | ||
274 | .write = cons_write, | ||
275 | .flags = CON_PRINTBUFFER | CON_BOOT, | ||
276 | .index = -1, | ||
277 | }; | ||
278 | |||
279 | static void __init mvme16x_early_console(void) | ||
280 | { | ||
281 | register_console(&cons_info); | ||
282 | |||
283 | printk(KERN_INFO "MVME16x: early console registered\n"); | ||
284 | } | ||
285 | #endif | 271 | #endif |
286 | 272 | ||
287 | void __init config_mvme16x(void) | 273 | void __init config_mvme16x(void) |
@@ -336,16 +322,6 @@ void __init config_mvme16x(void) | |||
336 | else | 322 | else |
337 | { | 323 | { |
338 | mvme16x_config = MVME16x_CONFIG_GOT_LP | MVME16x_CONFIG_GOT_CD2401; | 324 | mvme16x_config = MVME16x_CONFIG_GOT_LP | MVME16x_CONFIG_GOT_CD2401; |
339 | |||
340 | /* Dont allow any interrupts from the CD2401 until the interrupt */ | ||
341 | /* handlers are installed */ | ||
342 | |||
343 | pcc2chip[PccSCCMICR] = 0x10; | ||
344 | pcc2chip[PccSCCTICR] = 0x10; | ||
345 | pcc2chip[PccSCCRICR] = 0x10; | ||
346 | #ifdef CONFIG_EARLY_PRINTK | ||
347 | mvme16x_early_console(); | ||
348 | #endif | ||
349 | } | 325 | } |
350 | } | 326 | } |
351 | 327 | ||