summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-10-03 20:15:12 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-10-03 20:15:12 +0000
commit625a1589d3d6464b5d90b8a0918789e3afffd220 (patch)
tree160deb055739e97d92c8cde43a3bb3e2c4d4fa47
parent0df8963d1d22245415aa6c959400e0ed10fbe012 (diff)
Make /dev/console=5, 1 work by making sure output is redirected into
the first serial port (/dev/ttyS0), which is also the prom/kernel console.
-rw-r--r--arch/mips64/sgi-ip27/ip27-console.c10
-rw-r--r--include/asm-mips64/serial.h6
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-console.c b/arch/mips64/sgi-ip27/ip27-console.c
index b9afcf451..e45a078b5 100644
--- a/arch/mips64/sgi-ip27/ip27-console.c
+++ b/arch/mips64/sgi-ip27/ip27-console.c
@@ -5,6 +5,8 @@
*/
#include <linux/init.h>
#include <linux/console.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
#include <asm/sn/addrs.h>
#include <asm/sn/sn0/hub.h>
#include <asm/sn/klconfig.h>
@@ -35,11 +37,17 @@ ip27prom_console_write(struct console *con, const char *s, unsigned n)
prom_printf("%s", s);
}
+static kdev_t
+ip27prom_console_dev(struct console *c)
+{
+ return MKDEV(TTY_MAJOR, 64 + c->index);
+}
+
static struct console ip27_prom_console = {
"prom",
ip27prom_console_write,
NULL,
- NULL,
+ ip27prom_console_dev,
NULL,
NULL,
NULL,
diff --git a/include/asm-mips64/serial.h b/include/asm-mips64/serial.h
index 4d8b7852b..9e5876b41 100644
--- a/include/asm-mips64/serial.h
+++ b/include/asm-mips64/serial.h
@@ -34,6 +34,12 @@
* port 0. So, we just use one serial port from each ioc3 (since the
* serial driver adds addresses to get to higher ports).
*
+ * The first one to do a register_console becomes the preferred console
+ * (if there is no kernel command line console= directive). /dev/console
+ * (ie 5, 1) is then "aliased" into the device number returned by the
+ * "device" routine referred to in this console structure
+ * (ip27prom_console_dev).
+ *
* Also look in ip27-pci.c:pci_fixuop_ioc3() for some comments on working
* around ioc3 oddities in this respect.
*