Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mvme68k Merge 'scw_mvme68k_bus_space' branch with t...



details:   https://anonhg.NetBSD.org/src/rev/cebe84da9718
branches:  trunk
changeset: 483805:cebe84da9718
user:      scw <scw%NetBSD.org@localhost>
date:      Sat Mar 18 22:33:02 2000 +0000

description:
Merge 'scw_mvme68k_bus_space' branch with the trunk.
These changes add support for:

        o The MI VMEbus framework on both MVME147 and MVME167.
        o Enhancements to the existing MD bus_space(9) implementation.
        o Most of the bus_dma(9) API.

diffstat:

 sys/arch/mvme68k/conf/GENERIC             |   18 +-
 sys/arch/mvme68k/conf/Makefile.mvme68k    |    5 +-
 sys/arch/mvme68k/conf/VME147              |   14 +-
 sys/arch/mvme68k/conf/VME167              |   13 +-
 sys/arch/mvme68k/conf/files.mvme68k       |   42 +-
 sys/arch/mvme68k/dev/clmpcc_pcctwo.c      |  133 ++-
 sys/arch/mvme68k/dev/clock_pcc.c          |  119 ++-
 sys/arch/mvme68k/dev/clock_pcctwo.c       |  138 ++-
 sys/arch/mvme68k/dev/if_ie.c              |  209 ++++--
 sys/arch/mvme68k/dev/if_iereg.h           |   12 +-
 sys/arch/mvme68k/dev/if_le.c              |   79 +-
 sys/arch/mvme68k/dev/if_lereg.h           |   10 +-
 sys/arch/mvme68k/dev/if_levar.h           |    6 +-
 sys/arch/mvme68k/dev/lpt.c                |  114 +-
 sys/arch/mvme68k/dev/lpt_pcc.c            |  110 +-
 sys/arch/mvme68k/dev/lpt_pccreg.h         |   30 +-
 sys/arch/mvme68k/dev/lpt_pcctwo.c         |  194 +++--
 sys/arch/mvme68k/dev/lptvar.h             |    5 +-
 sys/arch/mvme68k/dev/mainbus.c            |  192 ++++++
 sys/arch/mvme68k/dev/mainbus.h            |   60 +
 sys/arch/mvme68k/dev/md_root.c            |    8 +-
 sys/arch/mvme68k/dev/ncrsc_pcctwo.c       |   88 +-
 sys/arch/mvme68k/dev/pcc.c                |  185 +++--
 sys/arch/mvme68k/dev/pccreg.h             |  121 ++-
 sys/arch/mvme68k/dev/pcctwo.c             |  140 ++--
 sys/arch/mvme68k/dev/pcctworeg.h          |  171 ++--
 sys/arch/mvme68k/dev/pcctwovar.h          |   71 ++
 sys/arch/mvme68k/dev/pccvar.h             |   42 +-
 sys/arch/mvme68k/dev/sbic.c               |   52 +-
 sys/arch/mvme68k/dev/sbicvar.h            |    6 +-
 sys/arch/mvme68k/dev/siop.c               |    6 +-
 sys/arch/mvme68k/dev/vme.c                |  323 ----------
 sys/arch/mvme68k/dev/vme_pcc.c            |  537 +++++++++++++---
 sys/arch/mvme68k/dev/vme_pccreg.h         |  253 +++----
 sys/arch/mvme68k/dev/vme_pccvar.h         |   88 ++
 sys/arch/mvme68k/dev/vme_two.c            |  958 ++++++++++++++++++++++-------
 sys/arch/mvme68k/dev/vme_tworeg.h         |  654 +++++++++++---------
 sys/arch/mvme68k/dev/vme_twovar.h         |  101 ++-
 sys/arch/mvme68k/dev/vmevar.h             |   88 --
 sys/arch/mvme68k/dev/wdsc.c               |  109 +-
 sys/arch/mvme68k/dev/zs.c                 |   47 +-
 sys/arch/mvme68k/dev/zs_pcc.c             |   56 +-
 sys/arch/mvme68k/dev/zsvar.h              |    8 +-
 sys/arch/mvme68k/include/autoconf.h       |    6 +-
 sys/arch/mvme68k/include/bus.h            |    5 +-
 sys/arch/mvme68k/include/bus_dma.h        |  247 +++++++
 sys/arch/mvme68k/include/bus_space.h      |   37 +-
 sys/arch/mvme68k/include/cpu.h            |   25 +-
 sys/arch/mvme68k/include/intr.h           |  103 +++
 sys/arch/mvme68k/include/param.h          |   34 +-
 sys/arch/mvme68k/include/pmap.h           |    5 +-
 sys/arch/mvme68k/mvme68k/autoconf.c       |  136 +----
 sys/arch/mvme68k/mvme68k/bus_dma.c        |  790 ++++++++++++++++++++++++
 sys/arch/mvme68k/mvme68k/bus_space.c      |  121 +++
 sys/arch/mvme68k/mvme68k/clock.c          |   92 +-
 sys/arch/mvme68k/mvme68k/clockreg.h       |   34 +-
 sys/arch/mvme68k/mvme68k/clockvar.h       |   17 +-
 sys/arch/mvme68k/mvme68k/conf.c           |    6 +-
 sys/arch/mvme68k/mvme68k/disksubr.c       |   14 +-
 sys/arch/mvme68k/mvme68k/dkbad.c          |   66 --
 sys/arch/mvme68k/mvme68k/isr.c            |   45 +-
 sys/arch/mvme68k/mvme68k/locore.s         |    2 +-
 sys/arch/mvme68k/mvme68k/machdep.c        |  107 ++-
 sys/arch/mvme68k/mvme68k/mem.c            |   13 +-
 sys/arch/mvme68k/mvme68k/pmap.c           |   39 +-
 sys/arch/mvme68k/mvme68k/pmap_bootstrap.c |   66 +-
 sys/arch/mvme68k/mvme68k/trap.c           |    7 +-
 sys/arch/mvme68k/mvme68k/vm_machdep.c     |   12 +-
 68 files changed, 4989 insertions(+), 2655 deletions(-)

diffs (truncated from 11091 to 300 lines):

diff -r b20e76f5476b -r cebe84da9718 sys/arch/mvme68k/conf/GENERIC
--- a/sys/arch/mvme68k/conf/GENERIC     Sat Mar 18 22:23:13 2000 +0000
+++ b/sys/arch/mvme68k/conf/GENERIC     Sat Mar 18 22:33:02 2000 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: GENERIC,v 1.5 2000/01/23 23:46:14 hubertf Exp $
+#      $NetBSD: GENERIC,v 1.6 2000/03/18 22:33:02 scw Exp $
 
 include                "arch/mvme68k/conf/std.mvme68k"
 
-#ident                 "GENERIC-$Revision: 1.5 $"
+#ident                 "GENERIC-$Revision: 1.6 $"
 
 # Boards this kernel supports
 options        MVME147
@@ -23,7 +23,7 @@
 file-system    FFS
 file-system    NFS     
 file-system    KERNFS
-#file-system   MFS
+file-system    MFS
 #file-system   MSDOSFS
 #file-system   UNION
 
@@ -83,7 +83,7 @@
 
 # MVME147 specific devices
 pcc0           at mainbus0
-vmechip*       at pcc?
+vmepcc0        at pcc?
 zsc*           at pcc? ipl 4
 zstty*         at zsc? channel ?
 clock0         at pcc? ipl 5
@@ -93,18 +93,18 @@
 
 # MVME167 specific devices
 pcctwo0                at mainbus0
-vmechip*       at mainbus0
+vmetwo0        at mainbus0
 clock0         at pcctwo? ipl 5
 clmpcc0                at pcctwo? ipl 4
 ie0            at pcctwo? ipl 3
 ncrsc0         at pcctwo? ipl 2
 lpt*           at pcctwo? ipl 1
 
-vmes0          at vmechip?
-vmel0          at vmechip?
+vme0           at vmepcc0
+vme0           at vmetwo0
 
-# example only - A24D16 device
-#foo0          at vmes0 atype 24 addr 0x0ef00 ipl 3 vec 0x60
+# Example VMEbus device
+#foo0          at vme0 addr 0x00ef0000 irq 3 vect 0x80
 
 scsibus*       at wdsc?
 scsibus*       at ncrsc?
diff -r b20e76f5476b -r cebe84da9718 sys/arch/mvme68k/conf/Makefile.mvme68k
--- a/sys/arch/mvme68k/conf/Makefile.mvme68k    Sat Mar 18 22:23:13 2000 +0000
+++ b/sys/arch/mvme68k/conf/Makefile.mvme68k    Sat Mar 18 22:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.mvme68k,v 1.45 2000/02/01 05:25:37 tsutsui Exp $
+#      $NetBSD: Makefile.mvme68k,v 1.46 2000/03/18 22:33:02 scw Exp $
 
 # Makefile for NetBSD
 #
@@ -47,7 +47,8 @@
 HAVE_GCC28!=   ${CC} --version | egrep "^(2\.8|egcs)" ; echo 
 INCLUDES=      -nostdinc -I. -I$S/arch -I$S
 CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Dmvme68k
-CWARNFLAGS?=   -Werror -Wpointer-arith
+CWARNFLAGS?=   -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
+               -Wpointer-arith
 .if (${HAVE_GCC28} != "")
 CWARNFLAGS+=   -Wno-main
 .endif
diff -r b20e76f5476b -r cebe84da9718 sys/arch/mvme68k/conf/VME147
--- a/sys/arch/mvme68k/conf/VME147      Sat Mar 18 22:23:13 2000 +0000
+++ b/sys/arch/mvme68k/conf/VME147      Sat Mar 18 22:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: VME147,v 1.28 1999/07/29 10:37:20 augustss Exp $
+#      $NetBSD: VME147,v 1.29 2000/03/18 22:33:02 scw Exp $
 
 include                "arch/mvme68k/conf/std.mvme68k"
 
@@ -18,7 +18,7 @@
 file-system    FFS
 file-system    NFS     
 file-system    KERNFS
-#file-system   MFS
+file-system    MFS
 #file-system   MSDOSFS
 #file-system   UNION
 
@@ -65,13 +65,11 @@
 le0            at pcc? ipl 3
 wdsc0          at pcc? ipl 2
 lpt0           at pcc? ipl 1
-vmechip0       at pcc?
+vmepcc0        at pcc?
+vme0           at vmepcc0
 
-vmes0          at vmechip?
-vmel0          at vmechip?
-
-# example only - A24D16 device
-#foo0          at vmes0 atype 24 addr 0x0ef00 ipl 3 vec 0x60
+# Example VMEbus device
+#foo0          at vme0 addr 0x10001000 am 0x0d irq 2 vect 0x80
 
 scsibus*       at wdsc?
 
diff -r b20e76f5476b -r cebe84da9718 sys/arch/mvme68k/conf/VME167
--- a/sys/arch/mvme68k/conf/VME167      Sat Mar 18 22:23:13 2000 +0000
+++ b/sys/arch/mvme68k/conf/VME167      Sat Mar 18 22:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: VME167,v 1.4 1999/07/29 10:37:20 augustss Exp $
+#      $NetBSD: VME167,v 1.5 2000/03/18 22:33:02 scw Exp $
 
 include                "arch/mvme68k/conf/std.mvme68k"
 
@@ -20,7 +20,7 @@
 file-system    FFS
 file-system    NFS     
 file-system    KERNFS
-#file-system   MFS
+file-system    MFS
 #file-system   MSDOSFS
 #file-system   UNION
 
@@ -64,12 +64,11 @@
 lpt0           at pcctwo? ipl 1
 
 # VMEbus Support
-vmechip0       at mainbus0
-vmes0          at vmechip0
-vmel0          at vmechip0
+vmetwo0        at mainbus0
+vme0           at vmetwo0
 
-# example only - A24D16 device
-#foo0          at vmes0 atype 24 addr 0x0ef00 ipl 3 vec 0x80
+# Example VMEbus device
+#foo0          at vme0 addr 0x10001000 am 0x0d irq 3 vect 0x80
 
 # SCSI Bus Support
 scsibus*       at ncrsc?
diff -r b20e76f5476b -r cebe84da9718 sys/arch/mvme68k/conf/files.mvme68k
--- a/sys/arch/mvme68k/conf/files.mvme68k       Sat Mar 18 22:23:13 2000 +0000
+++ b/sys/arch/mvme68k/conf/files.mvme68k       Sat Mar 18 22:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.mvme68k,v 1.30 2000/03/14 15:56:56 oster Exp $
+#      $NetBSD: files.mvme68k,v 1.31 2000/03/18 22:33:02 scw Exp $
 
 # config file for mvme68k
 
@@ -7,6 +7,7 @@
 
 device mainbus { }
 attach mainbus at root
+file arch/mvme68k/dev/mainbus.c                mainbus
 
 # MVME-147 Peripheral Channel Controller
 device pcc { [ ipl = -1 ] }
@@ -18,6 +19,19 @@
 attach pcctwo at mainbus
 file arch/mvme68k/dev/pcctwo.c                 pcctwo needs-flag
 
+# Grab the MD VMEbus goop
+include "dev/vme/files.vme"
+
+# MVME-147 VME controller chip
+device vmepcc: vmebus
+attach vmepcc at pcc
+file   arch/mvme68k/dev/vme_pcc.c              vmepcc
+
+# MVME-1[67]7 VME controller chip
+device vmetwo: vmebus
+attach vmetwo at mainbus
+file   arch/mvme68k/dev/vme_two.c              vmetwo
+
 device clock
 attach clock at pcc with clock_pcc
 attach clock at pcctwo with clock_pcctwo
@@ -45,38 +59,19 @@
 
 # device defined in sys/conf/files
 attach le at pcc with le_pcc: le24
-file arch/mvme68k/dev/if_le.c                  le
+file arch/mvme68k/dev/if_le.c                  le_pcc
 
 # i82596 Ethernet Interface on MVME1[67]7
-device ie: ifnet, ether, arp, i82586
 attach ie at pcctwo with ie_pcctwo
-file arch/mvme68k/dev/if_ie.c                  ie
+file arch/mvme68k/dev/if_ie.c                  ie_pcctwo
 
 # CD2401 Quad Serial Controller
 attach clmpcc at pcctwo with clmpcc_pcctwo
 file arch/mvme68k/dev/clmpcc_pcctwo.c          clmpcc_pcctwo needs-flag
 
-# Generic VME support
-device vmechip { }
-file arch/mvme68k/dev/vme.c                    vmechip
-
-device vmes { [ atype = -1 ], addr = 0, [ ipl = -1 ], [ vec = - 1 ] }
-attach vmes at vmechip
-
-device vmel { [ atype = -1 ], addr = 0, [ ipl = -1 ], [ vec = - 1 ] }
-attach vmel at vmechip
-
 # Memory disk for boot tape
 file arch/mvme68k/dev/md_root.c                memory_disk_hooks
 
-# MVME-147 VME controller chip
-attach vmechip at pcc with vmechip_pcc
-file arch/mvme68k/dev/vme_pcc.c                        vmechip_pcc
-
-# MVME-1[67] VME controller chip
-attach vmechip at mainbus with vmetwo
-file arch/mvme68k/dev/vme_two.c                        vmetwo
-
 include "dev/scsipi/files.scsipi"
 
 major { sd = 4 }
@@ -105,11 +100,12 @@
 file arch/mvme68k/dev/ncrsc_pcctwo.c           ncrsc_pcctwo
 
 file arch/mvme68k/mvme68k/autoconf.c
+file arch/mvme68k/mvme68k/bus_dma.c
+file arch/mvme68k/mvme68k/bus_space.c
 file arch/mvme68k/mvme68k/clock.c
 file arch/mvme68k/mvme68k/conf.c
 file arch/mvme68k/mvme68k/db_memrw.c           ddb | kgdb
 file arch/mvme68k/mvme68k/disksubr.c
-file arch/mvme68k/mvme68k/dkbad.c
 file arch/mvme68k/mvme68k/isr.c
 file arch/mvme68k/mvme68k/machdep.c
 file arch/mvme68k/mvme68k/mem.c
diff -r b20e76f5476b -r cebe84da9718 sys/arch/mvme68k/dev/clmpcc_pcctwo.c
--- a/sys/arch/mvme68k/dev/clmpcc_pcctwo.c      Sat Mar 18 22:23:13 2000 +0000
+++ b/sys/arch/mvme68k/dev/clmpcc_pcctwo.c      Sat Mar 18 22:33:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clmpcc_pcctwo.c,v 1.2 1999/02/14 17:54:28 scw Exp $ */
+/*     $NetBSD: clmpcc_pcctwo.c,v 1.3 2000/03/18 22:33:02 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -59,19 +59,19 @@
 
 #include <dev/ic/clmpccvar.h>
 
-#include <mvme68k/dev/pccvar.h>
+#include <mvme68k/dev/mainbus.h>
+#include <mvme68k/dev/pcctwovar.h>
 #include <mvme68k/dev/pcctworeg.h>
 
 
 /* Definition of the driver for autoconfig. */
-static int     clmpcc_pcctwo_match  __P((struct device *,
-                                       struct cfdata *, void *));
-static void    clmpcc_pcctwo_attach __P((struct device *,
-                                       struct device *, void *));
-static void    clmpcc_pcctwo_iackhook __P((struct clmpcc_softc *, int));
-static void    clmpcc_pcctwo_softhook __P((struct clmpcc_softc *));
+int clmpcc_pcctwo_match __P((struct device *, struct cfdata *, void *));
+void clmpcc_pcctwo_attach __P((struct device *, struct device *, void *));
+void clmpcc_pcctwo_iackhook __P((struct clmpcc_softc *, int));
+void clmpcc_pcctwo_softhook __P((struct clmpcc_softc *));
+void clmpcc_pcctwo_consiackhook __P((struct clmpcc_softc *, int));
 
-static u_long  clmpcc_pcctwo_sir;
+static u_long clmpcc_pcctwo_sir;
 
 struct cfattach clmpcc_pcctwo_ca = {
        sizeof(struct clmpcc_softc), clmpcc_pcctwo_match, clmpcc_pcctwo_attach
@@ -80,45 +80,51 @@
 extern struct cfdriver clmpcc_cd;
 
 /*
- * For clmpccopen()
+ * For clmpccopen() and clmpcccn*()
  */
 cdev_decl(clmpcc);
+cons_decl(clmpcc);
 
 
 /*
  * Is the CD2401 chip present?
  */
-static int
+int
 clmpcc_pcctwo_match(parent, cf, aux)
        struct device *parent;
        struct cfdata *cf;
        void *aux;
 {
-       struct pcc_attach_args *pa = aux;
+       struct pcctwo_attach_args *pa;
+
+       pa = aux;



Home | Main Index | Thread Index | Old Index