Linux-2.6.12-rc2
[linux-2.6/kvm.git] / arch / mips / gt64120 / ev64120 / promcon.c
blobb5937c4ba7db18827ca2ef967ed09baf3356fd73
1 /*
2 * Wrap-around code for a console using the
3 * SGI PROM io-routines.
5 * Copyright (c) 1999 Ulf Carlsson
7 * Derived from DECstation promcon.c
8 * Copyright (c) 1998 Harald Koerfgen
9 */
10 #include <linux/tty.h>
11 #include <linux/init.h>
12 #include <linux/console.h>
14 static void prom_console_write(struct console *co, const char *s,
15 unsigned count)
17 extern int CONSOLE_CHANNEL; // The default serial port
18 unsigned i;
20 for (i = 0; i < count; i++) {
21 if (*s == 10)
22 serial_putc(CONSOLE_CHANNEL, 13);
23 serial_putc(CONSOLE_CHANNEL, *s++);
27 int prom_getchar(void)
29 return 0;
32 static struct console sercons = {
33 .name = "ttyS",
34 .write = prom_console_write,
35 .flags = CON_PRINTBUFFER,
36 .index = -1,
40 * Register console.
43 static int gal_serial_console_init(void)
45 // serial_init();
46 //serial_set(115200);
48 register_console(&sercons);
50 return 0;
53 console_initcall(gal_serial_console_init);