summaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip27/ip27-console.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-06-22 20:09:04 +0100
committerRalf Baechle <ralf@linux-mips.org>2006-06-29 21:10:53 +0100
commita3d45391866d2c244363c3000fc6c1acb3dfcb0b (patch)
treed68b5762068ea274e4baf488ffc4bb972ed23de6 /arch/mips/sgi-ip27/ip27-console.c
parent73f403527b9ec5367376076eafb3d2f505d8e2e3 (diff)
downloadop-kernel-dev-a3d45391866d2c244363c3000fc6c1acb3dfcb0b.zip
op-kernel-dev-a3d45391866d2c244363c3000fc6c1acb3dfcb0b.tar.gz
[MIPS] Early printk for IP27.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-console.c')
-rw-r--r--arch/mips/sgi-ip27/ip27-console.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/arch/mips/sgi-ip27/ip27-console.c b/arch/mips/sgi-ip27/ip27-console.c
index 3e1ac29..14211e3 100644
--- a/arch/mips/sgi-ip27/ip27-console.c
+++ b/arch/mips/sgi-ip27/ip27-console.c
@@ -46,33 +46,29 @@ void prom_putchar(char c)
uart->iu_thr = c;
}
-char __init prom_getchar(void)
+static void ioc3_console_write(struct console *con, const char *s, unsigned n)
{
- return 0;
+ while (n-- && *s) {
+ if (*s == '\n')
+ prom_putchar('\r');
+ prom_putchar(*s);
+ s++;
+ }
}
-static void inline ioc3_console_probe(void)
-{
- struct uart_port up;
-
- /*
- * Register to interrupt zero because we share the interrupt with
- * the serial driver which we don't properly support yet.
- */
- memset(&up, 0, sizeof(up));
- up.membase = (unsigned char *) console_uart();
- up.irq = 0;
- up.uartclk = IOC3_CLK;
- up.regshift = 0;
- up.iotype = UPIO_MEM;
- up.flags = IOC3_FLAGS;
- up.line = 0;
+static struct console ioc3_console = {
+ .name = "ioc3",
+ .write = ioc3_console_write,
+ .flags = CON_PRINTBUFFER | CON_BOOT,
+ .index = -1
+};
- if (early_serial_setup(&up))
- printk(KERN_ERR "Early serial init of port 0 failed\n");
+__init void ip27_setup_console(void)
+{
+ register_console(&ioc3_console);
}
-__init void ip27_setup_console(void)
+void __init disable_early_printk(void)
{
- ioc3_console_probe();
+ unregister_console(&ioc3_console);
}
OpenPOWER on IntegriCloud