diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2006-05-28 17:10:53 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2006-05-28 17:10:53 +0000 |
commit | 27a6ab4b40c4f1c08d9b201c2bf294bb84c7e809 (patch) | |
tree | 24a0b3fb5b00a557576d9a2e50bcd8b335b648ee | |
parent | 0fd31388cab2be9d74147d4dbf6b387bc3daab8c (diff) |
make the ISR bits visible so we can poll them in cngetc (w/out cnpollc).
I still hate this chip.
-rw-r--r-- | sys/arch/sparc64/dev/sab.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c index 7cbc73ab142..c4881e54239 100644 --- a/sys/arch/sparc64/dev/sab.c +++ b/sys/arch/sparc64/dev/sab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sab.c,v 1.17 2004/07/17 21:27:30 miod Exp $ */ +/* $OpenBSD: sab.c,v 1.18 2006/05/28 17:10:52 jason Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -1107,8 +1107,7 @@ sabtty_start(tp) } int -sabtty_cec_wait(sc) - struct sabtty_softc *sc; +sabtty_cec_wait(struct sabtty_softc *sc) { int i = 50000; @@ -1122,8 +1121,7 @@ sabtty_cec_wait(sc) } int -sabtty_tec_wait(sc) - struct sabtty_softc *sc; +sabtty_tec_wait(struct sabtty_softc *sc) { int i = 200000; @@ -1208,7 +1206,10 @@ int sabtty_cngetc(sc) struct sabtty_softc *sc; { - u_int8_t r, len; + u_int8_t r, len, ipc; + + ipc = SAB_READ(sc, SAB_IPC); + SAB_WRITE(sc, SAB_IPC, ipc | SAB_IPC_VIS); again: do { @@ -1238,6 +1239,7 @@ again: */ sabtty_cec_wait(sc); SAB_WRITE(sc, SAB_CMDR, SAB_CMDR_RMC); + SAB_WRITE(sc, SAB_IPC, ipc); return (r); } |