diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-28 20:50:27 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-28 20:50:27 +0000 |
commit | 3f4b1eb0600c478d611cbe6c62e480b4d3ce739f (patch) | |
tree | c6fc1813cffb16cc97671114cdc3b54754987c90 /sys/dev/ic/com_subr.c | |
parent | 0120d5b8c1276e772173c88de8aa624dd1594628 (diff) |
Support for ST16C654 chips, however these aren't detected as such, so the
attachment code has to know better for now;
from Alexei G. Malinin (alexei.malinin@inetcomm.ru)
Diffstat (limited to 'sys/dev/ic/com_subr.c')
-rw-r--r-- | sys/dev/ic/com_subr.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/sys/dev/ic/com_subr.c b/sys/dev/ic/com_subr.c index 15e2156f560..9bd6f6aec09 100644 --- a/sys/dev/ic/com_subr.c +++ b/sys/dev/ic/com_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_subr.c,v 1.7 2006/07/31 11:06:30 mickey Exp $ */ +/* $OpenBSD: com_subr.c,v 1.8 2006/12/28 20:50:26 miod Exp $ */ /* * Copyright (c) 1997 - 1999, Jason Downs. All rights reserved. @@ -169,28 +169,24 @@ com_attach_subr(sc) bus_space_write_1(iot, ioh, com_fifo, FIFO_ENABLE); delay(100); -#ifdef COM_PXA2X0 - /* Attachment driver presets COM_UART_PXA2X0. */ - if (sc->sc_uarttype != COM_UART_PXA2X0) -#endif -#ifdef COM_UART_OX16C950 - /* Attachment driver presets COM_UART_OX16C950. */ - if (sc->sc_uarttype != COM_UART_OX16C950) -#endif - switch(bus_space_read_1(iot, ioh, com_iir) >> 6) { - case 0: - sc->sc_uarttype = COM_UART_16450; - break; - case 2: - sc->sc_uarttype = COM_UART_16550; - break; - case 3: - sc->sc_uarttype = COM_UART_16550A; - break; - default: - sc->sc_uarttype = COM_UART_UNKNOWN; - break; - } + /* + * Skip specific probes if attachment code knows it already. + */ + if (sc->sc_uarttype == COM_UART_UNKNOWN) + switch (bus_space_read_1(iot, ioh, com_iir) >> 6) { + case 0: + sc->sc_uarttype = COM_UART_16450; + break; + case 2: + sc->sc_uarttype = COM_UART_16550; + break; + case 3: + sc->sc_uarttype = COM_UART_16550A; + break; + default: + sc->sc_uarttype = COM_UART_UNKNOWN; + break; + } if (sc->sc_uarttype == COM_UART_16550A) { /* Probe for ST16650s */ bus_space_write_1(iot, ioh, com_lcr, lcr | LCR_DLAB); @@ -300,6 +296,11 @@ com_attach_subr(sc) printf(": st16650, %d byte fifo\n", sc->sc_fifolen); SET(sc->sc_hwflags, COM_HW_FIFO); break; + case COM_UART_ST16C654: + printf(": st16c654, 64 byte fifo\n"); + SET(sc->sc_hwflags, COM_HW_FIFO); + sc->sc_fifolen = 64; + break; case COM_UART_TI16750: printf(": ti16750, 64 byte fifo\n"); SET(sc->sc_hwflags, COM_HW_FIFO); |