summaryrefslogtreecommitdiff
path: root/sys/arch/wgrisc
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1999-02-01 16:39:51 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1999-02-01 16:39:51 +0000
commit167b9b7084adff911a0f95f3877a7084923bde89 (patch)
tree51b30e8879717dc18785b773569e89781607f974 /sys/arch/wgrisc
parentd96ecc37310d716c836e9dfafa8a53f56f0efb37 (diff)
Set fifo tresholds
Diffstat (limited to 'sys/arch/wgrisc')
-rw-r--r--sys/arch/wgrisc/dev/com_risc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/wgrisc/dev/com_risc.c b/sys/arch/wgrisc/dev/com_risc.c
index df27ce67e38..a4a88f11d36 100644
--- a/sys/arch/wgrisc/dev/com_risc.c
+++ b/sys/arch/wgrisc/dev/com_risc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_risc.c,v 1.2 1997/07/07 17:09:07 niklas Exp $ */
+/* $OpenBSD: com_risc.c,v 1.3 1999/02/01 16:39:50 pefo Exp $ */
/*
* Copyright (c) 1993, 1994 Charles Hannum.
@@ -148,19 +148,25 @@ com_risc_attach(parent, self, aux)
/* look for a NS 16550AF UART with FIFOs */
+ sc->sc_fifolen = 1;
bus_space_write_1(iot, ioh, com_fifo,
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_14);
delay(100);
if (ISSET(bus_space_read_1(iot, ioh, com_iir), IIR_FIFO_MASK) ==
- IIR_FIFO_MASK)
+ IIR_FIFO_MASK) {
if (ISSET(bus_space_read_1(iot, ioh, com_fifo),
FIFO_TRIGGER_14) == FIFO_TRIGGER_14) {
SET(sc->sc_hwflags, COM_HW_FIFO);
printf(": ns16550a, working fifo\n");
- } else
+ sc->sc_fifolen = 16;
+ }
+ else {
printf(": ns16550, broken fifo\n");
- else
+ }
+ }
+ else {
printf(": ns8250 or ns16450, no fifo\n");
+ }
bus_space_write_1(iot, ioh, com_fifo, 0);
/* disable interrupts */