Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm Add stream methods



details:   https://anonhg.NetBSD.org/src/rev/4fa062455e48
branches:  trunk
changeset: 780214:4fa062455e48
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jul 15 20:53:23 2012 +0000

description:
Add stream methods

diffstat:

 sys/arch/arm/mainbus/mainbus_io.c        |  43 ++++++++++++++-
 sys/arch/arm/marvell/mvsoc_space.c       |  92 +++++++++++++++++++++----------
 sys/arch/arm/omap/omap_a2x_space.c       |  43 ++++++++++++++-
 sys/arch/arm/omap/omap_a4x_space.c       |  42 +++++++++++++-
 sys/arch/arm/omap/omap_nobyteacc_space.c |  42 +++++++++++++-
 sys/arch/arm/omap/omap_space.c           |  43 +++++++++++++-
 6 files changed, 263 insertions(+), 42 deletions(-)

diffs (truncated from 501 to 300 lines):

diff -r c591d155bc2f -r 4fa062455e48 sys/arch/arm/mainbus/mainbus_io.c
--- a/sys/arch/arm/mainbus/mainbus_io.c Sun Jul 15 20:48:53 2012 +0000
+++ b/sys/arch/arm/mainbus/mainbus_io.c Sun Jul 15 20:53:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus_io.c,v 1.21 2011/07/01 20:31:39 dyoung Exp $   */
+/*     $NetBSD: mainbus_io.c,v 1.22 2012/07/15 20:53:23 matt Exp $     */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus_io.c,v 1.21 2011/07/01 20:31:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus_io.c,v 1.22 2012/07/15 20:53:23 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -129,6 +129,45 @@
        bs_notimpl_bs_c_2,
        bs_notimpl_bs_c_4,
        bs_notimpl_bs_c_8,
+
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       /* stream methods */
+       /* read (single) */
+       mainbus_bs_r_1,
+       mainbus_bs_r_2,
+       mainbus_bs_r_4,
+       bs_notimpl_bs_r_8,
+
+       /* read multiple */
+       bs_notimpl_bs_rm_1,
+       mainbus_bs_rm_2,
+       bs_notimpl_bs_rm_4,
+       bs_notimpl_bs_rm_8,
+
+       /* read region */
+       bs_notimpl_bs_rr_1,
+       bs_notimpl_bs_rr_2,
+       bs_notimpl_bs_rr_4,
+       bs_notimpl_bs_rr_8,
+
+       /* write (single) */
+       mainbus_bs_w_1,
+       mainbus_bs_w_2,
+       mainbus_bs_w_4,
+       bs_notimpl_bs_w_8,
+
+       /* write multiple */
+       mainbus_bs_wm_1,
+       mainbus_bs_wm_2,
+       bs_notimpl_bs_wm_4,
+       bs_notimpl_bs_wm_8,
+
+       /* write region */
+       bs_notimpl_bs_wr_1,
+       bs_notimpl_bs_wr_2,
+       bs_notimpl_bs_wr_4,
+       bs_notimpl_bs_wr_8,
+#endif
 };
 
 /* bus space functions */
diff -r c591d155bc2f -r 4fa062455e48 sys/arch/arm/marvell/mvsoc_space.c
--- a/sys/arch/arm/marvell/mvsoc_space.c        Sun Jul 15 20:48:53 2012 +0000
+++ b/sys/arch/arm/marvell/mvsoc_space.c        Sun Jul 15 20:53:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsoc_space.c,v 1.2 2011/07/01 20:30:21 dyoung Exp $   */
+/*     $NetBSD: mvsoc_space.c,v 1.3 2012/07/15 20:53:50 matt Exp $     */
 /*
  * Copyright (c) 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsoc_space.c,v 1.2 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoc_space.c,v 1.3 2012/07/15 20:53:50 matt Exp $");
 
 #include "opt_mvsoc.h"
 #include "mvpex.h"
@@ -49,25 +49,7 @@
 bs_protos(generic_armv4);
 bs_protos(bs_notimpl);
 
-#define MVSOC_BUS_SPACE_DEFAULT_FUNCS          \
-       /* mapping/unmapping */                 \
-       mvsoc_bs_map,                           \
-       mvsoc_bs_unmap,                         \
-       mvsoc_bs_subregion,                     \
-                                               \
-       /* allocation/deallocation */           \
-       mvsoc_bs_alloc,                         \
-       mvsoc_bs_free,                          \
-                                               \
-       /* get kernel virtual address */        \
-       mvsoc_bs_vaddr,                         \
-                                               \
-       /* mmap bus space for userland */       \
-       bs_notimpl_bs_mmap,                     \
-                                               \
-       /* barrier */                           \
-       mvsoc_bs_barrier,                       \
-                                               \
+#define MVSOC_BUS_SPACE_NORMAL_FUNCS           \
        /* read (single) */                     \
        generic_bs_r_1,                         \
        generic_armv4_bs_r_2,                   \
@@ -102,7 +84,28 @@
        generic_bs_wr_1,                        \
        generic_armv4_bs_wr_2,                  \
        generic_bs_wr_4,                        \
-       bs_notimpl_bs_wr_8,                     \
+       bs_notimpl_bs_wr_8
+
+#define MVSOC_BUS_SPACE_DEFAULT_FUNCS          \
+       /* mapping/unmapping */                 \
+       mvsoc_bs_map,                           \
+       mvsoc_bs_unmap,                         \
+       mvsoc_bs_subregion,                     \
+                                               \
+       /* allocation/deallocation */           \
+       mvsoc_bs_alloc,                         \
+       mvsoc_bs_free,                          \
+                                               \
+       /* get kernel virtual address */        \
+       mvsoc_bs_vaddr,                         \
+                                               \
+       /* mmap bus space for userland */       \
+       bs_notimpl_bs_mmap,                     \
+                                               \
+       /* barrier */                           \
+       mvsoc_bs_barrier,                       \
+                                               \
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,           \
                                                \
        /* set multiple */                      \
        bs_notimpl_bs_sm_1,                     \
@@ -120,14 +123,17 @@
        bs_notimpl_bs_c_1,                      \
        generic_armv4_bs_c_2,                   \
        bs_notimpl_bs_c_4,                      \
-       bs_notimpl_bs_c_8,
+       bs_notimpl_bs_c_8
 
 
 struct bus_space mvsoc_bs_tag = {
        /* cookie */
        (void *)0,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 
 #if NMVPEX > 0
@@ -136,25 +142,37 @@
        /* cookie */
        (void *)ORION_TAG_PEX0_MEM,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 struct bus_space orion_pex0_io_bs_tag = {
        /* cookie */
        (void *)ORION_TAG_PEX0_IO,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 struct bus_space orion_pex1_mem_bs_tag = {
        /* cookie */
        (void *)ORION_TAG_PEX1_MEM,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 struct bus_space orion_pex1_io_bs_tag = {
        /* cookie */
        (void *)ORION_TAG_PEX1_IO,
 
        MVSOC_BUS_SPACE_DEFAULT_FUNCS
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 #endif
 
@@ -163,13 +181,19 @@
        /* cookie */
        (void *)KIRKWOOD_TAG_PEX_MEM,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 struct bus_space kirkwood_pex_io_bs_tag = {
        /* cookie */
        (void *)KIRKWOOD_TAG_PEX_IO,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 #endif
 #endif
@@ -180,13 +204,19 @@
        /* cookie */
        (void *)ORION_TAG_PCI_MEM,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 struct bus_space orion_pci_io_bs_tag = {
        /* cookie */
        (void *)ORION_TAG_PCI_IO,
 
-       MVSOC_BUS_SPACE_DEFAULT_FUNCS
+       MVSOC_BUS_SPACE_DEFAULT_FUNCS,
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       MVSOC_BUS_SPACE_NORMAL_FUNCS,
+#endif
 };
 #endif
 #endif
diff -r c591d155bc2f -r 4fa062455e48 sys/arch/arm/omap/omap_a2x_space.c
--- a/sys/arch/arm/omap/omap_a2x_space.c        Sun Jul 15 20:48:53 2012 +0000
+++ b/sys/arch/arm/omap/omap_a2x_space.c        Sun Jul 15 20:53:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap_a2x_space.c,v 1.2 2011/07/01 20:30:21 dyoung Exp $ */
+/*     $NetBSD: omap_a2x_space.c,v 1.3 2012/07/15 20:54:15 matt Exp $ */
 
 /*
  * Based on arch/arm/xscale/pxa2x0_a4x_space.c
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap_a2x_space.c,v 1.2 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap_a2x_space.c,v 1.3 2012/07/15 20:54:15 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -130,6 +130,45 @@
        bs_notimpl_bs_c_2,
        bs_notimpl_bs_c_4,
        bs_notimpl_bs_c_8,
+
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+       /* stream methods */
+       /* read (single) */
+       a2x_bs_r_1,
+       a2x_bs_r_2,
+       a2x_bs_r_4,
+       bs_notimpl_bs_r_8,
+
+       /* read multiple */
+       a2x_bs_rm_1,
+       a2x_bs_rm_2,
+       bs_notimpl_bs_rm_4,
+       bs_notimpl_bs_rm_8,
+
+       /* read region */
+       bs_notimpl_bs_rr_1,
+       bs_notimpl_bs_rr_2,
+       bs_notimpl_bs_rr_4,
+       bs_notimpl_bs_rr_8,
+
+       /* write (single) */
+       a2x_bs_w_1,
+       a2x_bs_w_2,
+       a2x_bs_w_4,
+       bs_notimpl_bs_w_8,
+
+       /* write multiple */
+       a2x_bs_wm_1,
+       a2x_bs_wm_2,
+       bs_notimpl_bs_wm_4,
+       bs_notimpl_bs_wm_8,
+
+       /* write region */



Home | Main Index | Thread Index | Old Index