diff options
author | marius <marius@FreeBSD.org> | 2005-06-04 21:52:56 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2005-06-04 21:52:56 +0000 |
commit | d128ff3218882f4ff46a3cefae1cc7b96bfbee79 (patch) | |
tree | d99c2f1b522113ed1ed7d0d8e6026d7a461c5e44 /sys/dev/uart/uart_bus_ebus.c | |
parent | ed7fa679fad4f5d58e3577d1962ab65eb9f91770 (diff) | |
download | FreeBSD-src-d128ff3218882f4ff46a3cefae1cc7b96bfbee79.zip FreeBSD-src-d128ff3218882f4ff46a3cefae1cc7b96bfbee79.tar.gz |
On AXi and AXmp boards the NS16550 (used to connect keyboard and mouse)
share their IRQ lines with the i8042. Any IRQ activity (typically during
attach) on the NS16550 used to connect the keyboard when actually the
PS/2 keyboard is selected in OFW causes interaction with the OBP i8042
driver resulting in a hang (and vice versa). As RS232 keyboards and mice
obviously aren't meant to be used in parallel with PS/2 ones on these
boards don't attach to these NS16550 in case the RS232 keyboard isn't
selected in order to prevent such hangs.
Ok'ed by: marcel
Diffstat (limited to 'sys/dev/uart/uart_bus_ebus.c')
-rw-r--r-- | sys/dev/uart/uart_bus_ebus.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_bus_ebus.c b/sys/dev/uart/uart_bus_ebus.c index 15e8bcb..16a4411 100644 --- a/sys/dev/uart/uart_bus_ebus.c +++ b/sys/dev/uart/uart_bus_ebus.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <sys/rman.h> #include <machine/resource.h> +#include <machine/ver.h> #include <dev/uart/uart.h> #include <dev/uart/uart_bus.h> @@ -64,6 +65,7 @@ uart_ebus_probe(device_t dev) { const char *nm, *cmpt; struct uart_softc *sc; + struct uart_devinfo dummy; int error; sc = device_get_softc(dev); @@ -73,6 +75,24 @@ uart_ebus_probe(device_t dev) cmpt = ofw_bus_get_compat(dev); if (!strcmp(nm, "su") || !strcmp(nm, "su_pnp") || (cmpt != NULL && (!strcmp(cmpt, "su") || !strcmp(cmpt, "su16550")))) { + /* + * On AXi and AXmp boards the NS16550 (used to connect + * keyboard/mouse) share their IRQ lines with the i8042. + * Any IRQ activity (typically during attach) of the + * NS16550 used to connect the keyboard when actually the + * PS/2 keyboard is selected in OFW causes interaction + * with the OBP i8042 driver resulting in a hang and vice + * versa. As RS232 keyboards and mice obviously aren't + * meant to be used in parallel with PS/2 ones on these + * boards don't attach to the NS16550 in case the RS232 + * keyboard isn't selected in order to prevent such hangs. + */ + if ((!strcmp(sparc64_model, "SUNW,UltraAX-MP") || + !strcmp(sparc64_model, "SUNW,UltraSPARC-IIi-Engine")) && + uart_cpu_getdev(UART_DEV_KEYBOARD, &dummy)) { + device_disable(dev); + return (ENXIO); + } sc->sc_class = &uart_ns8250_class; return (uart_bus_probe(dev, 0, 0, 0, 0)); } |