diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2005-08-10 21:19:55 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2005-08-10 21:19:55 +0000 |
commit | 1bd0d0edc162bc27c987b7346a5378d67bcc7e28 (patch) | |
tree | 0869a67942c522b284bd8d44ffb0673ac8bb36e1 /sys | |
parent | 025319aedfec7fa75b5c243fd1f24fd747984843 (diff) |
Audiovox RTM-8000 has a st16650 uart but its fifo is 16 bytes instead of
32. add a workaround for the time being. better code will be added later.
tested by Andreas Gunnarsson <andreas at zzlevo dot net>, deraadt@ ok.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pcmcia/com_pcmcia.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c index a7e2fa54377..f4b08663141 100644 --- a/sys/dev/pcmcia/com_pcmcia.c +++ b/sys/dev/pcmcia/com_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_pcmcia.c,v 1.40 2005/07/19 15:39:16 deraadt Exp $ */ +/* $OpenBSD: com_pcmcia.c,v 1.41 2005/08/10 21:19:54 fgsch Exp $ */ /* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */ /* @@ -340,7 +340,7 @@ found: #ifdef notyet sc->enabled = 0; - + com_pcmcia_disable1(sc); #endif } @@ -429,13 +429,14 @@ com_pcmcia_disable1(sc) pcmcia_function_disable(psc->sc_pf); } -/* +/* * XXX This should be handled by a generic attach */ void com_pcmcia_attach2(sc) struct com_softc *sc; { + struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc; bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; u_int8_t lcr; @@ -506,7 +507,7 @@ com_pcmcia_attach2(sc) } #endif #endif - + /* Reset the LCR (latch access is probably enabled). */ bus_space_write_1(iot, ioh, com_lcr, lcr); if (sc->sc_uarttype == COM_UART_16450) { /* Probe for 8250 */ @@ -549,9 +550,15 @@ com_pcmcia_attach2(sc) printf(": st16650, no working fifo\n"); break; case COM_UART_ST16650V2: - printf(": st16650, 32 byte fifo\n"); + if (psc->sc_pf->sc->card.manufacturer == + PCMCIA_VENDOR_AUDIOVOX && + psc->sc_pf->sc->card.product == + PCMCIA_PRODUCT_AUDIOVOX_RTM8000) + sc->sc_fifolen = 16; + else + sc->sc_fifolen = 32; + printf(": st16650, %d byte fifo\n", sc->sc_fifolen); SET(sc->sc_hwflags, COM_HW_FIFO); - sc->sc_fifolen = 32; break; #if NPCCOM > 0 #ifdef i386 |