Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/algor Major update of algor.



details:   https://anonhg.NetBSD.org/src/rev/f0343fc52d09
branches:  trunk
changeset: 767083:f0343fc52d09
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jul 08 18:48:55 2011 +0000

description:
Major update of algor.
Now uses generic mips bus_space.h bus_dma.h isa_machdep.h pci_machdep.h
Now uses evbmips versions of cpu.c isadma_bounce.c mcclock_isa.c

diffstat:

 sys/arch/algor/algor/algor_p4032_bus_io.c            |   17 +-
 sys/arch/algor/algor/algor_p4032_bus_locio.c         |   15 +-
 sys/arch/algor/algor/algor_p4032_bus_mem.c           |   37 +-
 sys/arch/algor/algor/algor_p4032_dma.c               |   48 +-
 sys/arch/algor/algor/algor_p4032var.h                |   14 +-
 sys/arch/algor/algor/algor_p5064_bus_io.c            |   17 +-
 sys/arch/algor/algor/algor_p5064_bus_mem.c           |   35 +-
 sys/arch/algor/algor/algor_p5064_dma.c               |   49 +-
 sys/arch/algor/algor/algor_p5064var.h                |   14 +-
 sys/arch/algor/algor/algor_p6032_bus_io.c            |   19 +-
 sys/arch/algor/algor/algor_p6032_bus_mem.c           |   27 +-
 sys/arch/algor/algor/algor_p6032_dma.c               |   49 +-
 sys/arch/algor/algor/algor_p6032var.h                |   14 +-
 sys/arch/algor/algor/bus_dma.c                       |  637 ------------
 sys/arch/algor/algor/cpu.c                           |   68 -
 sys/arch/algor/conf/files.algor                      |   11 +-
 sys/arch/algor/dev/mainbus.c                         |    6 +-
 sys/arch/algor/include/bus.h                         |  680 +-------------
 sys/arch/algor/include/isa_machdep.h                 |  173 +---
 sys/arch/algor/include/pci_machdep.h                 |  117 +--
 sys/arch/algor/isa/isadma_bounce.c                   |  595 -----------
 sys/arch/algor/isa/mcclock_isa.c                     |  146 --
 sys/arch/algor/pci/pci_alignstride_bus_io_chipdep.c  |  926 -----------------
 sys/arch/algor/pci/pci_alignstride_bus_mem_chipdep.c |  979 -------------------
 sys/arch/algor/pci/pcib.c                            |    8 +-
 sys/arch/algor/pci/pciide_machdep.c                  |    9 +-
 26 files changed, 170 insertions(+), 4540 deletions(-)

diffs (truncated from 5197 to 300 lines):

diff -r 81551e451c5b -r f0343fc52d09 sys/arch/algor/algor/algor_p4032_bus_io.c
--- a/sys/arch/algor/algor/algor_p4032_bus_io.c Fri Jul 08 15:54:56 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032_bus_io.c Fri Jul 08 18:48:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032_bus_io.c,v 1.5 2008/04/28 20:23:10 martin Exp $    */
+/*     $NetBSD: algor_p4032_bus_io.c,v 1.6 2011/07/08 18:48:55 matt Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_bus_io.c,v 1.5 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_bus_io.c,v 1.6 2011/07/08 18:48:55 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -52,16 +52,17 @@
 #include <algor/pci/vtpbcvar.h>
 
 #define        CHIP            algor_p4032
+#define        CHIP_IO
 
 #define        CHIP_EX_MALLOC_SAFE(v)  (((struct p4032_config *)(v))->ac_mallocsafe)
-#define        CHIP_IO_EXTENT(v)       (((struct p4032_config *)(v))->ac_io_ex)
+#define        CHIP_EXTENT(v)          (((struct p4032_config *)(v))->ac_io_ex)
 
 /* IO region 1 */
-#define        CHIP_IO_W1_BUS_START(v) \
+#define        CHIP_W1_BUS_START(v)    \
        (vtpbc_configuration.vt_pci_iobase + 0x00000000UL)
-#define        CHIP_IO_W1_BUS_END(v)   \
+#define        CHIP_W1_BUS_END(v)      \
        (vtpbc_configuration.vt_pci_iobase + 0x000fffffUL)
-#define        CHIP_IO_W1_SYS_START(v) P4032_PCIIO
-#define        CHIP_IO_W1_SYS_END(v)   (P4032_PCIIO + 0x000fffffUL)
+#define        CHIP_W1_SYS_START(v)    P4032_PCIIO
+#define        CHIP_W1_SYS_END(v)      (P4032_PCIIO + 0x000fffffUL)
 
-#include <algor/pci/pci_alignstride_bus_io_chipdep.c>
+#include <mips/mips/bus_space_alignstride_chipdep.c>
diff -r 81551e451c5b -r f0343fc52d09 sys/arch/algor/algor/algor_p4032_bus_locio.c
--- a/sys/arch/algor/algor/algor_p4032_bus_locio.c      Fri Jul 08 15:54:56 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032_bus_locio.c      Fri Jul 08 18:48:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032_bus_locio.c,v 1.4 2008/04/28 20:23:10 martin Exp $ */
+/*     $NetBSD: algor_p4032_bus_locio.c,v 1.5 2011/07/08 18:48:55 matt Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_bus_locio.c,v 1.4 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_bus_locio.c,v 1.5 2011/07/08 18:48:55 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,14 +50,15 @@
 #include <algor/algor/algor_p4032var.h>
 
 #define        CHIP            algor_p4032loc
+#define        CHIP_IO
 
 /* log2(4) */
 #define        CHIP_ALIGN_STRIDE       2
 
 /* IO region 1 */
-#define        CHIP_IO_W1_BUS_START(v) 0x00000000UL
-#define        CHIP_IO_W1_BUS_END(v)   0xffffffffUL
-#define        CHIP_IO_W1_SYS_START(v) 0
-#define        CHIP_IO_W1_SYS_END(v)   CHIP_IO_W1_BUS_END(v)
+#define        CHIP_W1_BUS_START(v)    0x00000000UL
+#define        CHIP_W1_BUS_END(v)      0xffffffffUL
+#define        CHIP_W1_SYS_START(v)    0
+#define        CHIP_W1_SYS_END(v)      CHIP_W1_BUS_END(v)
 
-#include <algor/pci/pci_alignstride_bus_io_chipdep.c>
+#include <mips/mips/bus_space_alignstride_chipdep.c>
diff -r 81551e451c5b -r f0343fc52d09 sys/arch/algor/algor/algor_p4032_bus_mem.c
--- a/sys/arch/algor/algor/algor_p4032_bus_mem.c        Fri Jul 08 15:54:56 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032_bus_mem.c        Fri Jul 08 18:48:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032_bus_mem.c,v 1.5 2008/04/28 20:23:10 martin Exp $   */
+/*     $NetBSD: algor_p4032_bus_mem.c,v 1.6 2011/07/08 18:48:55 matt Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_bus_mem.c,v 1.5 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_bus_mem.c,v 1.6 2011/07/08 18:48:55 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -44,40 +44,41 @@
 
 #include <uvm/uvm_extern.h>
 
-#include <machine/locore.h>
+#include <mips/locore.h>
 
 #include <algor/algor/algor_p4032reg.h>
 #include <algor/algor/algor_p4032var.h>
 
 #include <algor/pci/vtpbcvar.h>
 
-#define        CHIP            algor_p4032
+#define        CHIP                    algor_p4032
 
 #define        CHIP_EX_MALLOC_SAFE(v)  (((struct p4032_config *)(v))->ac_mallocsafe)
-#define        CHIP_MEM_EXTENT(v)      (((struct p4032_config *)(v))->ac_mem_ex)
+#define        CHIP_EXTENT(v)          (((struct p4032_config *)(v))->ac_mem_ex)
+#define CHIP_MEM
 
 /* MEM region 1 */
-#define        CHIP_MEM_W1_BUS_START(v)        \
+#define        CHIP_W1_BUS_START(v)    \
        (vtpbc_configuration.vt_pci_membase + 0x00000000UL)
-#define        CHIP_MEM_W1_BUS_END(v)          \
+#define        CHIP_W1_BUS_END(v)      \
        (vtpbc_configuration.vt_pci_membase + 0x007fffffUL)
-#define        CHIP_MEM_W1_SYS_START(v)        P4032_ISAMEM
-#define        CHIP_MEM_W1_SYS_END(v)          (P4032_ISAMEM + CHIP_MEM_W1_BUS_END(v))
+#define        CHIP_W1_SYS_START(v)    P4032_ISAMEM
+#define        CHIP_W1_SYS_END(v)      (P4032_ISAMEM + CHIP_W1_BUS_END(v))
 
 /* MEM region 2 */
-#define        CHIP_MEM_W2_BUS_START(v)        \
+#define        CHIP_W2_BUS_START(v)    \
        (vtpbc_configuration.vt_pci_membase + 0x01000000UL)
-#define        CHIP_MEM_W2_BUS_END(v)          \
+#define        CHIP_W2_BUS_END(v)      \
        (vtpbc_configuration.vt_pci_membase + 0x07ffffffUL)
-#define        CHIP_MEM_W2_SYS_START(v)        P4032_PCIMEM
-#define        CHIP_MEM_W2_SYS_END(v)          (P4032_PCIMEM + 0x06ffffffUL)
+#define        CHIP_W2_SYS_START(v)    P4032_PCIMEM
+#define        CHIP_W2_SYS_END(v)      (P4032_PCIMEM + 0x06ffffffUL)
 
 #if 0 /* XXX Should implement access to this via TLB or 64-bit KSEG */
 /* MEM region 3 */
-#define        CHIP_MEM_W3_BUS_START(v)        0x20000000UL
-#define        CHIP_MEM_W3_BUS_END(v)          0xffffffffUL
-#define        CHIP_MEM_W3_SYS_START(v)        P4032_PCIMEM_HI
-#define        CHIP_MEM_W3_SYS_END(v)          (P4032_PCIMEM_HI + 0xe0000000UL)
+#define        CHIP_W3_BUS_START(v)    0x20000000UL
+#define        CHIP_W3_BUS_END(v)      0xffffffffUL
+#define        CHIP_W3_SYS_START(v)    P4032_PCIMEM_HI
+#define        CHIP_W3_SYS_END(v)      (P4032_PCIMEM_HI + 0xe0000000UL)
 #endif
 
-#include <algor/pci/pci_alignstride_bus_mem_chipdep.c>
+#include <mips/mips/bus_space_alignstride_chipdep.c>
diff -r 81551e451c5b -r f0343fc52d09 sys/arch/algor/algor/algor_p4032_dma.c
--- a/sys/arch/algor/algor/algor_p4032_dma.c    Fri Jul 08 15:54:56 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032_dma.c    Fri Jul 08 18:48:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032_dma.c,v 1.7 2011/07/01 18:30:36 dyoung Exp $       */
+/*     $NetBSD: algor_p4032_dma.c,v 1.8 2011/07/08 18:48:55 matt Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,11 +34,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_dma.c,v 1.7 2011/07/01 18:30:36 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_dma.c,v 1.8 2011/07/08 18:48:55 matt Exp $");
 
 #include <sys/param.h>
 
-#define        _ALGOR_BUS_DMA_PRIVATE
+#define        _MIPS_BUS_DMA_PRIVATE
 #include <sys/bus.h>
 
 #include <algor/algor/algor_p4032reg.h>
@@ -57,22 +57,11 @@
        t = &acp->ac_pci_dmat;
        t->_cookie = acp;
        t->_wbase = vtpbc_configuration.vt_dma_winbase;
-       t->_physbase = P4032_DMA_PCI_PHYSBASE;
-       t->_wsize = P4032_DMA_PCI_SIZE;
-       t->_dmamap_create = _bus_dmamap_create;
-       t->_dmamap_destroy = _bus_dmamap_destroy;
-       t->_dmamap_load = _bus_dmamap_load;
-       t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf;
-       t->_dmamap_load_uio = _bus_dmamap_load_uio;
-       t->_dmamap_load_raw = _bus_dmamap_load_raw;
-       t->_dmamap_unload = _bus_dmamap_unload;
-       t->_dmamap_sync = _bus_dmamap_sync;
-
-       t->_dmamem_alloc = _bus_dmamem_alloc;
-       t->_dmamem_free = _bus_dmamem_free;
-       t->_dmamem_map = _bus_dmamem_map;
-       t->_dmamem_unmap = _bus_dmamem_unmap;
-       t->_dmamem_mmap = _bus_dmamem_mmap;
+        t->_bounce_alloc_lo = P4032_DMA_PCI_PHYSBASE;
+        t->_bounce_alloc_hi = P4032_DMA_PCI_PHYSBASE + P4032_DMA_PCI_SIZE;
+       t->_dmamap_ops = mips_bus_dmamap_ops;
+       t->_dmamem_ops = mips_bus_dmamem_ops;
+       t->_dmatag_ops = mips_bus_dmatag_ops;
 
        /*
         * Initialize the DMA tag used for PCI on-board Ethernet DMA.
@@ -82,20 +71,9 @@
        t = &acp->ac_pci_pf_dmat;
        t->_cookie = acp;
        t->_wbase = P4032_DMA_PCI_PF_PCIBASE;
-       t->_physbase = P4032_DMA_PCI_PHYSBASE;
-       t->_wsize = P4032_DMA_PCI_SIZE;
-       t->_dmamap_create = _bus_dmamap_create;
-       t->_dmamap_destroy = _bus_dmamap_destroy;
-       t->_dmamap_load = _bus_dmamap_load;
-       t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf;
-       t->_dmamap_load_uio = _bus_dmamap_load_uio;
-       t->_dmamap_load_raw = _bus_dmamap_load_raw;
-       t->_dmamap_unload = _bus_dmamap_unload;
-       t->_dmamap_sync = _bus_dmamap_sync;
-
-       t->_dmamem_alloc = _bus_dmamem_alloc;
-       t->_dmamem_free = _bus_dmamem_free;
-       t->_dmamem_map = _bus_dmamem_map;
-       t->_dmamem_unmap = _bus_dmamem_unmap;
-       t->_dmamem_mmap = _bus_dmamem_mmap;
+        t->_bounce_alloc_lo = P4032_DMA_PCI_PHYSBASE;
+        t->_bounce_alloc_hi = P4032_DMA_PCI_PHYSBASE + P4032_DMA_PCI_SIZE;
+       t->_dmamap_ops = mips_bus_dmamap_ops;
+       t->_dmamem_ops = mips_bus_dmamem_ops;
+       t->_dmatag_ops = mips_bus_dmatag_ops;
 }
diff -r 81551e451c5b -r f0343fc52d09 sys/arch/algor/algor/algor_p4032var.h
--- a/sys/arch/algor/algor/algor_p4032var.h     Fri Jul 08 15:54:56 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032var.h     Fri Jul 08 18:48:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032var.h,v 1.7 2011/07/01 18:30:36 dyoung Exp $        */
+/*     $NetBSD: algor_p4032var.h,v 1.8 2011/07/08 18:48:55 matt Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -33,14 +33,14 @@
 #include <dev/pci/pcivar.h>
 
 struct p4032_config {
-       struct algor_bus_space ac_lociot;
-       struct algor_bus_space ac_iot;
-       struct algor_bus_space ac_memt;
+       struct mips_bus_space ac_lociot;
+       struct mips_bus_space ac_iot;
+       struct mips_bus_space ac_memt;
 
-       struct algor_bus_dma_tag ac_pci_dmat;
-       struct algor_bus_dma_tag ac_pci_pf_dmat;
+       struct mips_bus_dma_tag ac_pci_dmat;
+       struct mips_bus_dma_tag ac_pci_pf_dmat;
 
-       struct algor_pci_chipset ac_pc;
+       struct mips_pci_chipset ac_pc;
 
        struct extent *ac_io_ex;
        struct extent *ac_mem_ex;
diff -r 81551e451c5b -r f0343fc52d09 sys/arch/algor/algor/algor_p5064_bus_io.c
--- a/sys/arch/algor/algor/algor_p5064_bus_io.c Fri Jul 08 15:54:56 2011 +0000
+++ b/sys/arch/algor/algor/algor_p5064_bus_io.c Fri Jul 08 18:48:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p5064_bus_io.c,v 1.5 2008/04/28 20:23:10 martin Exp $    */
+/*     $NetBSD: algor_p5064_bus_io.c,v 1.6 2011/07/08 18:48:55 matt Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p5064_bus_io.c,v 1.5 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p5064_bus_io.c,v 1.6 2011/07/08 18:48:55 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,14 +50,15 @@
 #include <algor/algor/algor_p5064var.h>
 
 #define        CHIP            algor_p5064
+#define        CHIP_IO
 
 #define        CHIP_EX_MALLOC_SAFE(v)  (((struct p5064_config *)(v))->ac_mallocsafe)
-#define        CHIP_IO_EXTENT(v)       (((struct p5064_config *)(v))->ac_io_ex)
+#define        CHIP_EXTENT(v)          (((struct p5064_config *)(v))->ac_io_ex)
 
 /* IO region 1 */
-#define        CHIP_IO_W1_BUS_START(v) 0x00000000UL
-#define        CHIP_IO_W1_BUS_END(v)   0x00ffffffUL
-#define        CHIP_IO_W1_SYS_START(v) P5064_PCIIO
-#define        CHIP_IO_W1_SYS_END(v)   (P5064_PCIIO + 0x00ffffffUL)
+#define        CHIP_W1_BUS_START(v)    0x00000000UL
+#define        CHIP_W1_BUS_END(v)      0x00ffffffUL
+#define        CHIP_W1_SYS_START(v)    P5064_PCIIO



Home | Main Index | Thread Index | Old Index