summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.
*