diff options
Diffstat (limited to 'sys/arch/mvme88k/dev/cl.c')
-rw-r--r-- | sys/arch/mvme88k/dev/cl.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c index e1c2d251a05..2d7929327ed 100644 --- a/sys/arch/mvme88k/dev/cl.c +++ b/sys/arch/mvme88k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.16 2001/12/14 00:51:41 miod Exp $ */ +/* $OpenBSD: cl.c,v 1.17 2001/12/16 23:49:46 miod Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -217,6 +217,8 @@ int dopoll = 1; #define CL_CHANNEL(x) (minor(x) & 3) #define CL_TTY(x) (minor(x)) +extern int cputyp; + struct tty *cltty __P((dev_t dev)); struct tty *cltty(dev) @@ -245,17 +247,20 @@ clprobe(parent, self, aux) */ struct clreg *cl_reg; struct confargs *ca = aux; - - if (brdtyp == BRD_188) + int ret; + if (cputyp != CPU_187) return 0; ca->ca_ipl = IPL_TTY; - ca->ca_vaddr = ca->ca_paddr = (void *)CD2400_BASE_ADDR; + ca->ca_paddr = (void *)CD2400_BASE_ADDR; cl_reg = (struct clreg *)ca->ca_vaddr; - if (badvaddr((vm_offset_t)&cl_reg->cl_gfrcr,1)) - return 0; - return 1; +#if 0 + ret = !badvaddr(&cl_reg->cl_gfrcr,1); +#else + ret = 1; +#endif + return ret; } void @@ -396,10 +401,10 @@ cl_initchannel(sc, channel) cl_reg->cl_cor5 = 0xec; cl_reg->cl_cor6 = 0x00; cl_reg->cl_cor7 = 0x00; - cl_reg->cl_schr1 = 0x00; - cl_reg->cl_schr2 = 0x00; - cl_reg->cl_schr3 = 0x00; - cl_reg->cl_schr4 = 0x00; + cl_reg->cl_schr1 = 0x00; + cl_reg->cl_schr2 = 0x00; + cl_reg->cl_schr3 = 0x00; + cl_reg->cl_schr4 = 0x00; cl_reg->cl_scrl = 0x00; cl_reg->cl_scrh = 0x00; cl_reg->cl_lnxt = 0x00; @@ -408,10 +413,10 @@ cl_initchannel(sc, channel) cl_reg->cl_tbpr = 0x40; /* 9600 */ cl_reg->cl_tcor = 0x01 << 5; /* console port should be 0x88 already */ - cl_reg->cl_msvr_rts = 0x00; - cl_reg->cl_msvr_dtr = 0x00; - cl_reg->cl_rtprl = CL_RX_TIMEOUT; - cl_reg->cl_rtprh = 0x00; + cl_reg->cl_msvr_rts = 0x00; + cl_reg->cl_msvr_dtr = 0x00; + cl_reg->cl_rtprl = CL_RX_TIMEOUT; + cl_reg->cl_rtprh = 0x00; } sc->cl_reg->cl_ccr = 0x20; while (sc->cl_reg->cl_ccr != 0) { @@ -923,7 +928,7 @@ clcnprobe(cp) int maj; /* bomb if it'a a MVME188 */ - if (brdtyp == BRD_188) { + if (cputyp == CPU_188) { cp->cn_pri = CN_DEAD; return 0; } @@ -933,7 +938,7 @@ clcnprobe(cp) break; cp->cn_dev = makedev (maj, 0); cp->cn_pri = CN_NORMAL; - + return 1; } @@ -943,7 +948,7 @@ clcninit(cp) { volatile struct clreg *cl_reg; - cl_cons.cl_paddr = (void *)CD2400_BASE_ADDR; + cl_cons.cl_paddr = (void *)0xfff45000; cl_cons.cl_vaddr = (struct clreg *)IIOV(cl_cons.cl_paddr); cl_cons.pcctwoaddr = (void *)IIOV(0xfff42000); cl_reg = cl_cons.cl_vaddr; |