Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arc NEC RISCstation 2250 (RD-94) PCI bus support,



details:   https://anonhg.NetBSD.org/src/rev/8a6183e301ae
branches:  trunk
changeset: 487553:8a6183e301ae
user:      soda <soda%NetBSD.org@localhost>
date:      Fri Jun 09 05:33:02 2000 +0000

description:
NEC RISCstation 2250 (RD-94) PCI bus support,
contributed by Shuichiro URATA <ur%a-r.org@localhost>

diffstat:

 sys/arch/arc/conf/GENERIC          |   62 ++++-
 sys/arch/arc/conf/M403             |    3 +-
 sys/arch/arc/conf/files.arc        |   29 ++-
 sys/arch/arc/include/pci_machdep.h |   85 ++++++
 sys/arch/arc/include/vmparam.h     |   14 +-
 sys/arch/arc/pci/necpb.c           |  469 +++++++++++++++++++++++++++++++++++++
 sys/arch/arc/pci/necpbvar.h        |   42 +++
 sys/arch/arc/pica/rd94.h           |    4 +-
 8 files changed, 684 insertions(+), 24 deletions(-)

diffs (truncated from 861 to 300 lines):

diff -r 215865a11197 -r 8a6183e301ae sys/arch/arc/conf/GENERIC
--- a/sys/arch/arc/conf/GENERIC Fri Jun 09 05:31:15 2000 +0000
+++ b/sys/arch/arc/conf/GENERIC Fri Jun 09 05:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC,v 1.30 2000/05/27 02:19:35 soren Exp $
+#      $NetBSD: GENERIC,v 1.31 2000/06/09 05:33:02 soda Exp $
 #      $OpenBSD: GENERIC,v 1.29 1999/08/29 12:14:03 niklas Exp $
 #
 #      GENERIC -- everything that's currently supported
@@ -6,7 +6,7 @@
 
 include                "arch/arc/conf/std.arc"
 
-#ident         "GENERIC-$Revision: 1.30 $"
+#ident         "GENERIC-$Revision: 1.31 $"
 
 maxusers       32              # estimated number of users
 
@@ -114,7 +114,7 @@
 # These options enable verbose messages for several subsystems.
 # Warning, these may compile large string tables into the kernel!
 #options       EISAVERBOSE     # verbose EISA device autoconfig messages
-#options       PCIVERBOSE      # verbose PCI device autoconfig messages
+options        PCIVERBOSE      # verbose PCI device autoconfig messages
 #options       PCI_CONFIG_DUMP # verbosely dump PCI config space
 options        SCSIVERBOSE     # human readable SCSI error messages
 
@@ -194,13 +194,6 @@
 # XXX - should be configured
 #atapibus*     at wdc? channel ?
 
-# ATAPI devices
-# flags have the same meaning as for IDE drives.
-# XXX - should be configured
-#cd*           at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
-#sd*           at atapibus? drive ? flags 0x0000       # ATAPI disk drives
-#uk*           at atapibus? drive ? flags 0x0000       # ATAPI unknown
-
 # ISA parallel printer interfaces
 lpt0           at isa? port 0x378 irq 7
 
@@ -230,6 +223,9 @@
 
 #### PCI bus devices
 
+necpb*         at mainbus0     # NEC RISCstation PCI host bridge.
+pci*           at necpb?
+
 #pbcpcibr*     at mainbus0     # Algorithmics PCI bus bridge.
 #pci*          at pbcpcibr?
 
@@ -238,6 +234,45 @@
 #scsibus*      at siop?
 #de*           at pci? dev ? function ?
 
+ex*            at pci? dev ? function ?        # 3Com 90x[B]
+fxp*           at pci? dev ? function ?        # Intel EtherExpress PRO
+le*            at pci? dev ? function ?        # PCnet-PCI
+ne*            at pci? dev ? function ?        # NE2000-compatible
+tlp*           at pci? dev ? function ?        # DECchip 21x4x (and clones)
+#options       TLP_MATCH_21040
+#options       TLP_MATCH_21041
+#options       TLP_MATCH_21140
+#options       TLP_MATCH_21142
+
+# IDE and related devices
+# PCI IDE controllers - see pciide(4) for supported hardware.
+# The 0x0001 flag force the driver to use DMA, even if the driver doesn't know
+# how to set up DMA modes for this chip. This may work, or may cause
+# a machine hang with some controllers.
+pciide*                at pci ? dev ? function ? flags 0x0000
+wd*            at pciide? channel ? drive ? flags 0x0000
+atapibus*      at pciide? channel ?
+
+tga*           at pci? dev ? function ?        # DEC ZLXp-E[123] Graphics
+wsdisplay*     at tga?
+ahc*           at pci? dev ? function ?        # Adaptec [23]94x, aic78x0 SCSI
+scsibus*       at ahc?
+
+#### MII/PHY support
+
+exphy*         at mii? phy ?           # 3Com internal PHYs
+icsphy*                at mii? phy ?           # Integrated Circuit Systems ICS1890
+inphy*         at mii? phy ?           # Intel 82555 PHYs
+iophy*         at mii? phy ?           # Intel 82553 PHYs
+lxtphy*                at mii? phy ?           # Level One LXT-970 PHYs
+nsphy*         at mii? phy ?           # NS83840 PHYs
+nsphyter*      at mii? phy ?           # NS83843 PHYs
+qsphy*         at mii? phy ?           # Quality Semiconductor QS6612 PHYs
+sqphy*         at mii? phy ?           # Seeq 80220/80221/80223 PHYs
+tlphy*         at mii? phy ?           # ThunderLAN PHYs
+tqphy*         at mii? phy ?           # TDK Semiconductor PHYs
+ukphy*         at mii? phy ?           # generic unknown PHYs
+
 #### SCSI bus devices
 
 sd*            at scsibus? target ? lun ?
@@ -247,6 +282,13 @@
 ss*            at scsibus? target ? lun ?
 uk*            at scsibus? target ? lun ?
 
+#### ATAPI bus devices
+
+# flags have the same meaning as for IDE drives.
+cd*            at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
+sd*            at atapibus? drive ? flags 0x0000       # ATAPI disk drives
+uk*            at atapibus? drive ? flags 0x0000       # ATAPI unknown
+
 #### Pseudo devices
 
 # disk/mass storage pseudo-devices
diff -r 215865a11197 -r 8a6183e301ae sys/arch/arc/conf/M403
--- a/sys/arch/arc/conf/M403    Fri Jun 09 05:31:15 2000 +0000
+++ b/sys/arch/arc/conf/M403    Fri Jun 09 05:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: M403,v 1.5 2000/03/22 00:58:18 cgd Exp $
+#      $NetBSD: M403,v 1.6 2000/06/09 05:33:02 soda Exp $
 #
 #      configuration file for MIPS Magnum 4000 system
 #
@@ -135,6 +135,7 @@
 aclock0        at pica?
 #pc0           at pica?
 #opms0         at pica?
+options                COM_FREQ_MAGNUM=8192000 # 8.192 MHz - NEC M403
 com0           at pica?
 com1           at pica?
 lpt0           at pica?
diff -r 215865a11197 -r 8a6183e301ae sys/arch/arc/conf/files.arc
--- a/sys/arch/arc/conf/files.arc       Fri Jun 09 05:31:15 2000 +0000
+++ b/sys/arch/arc/conf/files.arc       Fri Jun 09 05:33:02 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.arc,v 1.20 2000/05/29 10:17:44 soda Exp $
+#      $NetBSD: files.arc,v 1.21 2000/06/09 05:33:03 soda Exp $
 #      $OpenBSD: files.arc,v 1.21 1999/09/11 10:20:20 niklas Exp $
 #
 # maxpartitions must be first item in files.${ARCH}
@@ -16,6 +16,11 @@
 file   arch/arc/arc/machdep.c
 #file  arch/arc/arc/minidebug.c
 file   arch/arc/arc/arc_trap.c
+file   arch/arc/arc/bus_space.c
+file   arch/arc/arc/bus_space_sparse.c
+file   arch/arc/arc/bus_space_large.c
+file   arch/arc/arc/bus_dma.c
+file   arch/arc/arc/wired_map.c
 
 file   arch/arc/arc/arcbios.c
 
@@ -25,11 +30,17 @@
 include "dev/ata/files.ata"
 major  { wd = 4 }
 
+# Raster operations
+include "dev/rasops/files.rasops"
+include "dev/wsfont/files.wsfont"
+
 #
 # "Workstation Console" glue.
 #
 include "dev/wscons/files.wscons"
 
+include "dev/pckbc/files.pckbc"
+
 #
 #      System BUS types
 #
@@ -48,6 +59,8 @@
 device pica {}
 attach pica at mainbus                 # optional
 file   arch/arc/pica/picabus.c         pica
+file   arch/arc/jazz/jazzdmatlb.c      # XXX pica
+file   arch/arc/jazz/bus_dma_jazz.c    # XXX pica
 
 #
 #      ALGOR bus autoconfiguration devices
@@ -70,11 +83,23 @@
 attach pbcpcibr at mainbus             # optional
 file   arch/arc/pci/pbcpcibus.c        pbcpcibr
 
+#
+#      NEC RISCstation PCI host bridge
+#
+device necpb: pcibus
+attach necpb at mainbus                # optional
+file   arch/arc/pci/necpb.c            necpb
+
 #      Ethernet chip on PICA bus
 device sn: ifnet, ether, arp
 attach sn at pica
 file   arch/arc/dev/if_sn.c            sn
 
+#
+# Machine-independent MII/PHY drivers.
+#
+include "dev/mii/files.mii"
+
 #      Use machine independent SCSI driver routines
 include        "dev/scsipi/files.scsipi"
 major  {sd = 0}
@@ -101,6 +126,8 @@
 include        "dev/pci/files.pci"
 include        "dev/isa/files.isa"
 
+file arch/arc/pci/pciide_machdep.c             pciide
+
 #      Real time clock, must have one..
 device aclock
 attach aclock at pica with aclock_pica
diff -r 215865a11197 -r 8a6183e301ae sys/arch/arc/include/pci_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arc/include/pci_machdep.h        Fri Jun 09 05:33:02 2000 +0000
@@ -0,0 +1,85 @@
+/* $NetBSD: pci_machdep.h,v 1.1 2000/06/09 05:33:04 soda Exp $ */
+/* NetBSD: pci_machdep.h,v 1.3 1999/03/19 03:40:46 cgd Exp  */
+
+/*
+ * Copyright (c) 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution%CS.CMU.EDU@localhost
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/*
+ * Machine-specific definitions for PCI autoconfiguration.
+ */
+
+/*
+ * Types provided to machine-independent PCI code
+ */
+typedef struct arc_pci_chipset *pci_chipset_tag_t;
+typedef u_long pcitag_t;
+typedef u_long pci_intr_handle_t;
+
+/*
+ * arc-specific PCI structure and type definitions.
+ * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
+ */
+struct arc_pci_chipset {
+       void            (*pc_attach_hook) __P((struct device *,
+                           struct device *, struct pcibus_attach_args *));
+       int             (*pc_bus_maxdevs) __P((pci_chipset_tag_t, int));
+       pcitag_t        (*pc_make_tag) __P((pci_chipset_tag_t, int, int, int));
+       pcireg_t        (*pc_conf_read) __P((pci_chipset_tag_t, pcitag_t,
+                           int));
+       void            (*pc_conf_write) __P((pci_chipset_tag_t, pcitag_t, int,
+                           pcireg_t));
+       int             (*pc_intr_map) __P((pci_chipset_tag_t, pcitag_t, int,
+                           int, pci_intr_handle_t *));
+       const char      *(*pc_intr_string) __P((pci_chipset_tag_t,
+                           pci_intr_handle_t));
+       void            *(*pc_intr_establish) __P((pci_chipset_tag_t,
+                           pci_intr_handle_t, int, int (*)(void *), void *));
+       void            (*pc_intr_disestablish) __P((pci_chipset_tag_t,
+                           void *));
+};
+
+/*
+ * Functions provided to machine-independent PCI code.
+ */
+#define        pci_attach_hook(p, s, pba)                                      \
+    (*(pba)->pba_pc->pc_attach_hook)((p), (s), (pba))
+#define        pci_bus_maxdevs(c, b)                                           \
+    (*(c)->pc_bus_maxdevs)((c), (b))
+#define        pci_make_tag(c, b, d, f)                                        \
+    (*(c)->pc_make_tag)((c), (b), (d), (f))
+#define        pci_conf_read(c, t, r)                                          \
+    (*(c)->pc_conf_read)((c), (t), (r))
+#define        pci_conf_write(c, t, r, v)                                      \
+    (*(c)->pc_conf_write)((c), (t), (r), (v))
+#define        pci_intr_map(c, it, ip, il, ihp)                                \
+    (*(c)->pc_intr_map)((c), (it), (ip), (il), (ihp))
+#define        pci_intr_string(c, ih)                                          \
+    (*(c)->pc_intr_string)((c), (ih))
+#define        pci_intr_establish(c, ih, l, h, a)                              \
+    (*(c)->pc_intr_establish)((c), (ih), (l), (h), (a))
+#define        pci_intr_disestablish(c, iv)                                    \
+    (*(c)->pc_intr_disestablish)((c), (iv))
diff -r 215865a11197 -r 8a6183e301ae sys/arch/arc/include/vmparam.h
--- a/sys/arch/arc/include/vmparam.h    Fri Jun 09 05:31:15 2000 +0000



Home | Main Index | Thread Index | Old Index