summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/sio.c
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-03-06 15:07:04 +0000
committerkato <kato@FreeBSD.org>1997-03-06 15:07:04 +0000
commitbca74ac1d0de454ed92d3a5c7711671d522f3b5c (patch)
treec39a0bdb04823124e2d45026b559933c13934658 /sys/pc98/cbus/sio.c
parente0dfb66e0e2b3ed4336e404f52ea07a7dae706dc (diff)
downloadFreeBSD-src-bca74ac1d0de454ed92d3a5c7711671d522f3b5c.zip
FreeBSD-src-bca74ac1d0de454ed92d3a5c7711671d522f3b5c.tar.gz
Added missing i8251 code.
Submitted by: H. Nokubi <h-nokubi@nmit.mt.nec.co.jp>
Diffstat (limited to 'sys/pc98/cbus/sio.c')
-rw-r--r--sys/pc98/cbus/sio.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 4d98534..acd1528 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id$
+ * $Id: sio.c,v 1.17 1997/02/22 09:43:44 peter Exp $
*/
#include "opt_comconsole.h"
@@ -752,9 +752,8 @@ sioprobe(dev)
if (IS_PC98IN(xdev->id_iobase))
outb(xdev->id_iobase + 2, 0xf2);
else
-#else
- outb(xdev->id_iobase + com_mcr, 0);
#endif
+ outb(xdev->id_iobase + com_mcr, 0);
#if NCRD > 0
/*
* If PC-Card probe required, then register driver with
@@ -1728,8 +1727,16 @@ siobusycheck(chan)
s = spltty();
if (com->state & CS_BUSY)
; /* False alarm. */
+#ifdef PC98
+ else if (IS_8251(com->pc98_if_type) &&
+ (inb(com->sts_port) & (STS8251_TxRDY | STS8251_TxEMP))
+ == (STS8251_TxRDY | STS8251_TxEMP) ||
+ (inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY))
+ == (LSR_TSRE | LSR_TXRDY)) {
+#else
else if ((inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY))
== (LSR_TSRE | LSR_TXRDY)) {
+#endif
com->tp->t_state &= ~TS_BUSY;
ttwwakeup(com->tp);
} else
@@ -2161,26 +2168,26 @@ sioioctl(dev, cmd, data, flag, p)
com_send_break_off( com );
break;
case TIOCSDTR:
- (void)commctl(com, TIOCM_DTR, DMBIS);
+ com_tiocm_bis(com, TIOCM_DTR | TIOCM_RTS );
break;
case TIOCCDTR:
- (void)commctl(com, TIOCM_DTR, DMBIC);
+ com_tiocm_bic(com, TIOCM_DTR);
break;
/*
* XXX should disallow changing MCR_RTS if CS_RTS_IFLOW is set. The
* changes get undone on the next call to comparam().
*/
case TIOCMSET:
- (void)commctl(com, *(int *)data, DMSET);
+ com_tiocm_set( com, *(int *)data );
break;
case TIOCMBIS:
- (void)commctl(com, *(int *)data, DMBIS);
+ com_tiocm_bis( com, *(int *)data );
break;
case TIOCMBIC:
- (void)commctl(com, *(int *)data, DMBIC);
+ com_tiocm_bic( com, *(int *)data );
break;
case TIOCMGET:
- *(int *)data = commctl(com, 0, DMGET);
+ *(int *)data = com_tiocm_get(com);
break;
case TIOCMSDTRWAIT:
/* must be root since the wait applies to following logins */
@@ -2653,6 +2660,11 @@ retry:
* CS_RTS_IFLOW just changed from on to off. Force MCR_RTS
* on here, since comstart() won't do it later.
*/
+#ifdef PC98
+ if(IS_8251(com->pc98_if_type))
+ com_tiocm_bis(com, TIOCM_RTS);
+ else
+#endif
outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
}
OpenPOWER on IntegriCloud