diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-24 20:29:39 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-24 20:29:39 +0000 |
commit | ba9cc5ffcc4a4acb6a9958df3b6123d7a83baaca (patch) | |
tree | d6496c2c4424e8e1b22c6f3b63999819da96b3d6 /sys/arch/vax/stand/boot/consio.c | |
parent | 9d51be05f8a87d67fc3d8a71f4d4235e0161a2f1 (diff) |
Enable the appropriate serial transmitters in VXT2000 serial routines, this
makes output work when the VXT2000 is not configured for serial console.
Diffstat (limited to 'sys/arch/vax/stand/boot/consio.c')
-rw-r--r-- | sys/arch/vax/stand/boot/consio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/vax/stand/boot/consio.c b/sys/arch/vax/stand/boot/consio.c index 6ff171106be..3ac6a220f39 100644 --- a/sys/arch/vax/stand/boot/consio.c +++ b/sys/arch/vax/stand/boot/consio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: consio.c,v 1.5 2002/08/09 20:26:45 jsyn Exp $ */ +/* $OpenBSD: consio.c,v 1.6 2006/08/24 20:29:38 miod Exp $ */ /* $NetBSD: consio.c,v 1.13 2002/05/24 21:40:59 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. @@ -280,13 +280,17 @@ void ka53_consinit(void) static volatile int *vxtregs = (int *)0x200A0000; #define CH_SR 1 +#define CH_CR 2 #define CH_DAT 3 -#define SR_TX_RDY 0x04 +#define CR_RX_ENA 0x01 +#define CR_TX_ENA 0x04 #define SR_RX_RDY 0x01 +#define SR_TX_RDY 0x04 void vxt_putchar(int c) { + vxtregs[CH_CR] = CR_TX_ENA; while ((vxtregs[CH_SR] & SR_TX_RDY) == 0) ; vxtregs[CH_DAT] = c; @@ -295,6 +299,7 @@ vxt_putchar(int c) int vxt_getchar(void) { + vxtregs[CH_CR] = CR_RX_ENA; while ((vxtregs[CH_SR] & SR_RX_RDY) == 0) ; return vxtregs[CH_DAT]; @@ -303,6 +308,7 @@ vxt_getchar(void) int vxt_testchar(void) { + vxtregs[CH_CR] = CR_RX_ENA; if ((vxtregs[CH_SR] & SR_RX_RDY) == 0) return 0; return vxtregs[CH_DAT]; |