Source-Changes-HG archive

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

[src/trunk]: src/sys Clean up gt and peripherals.



details:   https://anonhg.NetBSD.org/src/rev/eb7e5309c8b8
branches:  trunk
changeset: 754343:eb7e5309c8b8
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Wed Apr 28 13:51:55 2010 +0000

description:
Clean up gt and peripherals.
  This change tested compile only.

diffstat:

 sys/arch/evbppc/conf/EV64260             |    65 +-
 sys/arch/evbppc/conf/files.ev64260       |    77 +-
 sys/arch/evbppc/conf/std.ev64260         |     4 +-
 sys/arch/evbppc/ev64260/autoconf.c       |   138 +-
 sys/arch/evbppc/ev64260/com_obio.c       |    13 +-
 sys/arch/evbppc/ev64260/ev64260.h        |    37 +
 sys/arch/evbppc/ev64260/gt_mainbus.c     |   304 +-
 sys/arch/evbppc/ev64260/machdep.c        |   494 ++--
 sys/arch/evbppc/ev64260/mainbus.c        |    89 +-
 sys/arch/powerpc/marvell/bus_dma.c       |   753 --------
 sys/arch/powerpc/marvell/extintr.c       |  1234 -------------
 sys/arch/powerpc/marvell/marvell_intr.h  |   463 +----
 sys/arch/powerpc/marvell/pci_machdep.c   |    94 +
 sys/arch/powerpc/marvell/pci_machdep.h   |   124 -
 sys/arch/powerpc/marvell/pic_discovery.c |   511 +---
 sys/arch/powerpc/marvell/watchdog.h      |    59 -
 sys/dev/marvell/README                   |    33 -
 sys/dev/marvell/files.discovery          |    92 +-
 sys/dev/marvell/gt.c                     |  1018 ++++------
 sys/dev/marvell/gtbrgreg.h               |    15 +-
 sys/dev/marvell/gtbrgvar.h               |    39 +
 sys/dev/marvell/gtdevbusvar.h            |    55 +
 sys/dev/marvell/gtethreg.h               |   105 +-
 sys/dev/marvell/gti2c.c                  |   273 --
 sys/dev/marvell/gti2creg.h               |    83 -
 sys/dev/marvell/gtidma.c                 |  1438 ---------------
 sys/dev/marvell/gtidmac.c                |  1934 +++++++++++++++++++++
 sys/dev/marvell/gtidmacreg.h             |   265 ++
 sys/dev/marvell/gtidmacvar.h             |    45 +
 sys/dev/marvell/gtidmareg.h              |   283 ---
 sys/dev/marvell/gtidmavar.h              |   213 --
 sys/dev/marvell/gtintrreg.h              |   144 +-
 sys/dev/marvell/gtintrvar.h              |   128 +
 sys/dev/marvell/gtmpsc.c                 |  2758 +++++++++++++----------------
 sys/dev/marvell/gtmpscreg.h              |    53 +-
 sys/dev/marvell/gtmpscvar.h              |   102 +-
 sys/dev/marvell/gtpci.c                  |  1319 ++++++--------
 sys/dev/marvell/gtpcireg.h               |  1110 +----------
 sys/dev/marvell/gtpcivar.h               |   116 +-
 sys/dev/marvell/gtreg.h                  |    21 +-
 sys/dev/marvell/gtsdmareg.h              |    34 +-
 sys/dev/marvell/gtsdmavar.h              |    49 +
 sys/dev/marvell/gttwsi.c                 |   393 ++++
 sys/dev/marvell/gttwsireg.h              |    80 +
 sys/dev/marvell/gtvar.h                  |   154 +-
 sys/dev/marvell/if_gfe.c                 |   624 ++++--
 sys/dev/marvell/if_gfevar.h              |    26 +-
 sys/dev/marvell/marvellreg.h             |    75 +
 sys/dev/marvell/marvellvar.h             |    61 +
 sys/dev/marvell/obio.c                   |   170 +-
 sys/dev/marvell/pchb.c                   |    79 +
 51 files changed, 7374 insertions(+), 10472 deletions(-)

diffs (truncated from 20296 to 300 lines):

diff -r 7f905d5350db -r eb7e5309c8b8 sys/arch/evbppc/conf/EV64260
--- a/sys/arch/evbppc/conf/EV64260      Wed Apr 28 13:23:02 2010 +0000
+++ b/sys/arch/evbppc/conf/EV64260      Wed Apr 28 13:51:55 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: EV64260,v 1.43 2010/04/16 13:48:31 pooka Exp $
+#      $NetBSD: EV64260,v 1.44 2010/04/28 13:51:56 kiyohara Exp $
 #
 #      MVP -- Motorola's Multiprocessing Verification Platform
 #
@@ -13,22 +13,25 @@
 #options       UVMHIST
 #options       UVMHIST_PRINT
 
+#options       MULTIPROCESSOR          # Discovery II/III support
+
 # PowerPC options
 options                ALTIVEC
 #options       CLOCKBASE=100000000     # EVB64260
 options        CLOCKBASE=133000000     # EVB64260A
 
 # Marvell options
-options        GT_MPP_INTERRUPTS=0x2c600000
-options        GT_MPP_WATCHDOG=0x03000000
 options        MPSC_CONSOLE=0
 options        GT_MPSC_DEFAULT_BAUD_RATE=9600
-#options       GT_BASE=0x14000000      # PMON low
-options        GT_BASE=0xF8000000      # PPCBoot
 options        GT_MPSC_FREQUENCY="(cpu_timebase*4)"
 options        GT_MPSC_CLOCK_SOURCE="BRG_BCR_CLKS_TCLK"
-options        PCI0_GPPINTS=0xffffff1b,PCI1_GPPINTS=0xffffff1d
-options        PCI0_SKIPMASK="(~0x180)",PCI1_SKIPMASK="(~0x180)"
+options        GT_MPP_WATCHDOG=0x03000000
+options        GT_DEVBUS
+#options       GT_ECC
+options        GT_COMM
+options        GT_WATCHDOG
+
+# EV64260 options
 options        OBIO0_STRIDE=0,OBIO1_STRIDE=2,OBIO2_STRIDE=2,OBIO3_STRIDE=2
 
 # Options for necessary to use MD
@@ -153,40 +156,42 @@
 
 cpu*           at mainbus0
 
-gt0            at mainbus0             # Discovery system controller
+# Discovery system controller
+#gt0   at mainbus0 addr 0x14000000     # PMON low
+gt0    at mainbus0 addr 0xf8000000     # PPCBoot
 
 # PCI busses
-gtpci0         at gt0 unit 0           # 64-bit, 66MHz
-gtpci1         at gt0 unit 1           # 64-bit, 66MHz
-
-pci*           at gtpci?
+gtpci* at gt? unit ?                   # 64-bit, 66MHz
+pci*   at gtpci?
 
 # 16550s off CS2
-obio0          at gt0 unit 0           # Chip Select 0
-obio1          at gt0 unit 1           # Chip Select 1
-obio2          at gt0 unit 2           # Chip Select 2
-com0           at obio2 offset 0x0020 size 8 irq 85
-com1           at obio2 offset 0x0000 size 8 irq 86
-obio3          at gt0 unit 3           # Chip Select 3
-obio4          at gt0 unit 4           # Boot Chip Select
+obio0  at gt0 unit 0                   # Chip Select 0
+obio1  at gt0 unit 1                   # Chip Select 1
+obio2  at gt0 unit 2                   # Chip Select 2
+com0   at obio2 offset 0x0020 size 8 irq 85
+com1   at obio2 offset 0x0000 size 8 irq 86
+obio3  at gt0 unit 3                   # Chip Select 3
+obio4  at gt0 unit 4                   # Boot Chip Select
 
 # UARTs
-gtmpsc0        at gt0 unit 0           # Serial #0
-gtmpsc1        at gt0 unit 1           # Serial #1
+gtmpsc*        at gt? offset ?                 # Multi-Protocol Serial Controller
+                                       #   with Serial Direct Memory Access
 
 # Ethernet and PHY
-gfe0           at gt0 unit 0 flags 1   # Ethernet #0 (RMMI)
-gfe1           at gt0 unit 1 flags 1   # Ethernet #1 (RMMI)
-gfe2           at gt0 unit 2 flags 1   # Ethernet #2 (RMMI)
+gfec*  at gt? offset ?                 # Ethernet (RMMI)
+gfe*   at gfec? port ? irq ?           # Ethernet port #0/#1/#2
 
 # I2C
-gtiic0         at gt0 unit 0           # I2C controller
-iic*           at gtiic?
+gttwsi*        at gt? offset ? irq ?           # Two-Wire Serial Interface
+iic*   at gttwsi?
+
+# DMA
+gtidmac* at gt? offset ? irq ?         # IDMA Controller
 
 # PCI devices
-ppb*           at pci? dev ? function ?        # PCI-PCI bridges
-pci*           at ppb? bus ?
-#pcib*         at pci? dev ? function ?        # VIA 82C686B
+pchb*  at pci? dev ? function ?        # PCI Host Bridge
+ppb*   at pci? dev ? function ?        # PCI-PCI Bridges
+pci*   at ppb? bus ?
 
 #ehci* at pci? dev ? function ?        # Enhanced Host Controller
 #ohci* at pci? dev ? function ?        # Open Host Controller
@@ -273,3 +278,5 @@
 #pseudo-device wsmux                   # ick
 pseudo-device  clockctl                # user control of clock subsystem
 pseudo-device  ksyms                   # /dev/ksyms
+pseudo-device  swdmover                # softare dmover(9) back-end
+pseudo-device  dmoverio                # /dev/dmover dmover(9) interface
diff -r 7f905d5350db -r eb7e5309c8b8 sys/arch/evbppc/conf/files.ev64260
--- a/sys/arch/evbppc/conf/files.ev64260        Wed Apr 28 13:23:02 2010 +0000
+++ b/sys/arch/evbppc/conf/files.ev64260        Wed Apr 28 13:51:55 2010 +0000
@@ -1,33 +1,32 @@
-#      $NetBSD: files.ev64260,v 1.12 2008/02/20 21:43:34 drochner Exp $
+#      $NetBSD: files.ev64260,v 1.13 2010/04/28 13:51:56 kiyohara Exp $
 #
 # Marvell (Galileo) "EV64260" evaluation board's specific configuration info
 #
 defparam opt_ev64260.h OBIO0_STRIDE OBIO1_STRIDE OBIO2_STRIDE OBIO3_STRIDE
-defparam opt_ev64260.h  PCI0_GPPINTS PCI1_GPPINTS PCI0_SKIPMASK PCI1_SKIPMASK
-
-#include "arch/powerpc/pic/files.pic"
 
 file   arch/evbppc/ev64260/autoconf.c
 file   arch/evbppc/ev64260/machdep.c
-#file  arch/evbppc/ev64260/pci_machdep.c
 
 file   arch/powerpc/powerpc/clock.c
-file   arch/powerpc/marvell/extintr.c
 
-#options       PIC_DISCOVERY
+include "arch/powerpc/pic/files.pic"
+file   arch/powerpc/marvell/pic_discovery.c
 
-include "dev/marvell/files.discovery"
 
 #
-# Machine-independent SCSI drivers
+# MI devices
 #
+include "dev/ata/files.ata"
+include "dev/i2o/files.i2o"
+include "dev/pci/files.pci"
 include "dev/scsipi/files.scsipi"
+include        "dev/usb/files.usb"
 
 #
-# Machine-independent ATA drivers
+# Marvell GT (Discovery) devices
 #
+include "dev/marvell/files.discovery"
 
-include "dev/ata/files.ata"
 
 #
 # Memory Disk for install floppy
@@ -41,57 +40,23 @@
 #
 # System bus types
 #
-device mainbus {}
+device mainbus { [addr = -1] }
 attach mainbus at root
-file   arch/evbppc/ev64260/mainbus.c           mainbus|cpu needs-flag
+file   arch/evbppc/ev64260/mainbus.c           mainbus | cpu needs-flag
+
+device cpu
+attach cpu at mainbus
 
 attach gt at mainbus
 file   arch/evbppc/ev64260/gt_mainbus.c        gt
 
-device cpu
-attach cpu at mainbus
+file   arch/powerpc/marvell/pci_machdep.c      pci
+file   arch/powerpc/pci/pci_machdep_common.c   pci
+
+device pchb: pcibus
+attach pchb at pci
+file   dev/marvell/pchb.c                      pchb
 
 # com port
 attach com at obio with com_obio
 file   arch/evbppc/ev64260/com_obio.c          com_obio
-
-# wdc port
-attach wdc at obio with wdc_obio
-file   arch/evbppc/ev64260/wdc_obio.c          wdc_obio
-
-#
-# PCI-only drivers
-#
-include "dev/i2o/files.i2o"
-include "dev/pci/files.pci"
-
-# PCI-ISA bridges
-device pcib: isabus
-attach pcib at pci
-file   arch/evbppc/pci/pcib.c                  pcib
-
-#
-# ISA drivers
-#
-
-include "dev/isa/files.isa"
-
-file   arch/evbppc/isa/isa_machdep.c           isa
-file   arch/evbppc/isa/isadma_machdep.c        isa
-
-# PC clock
-file   arch/evbppc/isa/isaclock.c              isa
-
-include "dev/pckbport/files.pckbport"
-
-include        "dev/usb/files.usb"
-
-# Floppy disk controller
-device fdc {drive = -1}: isadma
-file   dev/isa/fd.c                            fdc needs-flag
-
-attach fdc at isa with fdc_isa
-file   dev/isa/fdc_isa.c                       fdc_isa
-
-device fd: disk
-attach fd at fdc
diff -r 7f905d5350db -r eb7e5309c8b8 sys/arch/evbppc/conf/std.ev64260
--- a/sys/arch/evbppc/conf/std.ev64260  Wed Apr 28 13:23:02 2010 +0000
+++ b/sys/arch/evbppc/conf/std.ev64260  Wed Apr 28 13:51:55 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: std.ev64260,v 1.7 2008/01/08 13:47:49 joerg Exp $
+#      $NetBSD: std.ev64260,v 1.8 2010/04/28 13:51:56 kiyohara Exp $
 #
 # standard, required NetBSD/evbppc 'options'
 
@@ -18,6 +18,6 @@
 options        INTSTK=16384
 
 options                PPC_INTR_IMPL="<powerpc/marvell/marvell_intr.h>"
-options                PPC_PCI_MACHDEP_IMPL="<powerpc/marvell/pci_machdep.h>"
+options                PPC_PCI_MACHDEP_IMPL="<powerpc/pci_machdep.h>"
 
 include "arch/evbppc/conf/files.ev64260"
diff -r 7f905d5350db -r eb7e5309c8b8 sys/arch/evbppc/ev64260/autoconf.c
--- a/sys/arch/evbppc/ev64260/autoconf.c        Wed Apr 28 13:23:02 2010 +0000
+++ b/sys/arch/evbppc/ev64260/autoconf.c        Wed Apr 28 13:51:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.12 2009/03/18 10:22:28 cegger Exp $     */
+/*     $NetBSD: autoconf.c,v 1.13 2010/04/28 13:51:55 kiyohara Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -37,24 +37,34 @@
 /*
  * Setup the system to run on the current machine.
  *
- * Configure() is called at boot time and initializes the vba 
+ * Configure() is called at boot time and initializes the vba
  * device tables and the memory controller monitoring.  Available
  * devices are determined (from possibilities mentioned in ioconf.c),
  * and the drivers are initialized.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2009/03/18 10:22:28 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2010/04/28 13:51:55 kiyohara Exp $");
 
 #include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/disklabel.h>
 #include <sys/conf.h>
 #include <sys/reboot.h>
-#include <sys/device.h>
+#include <sys/systm.h>
+#include <sys/types.h>
+
+#include <net/if.h>
+#include <net/if_ether.h>
+
+#include <dev/pci/pcivar.h>
 
-void findroot(void);
+#include <machine/pci_machdep.h>
+
+#include <dev/marvell/gtreg.h>
+#include <dev/marvell/marvellvar.h>
+
+
+static void findroot(void);
+
 
 /*
  * Determine i/o configuration for a machine.
@@ -62,25 +72,14 @@
 void
 cpu_configure(void)
 {



Home | Main Index | Thread Index | Old Index