Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev Check the PROM stdin path for the strin...
details: https://anonhg.NetBSD.org/src/rev/fc64b1c80654
branches: trunk
changeset: 586388:fc64b1c80654
user: jdc <jdc%NetBSD.org@localhost>
date: Sat Dec 17 17:58:02 2005 +0000
description:
Check the PROM stdin path for the string "/usb@0". If we find a match, call
ukbd_cnattach(), so that the USB keyboard will become the console keyboard.
Makes the keyboard work on a Blade 100.
diffstat:
sys/arch/sparc64/dev/consinit.c | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r f15721823ce5 -r fc64b1c80654 sys/arch/sparc64/dev/consinit.c
--- a/sys/arch/sparc64/dev/consinit.c Sat Dec 17 16:33:30 2005 +0000
+++ b/sys/arch/sparc64/dev/consinit.c Sat Dec 17 17:58:02 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: consinit.c,v 1.19 2005/12/11 12:19:09 christos Exp $ */
+/* $NetBSD: consinit.c,v 1.20 2005/12/17 17:58:02 jdc Exp $ */
/*-
* Copyright (c) 1999 Eduardo E. Horvath
@@ -29,10 +29,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.19 2005/12/11 12:19:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.20 2005/12/17 17:58:02 jdc Exp $");
#include "opt_ddb.h"
#include "pcons.h"
+#include "ukbd.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,6 +60,8 @@
#include <sparc64/dev/cons.h>
+#include <dev/usb/ukbdvar.h>
+
static void prom_cnprobe __P((struct consdev *));
static void prom_cninit __P((struct consdev *));
int prom_cngetc __P((dev_t));
@@ -206,11 +209,19 @@
if (prom_stdin_node != 0 &&
(prom_getproplen(prom_stdin_node, "keyboard") >= 0)) {
-#if NKBD > 0
- printf("cninit: kdb/display not configured\n");
+#if NUKBD > 0
+ if ((OF_instance_to_path(prom_stdin(), buffer, sizeof(buffer)) >= 0) &&
+ (strstr(buffer, "/usb@") != NULL)) {
+ /*
+ * If we have a USB keyboard, it will show up as (e.g.)
+ * /pci@1f,0/usb@c,3/keyboard@1 (Blade 100)
+ */
+ consname = "usb-keyboard/display";
+ ukbd_cnattach();
+ } else
#endif
- consname = "keyboard/display";
- } else if (prom_stdout_node != 0 &&
+ consname = "sun-keyboard/display";
+ } else if (prom_stdin_node != 0 &&
(OF_instance_to_path(prom_stdin(), buffer, sizeof(buffer)) >= 0)) {
consname = buffer;
}
Home |
Main Index |
Thread Index |
Old Index