Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm Add support for the Team ASA Npwr IOP310-bas...



details:   https://anonhg.NetBSD.org/src/rev/b21006751579
branches:  trunk
changeset: 521882:b21006751579
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Feb 07 21:34:23 2002 +0000

description:
Add support for the Team ASA Npwr IOP310-based server appliance.

diffstat:

 sys/arch/evbarm/conf/TEAMASA_NPWR        |  195 +++++++++++++++++++++++++++++++
 sys/arch/evbarm/conf/files.iq80310       |   12 +-
 sys/arch/evbarm/iq80310/i80312_mainbus.c |    9 +-
 sys/arch/evbarm/iq80310/iq80310_pci.c    |   49 +++++++-
 sys/arch/evbarm/iq80310/iq80310var.h     |   14 +-
 sys/arch/evbarm/iq80310/obio.c           |   18 ++-
 6 files changed, 287 insertions(+), 10 deletions(-)

diffs (truncated from 391 to 300 lines):

diff -r 27219173d823 -r b21006751579 sys/arch/evbarm/conf/TEAMASA_NPWR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/TEAMASA_NPWR Thu Feb 07 21:34:23 2002 +0000
@@ -0,0 +1,195 @@
+#      $NetBSD: TEAMASA_NPWR,v 1.1 2002/02/07 21:34:23 thorpej Exp $
+#
+#      TEAMASA_NPWR -- Team ASA, Inc. Npwr -- XScale/IOP310-based
+#      server appliance.
+#
+
+include        "arch/evbarm/conf/std.iq80310"
+options        TEAMASA_NPWR    # Enable Npwr support
+
+# estimated number of users
+
+maxusers       32
+
+# Standard system options
+
+options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+options        NTP             # NTP phase/frequency locked loop
+
+# CPU options
+
+# For StrongARM systems
+options        CPU_XSCALE      # Support the XScale core
+makeoptions    COPTS="-O2 -march=armv4 -mtune=strongarm"
+#makeoptions   COPTS="-O2 -march=armv5 -mtune=xscale"
+
+# Architecture options
+
+# File systems
+
+file-system    FFS             # UFS
+#file-system   LFS             # log-structured file system
+file-system    MFS             # memory file system
+file-system    NFS             # Network file system
+#file-system   ADOSFS          # AmigaDOS-compatible file system
+#file-system   EXT2FS          # second extended file system (linux)
+#file-system   CD9660          # ISO 9660 + Rock Ridge file system
+#file-system   MSDOSFS         # MS-DOS file system
+file-system    FDESC           # /dev/fd
+file-system    KERNFS          # /kern
+file-system    NULLFS          # loopback file system
+#file-system   PORTAL          # portal filesystem (still experimental)
+file-system    PROCFS          # /proc
+#file-system   UMAPFS          # NULLFS + uid and gid remapping
+#file-system   UNION           # union file system
+
+# File system options
+#options       QUOTA           # UFS quotas
+#options       FFS_EI          # FFS Endian Independant support
+options        NFSSERVER
+options        SOFTDEP
+
+# Networking options
+
+#options       GATEWAY         # packet forwarding
+options        INET            # IP + ICMP + TCP + UDP
+options        INET6           # IPV6
+#options       IPSEC           # IP security
+#options       IPSEC_ESP       # IP security (encryption part; define w/ IPSEC)
+#options       IPSEC_DEBUG     # debug for IP security
+#options       MROUTING        # IP multicast routing
+#options       NS              # XNS
+#options       NSIP            # XNS tunneling over IP
+#options       ISO,TPIP        # OSI
+#options       EON             # OSI tunneling over IP
+#options       CCITT,LLC,HDLC  # X.25
+#options       NETATALK        # AppleTalk networking
+#options       PFIL_HOOKS      # pfil(9) packet filter hooks
+#options       PPP_BSDCOMP     # BSD-Compress compression support for PPP
+#options       PPP_DEFLATE     # Deflate compression support for PPP
+#options       PPP_FILTER      # Active filter support for PPP (requires bpf)
+#options       TCP_DEBUG       # Record last TCP_NDEBUG packets with SO_DEBUG
+
+options        NFS_BOOT_BOOTP
+options        NFS_BOOT_DHCP
+#options       NFS_BOOT_BOOTPARAM
+
+# Compatibility options
+
+#options       COMPAT_43       # 4.3BSD compatibility.
+options        COMPAT_15       # NetBSD 1.5 compatibility.
+options        COMPAT_14       # NetBSD 1.4 compatibility.
+#options       COMPAT_13       # NetBSD 1.3 compatibility.
+#options       COMPAT_12       # NetBSD 1.2 compatibility.
+#options       COMPAT_11       # NetBSD 1.1 compatibility.
+#options       COMPAT_10       # NetBSD 1.0 compatibility.
+#options       COMPAT_09       # NetBSD 0.9 compatibility.
+#options       TCP_COMPAT_42   # 4.2BSD TCP/IP bug compat. Not recommended.
+
+# Shared memory options
+
+options        SYSVMSG         # System V-like message queues
+options        SYSVSEM         # System V-like semaphores
+#options       SEMMNI=10       # number of semaphore identifiers
+#options       SEMMNS=60       # number of semaphores in system
+#options       SEMUME=10       # max number of undo entries per process
+#options       SEMMNU=30       # number of undo structures in system
+options        SYSVSHM         # System V-like memory sharing
+options        SHMMAXPGS=1024  # 1024 pages is the default
+
+# Device options
+
+#options       MEMORY_DISK_HOOKS       # boottime setup of ramdisk
+#options       MEMORY_DISK_SIZE=0      # Size in blocks
+#options       MINIROOTSIZE=3400       # Size in blocks
+#options       MEMORY_DISK_IS_ROOT     # use memory disk as root
+
+# Console options.  The default console is oriented towards the IQ80310
+# eval board, on connector J9 ("com0") at # 115200 baud.
+#
+# The Npwr's RedBoot firmware uses 19200, and there is only one
+# serial port.
+options        CONSPEED=19200          # Console speed
+#options       CONUNIT=1               # Console unit (0=J9, 1=J10)
+
+# Miscellaneous kernel options
+options        KTRACE          # system call tracing, a la ktrace(1)
+#options       LKM             # loadable kernel modules
+#options       KMEMSTATS       # kernel memory statistics
+options        SCSIVERBOSE     # Verbose SCSI errors
+options        PCIVERBOSE      # Verbose PCI descriptions
+options        MIIVERBOSE      # Verbose MII autoconfuration messages
+#options       PCI_CONFIG_DUMP # verbosely dump PCI config space
+#options       DDB_KEYCODE=0x40
+#options       PIPE_SOCKETPAIR # smaller, but slower pipe(2)
+
+# Development and Debugging options
+
+options        DIAGNOSTIC      # internally consistency checks
+#options       DEBUG
+#options       PMAP_DEBUG      # Enable pmap_debug_level code
+#options       IPKDB           # remote kernel debugging
+#options       VERBOSE_INIT_ARM # verbose bootstraping messages
+options        DDB             # in-kernel debugger
+options        DDB_HISTORY_SIZE=100    # Enable history editing in DDB
+makeoptions    DEBUG="-g"      # compile full symbol table
+options        SYMTAB_SPACE=200000
+
+config         netbsd          root on ? type ?
+config         netbsd-wm0      root on wm0 type nfs
+
+# The main bus device
+mainbus0       at root
+
+# The boot cpu
+cpu0           at mainbus?
+
+# On-board device support
+obio*          at mainbus?
+com*           at obio? addr ?         # on-board XR 16550 UARTs
+
+# i80312 Companion I/O support
+iopxs*         at mainbus?
+pci*           at iopxs? bus ?
+
+#
+# Networking devices
+#
+
+# PCI network devices
+wm0            at pci? dev 1 function ?        # on-board i82544GC #1
+wm1            at pci? dev 2 function ?        # on-board i82544GC #2
+
+# MII/PHY support
+makphy*                at mii? phy ?                   # Marvell "Alaska" Gig-E PHY
+ukphy*         at mii? phy ?                   # Generic IEEE 802.3u PHYs
+
+#
+# Mass storage devices
+#
+
+# PCI SCSI controllers
+siop0          at pci? dev 0 function ?        # on-board LSI 53c1010
+scsibus*       at scsi?
+
+# SCSI device support
+sd*            at scsibus? target ? lun ?      # SCSI disks
+cd*            at scsibus? target ? lun ?      # SCSI CD-ROMs
+st*            at scsibus? target ? lun ?      # SCSI tapes
+uk*            at scsibus? target ? lun ?      # unknown SCSI devices
+
+# Pseudo-Devices
+
+# disk/mass storage pseudo-devices
+#pseudo-device md              1       # memory disk device (ramdisk)
+pseudo-device  vnd             4       # disk-like interface to files
+pseudo-device  raid            4       # RAIDframe devices
+pseudo-device  ccd             4       # Concatenated disk devices
+
+# network pseudo-devices
+pseudo-device  bpfilter        4       # Berkeley packet filter
+pseudo-device  loop                    # network loopback
+
+# miscellaneous pseudo-devices
+pseudo-device  pty                     # pseudo-terminals
+pseudo-device  rnd                     # /dev/random and in-kernel generator
diff -r 27219173d823 -r b21006751579 sys/arch/evbarm/conf/files.iq80310
--- a/sys/arch/evbarm/conf/files.iq80310        Thu Feb 07 17:15:23 2002 +0000
+++ b/sys/arch/evbarm/conf/files.iq80310        Thu Feb 07 21:34:23 2002 +0000
@@ -1,8 +1,18 @@
-#      $NetBSD: files.iq80310,v 1.6 2002/01/30 03:59:40 thorpej Exp $
+#      $NetBSD: files.iq80310,v 1.7 2002/02/07 21:34:23 thorpej Exp $
 #
 # Intel IQ80310 evaluation board configuration info
 #
 
+# Define the (IQ80310-based) board types that we support:
+#
+#      IOP310_TEAMASA_NPWR
+#              Team ASA, Inc. Npwr http://www.teamasa.com/
+#
+# If no board type options are specified, the default is the
+# Intel/Cyclone IQ80310 (which is the IOP310 reference design
+# eval board).
+defflag opt_iop310.h   IOP310_TEAMASA_NPWR
+
 # Use the generic ARM soft interrupt code.
 file   arch/arm/arm/softintr.c
 
diff -r 27219173d823 -r b21006751579 sys/arch/evbarm/iq80310/i80312_mainbus.c
--- a/sys/arch/evbarm/iq80310/i80312_mainbus.c  Thu Feb 07 17:15:23 2002 +0000
+++ b/sys/arch/evbarm/iq80310/i80312_mainbus.c  Thu Feb 07 21:34:23 2002 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: i80312_mainbus.c,v 1.3 2001/11/09 23:15:53 thorpej Exp $       */
+/*     $NetBSD: i80312_mainbus.c,v 1.4 2002/02/07 21:34:24 thorpej Exp $       */
 
 /*
- * Copyright (c) 2001 Wasabi Systems, Inc.
+ * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
  * All rights reserved.
  *
  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
@@ -123,7 +123,12 @@
        sc->sc_piow_vaddr = IQ80310_PIOW_VBASE;
        sc->sc_siow_vaddr = IQ80310_SIOW_VBASE;
 
+       /* Some boards are always considered "host". */
+#if defined(IOP310_TEAMASA_NPWR)
+       sc->sc_is_host = 1;
+#else
        sc->sc_is_host = CPLD_READ(IQ80310_BACKPLANE_DET) & 1;
+#endif
 
        printf(": i80312 Companion I/O, acting as PCI %s\n",
            sc->sc_is_host ? "host" : "slave");
diff -r 27219173d823 -r b21006751579 sys/arch/evbarm/iq80310/iq80310_pci.c
--- a/sys/arch/evbarm/iq80310/iq80310_pci.c     Thu Feb 07 17:15:23 2002 +0000
+++ b/sys/arch/evbarm/iq80310/iq80310_pci.c     Thu Feb 07 21:34:23 2002 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: iq80310_pci.c,v 1.4 2002/01/30 03:59:43 thorpej Exp $  */
+/*     $NetBSD: iq80310_pci.c,v 1.5 2002/02/07 21:34:24 thorpej Exp $  */
 
 /*
- * Copyright (c) 2001 Wasabi Systems, Inc.
+ * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
  * All rights reserved.
  *
  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
@@ -74,6 +74,50 @@
        pc->pc_intr_disestablish = iq80310_pci_intr_disestablish;
 }
 
+#if defined(IOP310_TEAMASA_NPWR)
+int
+iq80310_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
+{
+       struct i80312_softc *sc = pa->pa_pc->pc_intr_v;
+       int sbus;
+
+       /*
+        * The Npwr routes #INTA of the on-board PCI devices directly
+        * through the CPLD.  There is no PCI-PCI bridge and no PCI
+        * slots on the Npwr.
+        *
+        * We also expect the devices to be on the Secondary side of
+        * the i80312.
+        */
+
+       reg = bus_space_read_4(sc->sc_st, sc->sc_ppb_sh, PPB_REG_BUSINFO);
+       sbus = PPB_BUSINFO_SECONDARY(reg);
+
+       if (pa->pa_bus != pbus) {
+               printf("iq80310_pci_intr_map: %d/%d/%d not on Secondary bus\n",
+                   pa->pa_bus, pa->pa_device, pa->pa_function);
+               return (1);
+       }
+
+       switch (pa->pa_device) {
+       case 0:         /* LSI 53c1010 SCSI */
+               *ihp = XINT3_IRQ(2);
+               break;
+       case 1:         /* Intel i82544GC Gig-E #1 */
+               *ihp = XINT3_IRQ(1);
+               break;
+       case 2:         /* Intel i82544GC Gig-E #2 */
+               *ihp = XINT3_IRQ(4);
+               break;



Home | Main Index | Thread Index | Old Index