summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-01-05 20:08:02 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-01-05 20:08:02 +0000
commitf6280033cae6796757d769f166b285871ac984de (patch)
treeba4808991a8ce05880459239848228d05fd580b0 /sys
parent0f9007bdf8052135f73f8435f523cc9d17c25c7e (diff)
Support for the second set of serial ports on the M8120 (untested)
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/conf/GENERIC3
-rw-r--r--sys/arch/mvme88k/conf/M1873
-rw-r--r--sys/arch/mvme88k/conf/RAMDISK19
-rw-r--r--sys/arch/mvme88k/dev/cl.c40
-rw-r--r--sys/arch/mvme88k/dev/clreg.h3
5 files changed, 40 insertions, 28 deletions
diff --git a/sys/arch/mvme88k/conf/GENERIC b/sys/arch/mvme88k/conf/GENERIC
index 74cb54c84fc..c2277030c50 100644
--- a/sys/arch/mvme88k/conf/GENERIC
+++ b/sys/arch/mvme88k/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.38 2004/01/01 01:51:24 miod Exp $
+# $OpenBSD: GENERIC,v 1.39 2004/01/05 20:07:59 miod Exp $
machine mvme88k
@@ -37,6 +37,7 @@ vme0 at pcctwo0 offset 0x40000
ie0 at pcctwo0 offset 0x46000 ipl 1
ssh0 at pcctwo0 offset 0x47000 ipl 2
cl0 at pcctwo0 offset 0x45000 ipl 3
+cl1 at pcctwo0 offset 0x45200 ipl 3 # M8120 only
#lptwo0 at pcctwo0 offset 0x45000 ipl 1
memc0 at pcctwo0 offset 0x43000
memc1 at pcctwo0 offset 0x43100
diff --git a/sys/arch/mvme88k/conf/M187 b/sys/arch/mvme88k/conf/M187
index 8afd4fd4ab3..50db5ddbd80 100644
--- a/sys/arch/mvme88k/conf/M187
+++ b/sys/arch/mvme88k/conf/M187
@@ -1,4 +1,4 @@
-# $OpenBSD: M187,v 1.26 2004/01/01 01:51:24 miod Exp $
+# $OpenBSD: M187,v 1.27 2004/01/05 20:07:59 miod Exp $
machine mvme88k
@@ -31,6 +31,7 @@ nvram0 at pcctwo0 offset 0xc0000
ie0 at pcctwo0 offset 0x46000 ipl 1
ssh0 at pcctwo0 offset 0x47000 ipl 2
cl0 at pcctwo0 offset 0x45000 ipl 3
+cl1 at pcctwo0 offset 0x45200 ipl 3 # M8120 only
#lptwo0 at pcctwo0 offset 0x45000 ipl 1 size
memc0 at pcctwo0 offset 0x43000
memc1 at pcctwo0 offset 0x43100
diff --git a/sys/arch/mvme88k/conf/RAMDISK b/sys/arch/mvme88k/conf/RAMDISK
index 5eef5bb6a0b..ec07bbf101f 100644
--- a/sys/arch/mvme88k/conf/RAMDISK
+++ b/sys/arch/mvme88k/conf/RAMDISK
@@ -1,8 +1,8 @@
-# $OpenBSD: RAMDISK,v 1.18 2004/01/04 00:29:50 deraadt Exp $
+# $OpenBSD: RAMDISK,v 1.19 2004/01/05 20:07:59 miod Exp $
machine mvme88k
-# 2 meg ramdisk
+# 4 meg ramdisk
option MINIROOTSIZE=4096
option RAMDISK_HOOKS
@@ -44,23 +44,24 @@ pcctwo0 at bussw0 offset 0x42000
clock0 at pcctwo0 ipl 5
vme0 at pcctwo0 offset 0x40000
-nvram0 at pcctwo0 offset 0xc0000
+#nvram0 at pcctwo0 offset 0xc0000
ie0 at pcctwo0 offset 0x46000 ipl 1
ssh0 at pcctwo0 offset 0x47000 ipl 2
cl0 at pcctwo0 offset 0x45000 ipl 3
+#cl1 at pcctwo0 offset 0x45200 ipl 3 # M8120 only
clock0 at syscon0 ipl 5
-nvram0 at syscon0 offset 0x80000
+#nvram0 at syscon0 offset 0x80000
dart0 at syscon0 offset 0x82000 ipl 3
vme0 at syscon0 offset 0x85000
vmes0 at vme0
-vmel0 at vme0
+#vmel0 at vme0
-vx0 at vmes0 addr 0xff780000 ipl 3 len 0x10000
-vx1 at vmes0 addr 0xff790000 ipl 3 len 0x10000
-vx2 at vmes0 addr 0xff7a0000 ipl 3 len 0x10000
-vx3 at vmes0 addr 0xff7b0000 ipl 3 len 0x10000
+#vx0 at vmes0 addr 0xff780000 ipl 3 len 0x10000
+#vx1 at vmes0 addr 0xff790000 ipl 3 len 0x10000
+#vx2 at vmes0 addr 0xff7a0000 ipl 3 len 0x10000
+#vx3 at vmes0 addr 0xff7b0000 ipl 3 len 0x10000
le0 at vmes0 addr 0xffff1200 ipl 1 len 0x100
le1 at vmes0 addr 0xffff1400 ipl 1 len 0x100
le2 at vmes0 addr 0xffff1600 ipl 1 len 0x100
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index c464c66fd12..b99172ee97f 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.35 2004/01/02 23:37:17 miod Exp $ */
+/* $OpenBSD: cl.c,v 1.36 2004/01/05 20:08:01 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -99,7 +99,8 @@ struct cl_info {
#ifndef DO_MALLOC
/* four (4) buffers per port */
-char cl_dmabuf [CLCD_PORTS_PER_CHIP * CL_BUFSIZE * 4];
+char cl_dmabuf[CLCD_PORTS_PER_CHIP * CL_BUFSIZE * 4];
+char cl_dmabuf1[CLCD_PORTS_PER_CHIP * CL_BUFSIZE * 4];
#endif
struct clsoftc {
@@ -206,9 +207,10 @@ cltty(dev)
{
int unit, channel;
struct clsoftc *sc;
+
unit = CL_UNIT(dev);
if (unit >= cl_cd.cd_ndevs ||
- (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) {
+ (sc = (struct clsoftc *)cl_cd.cd_devs[unit]) == NULL) {
return (NULL);
}
channel = CL_CHANNEL(dev);
@@ -221,23 +223,25 @@ clprobe(parent, self, aux)
void *self;
void *aux;
{
- /* probing onboard 166/167/187 CL-cd2400
- * should be previously configured,
- * we can check the value before resetting the chip
- */
struct clreg *cl_reg;
struct confargs *ca = aux;
if (brdtyp == BRD_188)
- return 0;
-
- ca->ca_ipl = IPL_TTY;
- ca->ca_vaddr = ca->ca_paddr = (void *)CD2400_BASE_ADDR;
- cl_reg = (struct clreg *)ca->ca_vaddr;
+ return (0);
- if (badvaddr((vaddr_t)&cl_reg->cl_gfrcr,1))
- return 0;
- return 1;
+ /*
+ * We do not accept empty locators here...
+ */
+ if ((vaddr_t)ca->ca_paddr == CD2400_BASE_ADDR ||
+ ((vaddr_t)ca->ca_paddr == CD2400_SECONDARY_ADDR &&
+ brdtyp == BRD_8120)) {
+ ca->ca_ipl = IPL_TTY;
+ ca->ca_vaddr = ca->ca_paddr;
+
+ cl_reg = (struct clreg *)ca->ca_vaddr;
+ return (!badvaddr((vaddr_t)&cl_reg->cl_gfrcr, 1));
+ } else
+ return (0);
}
void
@@ -274,7 +278,11 @@ clattach(parent, self, aux)
#ifdef DO_MALLOC
sc->sc_cl[0].rx[0] = (void *)(dvma_malloc(16 * CL_BUFSIZE));
#else
- sc->sc_cl[0].rx[0] = (void *) (&cl_dmabuf);
+ /* XXX */
+ if ((vaddr_t)ca->ca_paddr == CD2400_BASE_ADDR)
+ sc->sc_cl[0].rx[0] = (void *)(&cl_dmabuf);
+ else
+ sc->sc_cl[0].rx[0] = (void *)(&cl_dmabuf1);
#endif
sc->sc_cl[0].rx[1] = (void *)(((int)sc->sc_cl[0].rx[0]) + CL_BUFSIZE);
sc->sc_cl[1].rx[0] = (void *)(((int)sc->sc_cl[0].rx[1]) + CL_BUFSIZE);
diff --git a/sys/arch/mvme88k/dev/clreg.h b/sys/arch/mvme88k/dev/clreg.h
index 93bd1566f0b..91f69b2be4b 100644
--- a/sys/arch/mvme88k/dev/clreg.h
+++ b/sys/arch/mvme88k/dev/clreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: clreg.h,v 1.4 2003/10/11 22:08:57 miod Exp $ */
+/* $OpenBSD: clreg.h,v 1.5 2004/01/05 20:08:01 miod Exp $ */
/* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -167,3 +167,4 @@ struct clreg {
* Cirrus chip base address on the mvme1x7 boards.
*/
#define CD2400_BASE_ADDR 0xfff45000
+#define CD2400_SECONDARY_ADDR 0xfff45200