summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-07-04 18:45:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-07-04 18:45:21 +0000
commit91588076ed8c710828102214ff01f1d7dc4ad037 (patch)
tree418a49dffdbf3e074d449e748883b86416eb697a /sys/dev
parentcb78fc5628eb65cc93dede84c3fc31caba6cbd8c (diff)
probe & handle TI16750 if they ever show up here
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cardbus/com_cardbus.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/cardbus/com_cardbus.c b/sys/dev/cardbus/com_cardbus.c
index 53fee276b92..50b053de13d 100644
--- a/sys/dev/cardbus/com_cardbus.c
+++ b/sys/dev/cardbus/com_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_cardbus.c,v 1.13 2005/07/04 18:44:53 deraadt Exp $ */
+/* $OpenBSD: com_cardbus.c,v 1.14 2005/07/04 18:45:20 deraadt Exp $ */
/* $NetBSD: com_cardbus.c,v 1.4 2000/04/17 09:21:59 joda Exp $ */
/*
@@ -435,6 +435,20 @@ com_cardbus_attach2(struct com_softc *sc, u_char bug)
}
}
+ if (sc->sc_uarttype == COM_UART_16550A) { /* Probe for TI16750s */
+ bus_space_write_1(iot, ioh, com_lcr, lcr | LCR_DLAB);
+ bus_space_write_1(iot, ioh, com_fifo,
+ FIFO_ENABLE | FIFO_ENABLE_64BYTE);
+ if ((bus_space_read_1(iot, ioh, com_iir) >> 5) == 7) {
+#if 0
+ bus_space_write_1(iot, ioh, com_lcr, 0);
+ if ((bus_space_read_1(iot, ioh, com_iir) >> 5) == 6)
+#endif
+ sc->sc_uarttype = COM_UART_TI16750;
+ }
+ bus_space_write_1(iot, ioh, com_fifo, FIFO_ENABLE);
+ }
+
#if NPCCOM > 0
#ifdef i386
if (sc->sc_uarttype == COM_UART_ST16650V2) { /* Probe for XR16850s */