Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/xscale Add support for "xor5", "xor6", "xor7", ...
details: https://anonhg.NetBSD.org/src/rev/13f6b7d551e0
branches: trunk
changeset: 534831:13f6b7d551e0
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Aug 04 02:26:18 2002 +0000
description:
Add support for "xor5", "xor6", "xor7", and "xor8".
diffstat:
sys/arch/arm/xscale/i80321_aau.c | 31 +++++++++++++++++-
sys/arch/arm/xscale/iopaau.c | 64 +++++++++++++++++++++++++++++++++++-----
sys/arch/arm/xscale/iopaauvar.h | 7 ++-
3 files changed, 88 insertions(+), 14 deletions(-)
diffs (227 lines):
diff -r c25c175ff494 -r 13f6b7d551e0 sys/arch/arm/xscale/i80321_aau.c
--- a/sys/arch/arm/xscale/i80321_aau.c Sun Aug 04 02:17:06 2002 +0000
+++ b/sys/arch/arm/xscale/i80321_aau.c Sun Aug 04 02:26:18 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i80321_aau.c,v 1.4 2002/08/03 21:31:16 thorpej Exp $ */
+/* $NetBSD: i80321_aau.c,v 1.5 2002/08/04 02:26:18 thorpej Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i80321_aau.c,v 1.4 2002/08/03 21:31:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80321_aau.c,v 1.5 2002/08/04 02:26:18 thorpej Exp $");
#include <sys/param.h>
#include <sys/pool.h>
@@ -81,10 +81,15 @@
};
static struct iopaau_function aau321_func_xor_1_4 = {
- iopaau_func_xor_1_4_setup,
+ iopaau_func_xor_setup,
&iopaau_desc_4_cache,
};
+static struct iopaau_function aau321_func_xor_5_8 = {
+ iopaau_func_xor_setup,
+ &iopaau_desc_8_cache,
+};
+
static const struct dmover_algdesc aau321_algdescs[] = {
{
DMOVER_FUNC_ZERO,
@@ -116,6 +121,26 @@
&aau321_func_xor_1_4,
4
},
+ {
+ DMOVER_FUNC_XOR5,
+ &aau321_func_xor_5_8,
+ 5
+ },
+ {
+ DMOVER_FUNC_XOR6,
+ &aau321_func_xor_5_8,
+ 6
+ },
+ {
+ DMOVER_FUNC_XOR7,
+ &aau321_func_xor_5_8,
+ 7
+ },
+ {
+ DMOVER_FUNC_XOR8,
+ &aau321_func_xor_5_8,
+ 8
+ },
};
#define AAU321_ALGDESC_COUNT \
(sizeof(aau321_algdescs) / sizeof(aau321_algdescs[0]))
diff -r c25c175ff494 -r 13f6b7d551e0 sys/arch/arm/xscale/iopaau.c
--- a/sys/arch/arm/xscale/iopaau.c Sun Aug 04 02:17:06 2002 +0000
+++ b/sys/arch/arm/xscale/iopaau.c Sun Aug 04 02:26:18 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iopaau.c,v 1.6 2002/08/03 21:58:55 thorpej Exp $ */
+/* $NetBSD: iopaau.c,v 1.7 2002/08/04 02:26:18 thorpej Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iopaau.c,v 1.6 2002/08/03 21:58:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iopaau.c,v 1.7 2002/08/04 02:26:18 thorpej Exp $");
#include <sys/param.h>
#include <sys/pool.h>
@@ -66,8 +66,10 @@
#endif
static struct pool aau_desc_4_pool;
+static struct pool aau_desc_8_pool;
struct pool_cache iopaau_desc_4_cache;
+struct pool_cache iopaau_desc_8_cache;
/*
* iopaau_desc_ctor:
@@ -366,15 +368,49 @@
AAU_DC_B2_CC(AAU_DC_CC_XOR)|
AAU_DC_B3_CC(AAU_DC_CC_XOR)|
AAU_DC_B4_CC(AAU_DC_CC_XOR),
+
+ AAU_DC_SBCI_5_8| /* 5 */
+ AAU_DC_B1_CC(AAU_DC_CC_DIRECT_FILL)|
+ AAU_DC_B2_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B3_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B4_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B5_CC(AAU_DC_CC_XOR),
+
+ AAU_DC_SBCI_5_8| /* 6 */
+ AAU_DC_B1_CC(AAU_DC_CC_DIRECT_FILL)|
+ AAU_DC_B2_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B3_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B4_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B5_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B6_CC(AAU_DC_CC_XOR),
+
+ AAU_DC_SBCI_5_8| /* 7 */
+ AAU_DC_B1_CC(AAU_DC_CC_DIRECT_FILL)|
+ AAU_DC_B2_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B3_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B4_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B5_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B6_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B7_CC(AAU_DC_CC_XOR),
+
+ AAU_DC_SBCI_5_8| /* 8 */
+ AAU_DC_B1_CC(AAU_DC_CC_DIRECT_FILL)|
+ AAU_DC_B2_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B3_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B4_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B5_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B6_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B7_CC(AAU_DC_CC_XOR)|
+ AAU_DC_B8_CC(AAU_DC_CC_XOR),
};
/*
- * iopaau_func_xor_1_4_setup:
+ * iopaau_func_xor_setup:
*
- * Setup routine for the "copy", "xor2".."xor4" functions.
+ * Setup routine for the "copy", "xor2".."xor8" functions.
*/
int
-iopaau_func_xor_1_4_setup(struct iopaau_softc *sc, struct dmover_request *dreq)
+iopaau_func_xor_setup(struct iopaau_softc *sc, struct dmover_request *dreq)
{
struct iopaau_function *af =
dreq->dreq_assignment->das_algdesc->dad_data;
@@ -382,7 +418,7 @@
bus_dmamap_t dmamap = sc->sc_map_out;
bus_dmamap_t *inmap = sc->sc_map_in;
uint32_t *prevpa;
- struct aau_desc_4 **prevp, *cur;
+ struct aau_desc_8 **prevp, *cur;
int ninputs = dreq->dreq_assignment->das_algdesc->dad_ninputs;
int i, error, seg;
size_t descsz = AAU_DESC_SIZE(ninputs);
@@ -471,7 +507,7 @@
BUS_DMASYNC_PREWRITE);
}
- prevp = (struct aau_desc_4 **) &sc->sc_firstdesc;
+ prevp = (struct aau_desc_8 **) &sc->sc_firstdesc;
prevpa = &sc->sc_firstdesc_pa;
for (seg = 0; seg < dmamap->dm_nsegs; seg++) {
@@ -495,7 +531,13 @@
error = EFAULT; /* "address" error, sort of. */
goto bad;
}
- cur->d_sar[i] = inmap[i]->dm_segs[seg].ds_addr;
+ if (i < 4) {
+ cur->d_sar[i] =
+ inmap[i]->dm_segs[seg].ds_addr;
+ } else if (i < 8) {
+ cur->d_sar5_8[i - 4] =
+ inmap[i]->dm_segs[seg].ds_addr;
+ }
}
cur->d_dar = dmamap->dm_segs[seg].ds_addr;
cur->d_bc = dmamap->dm_segs[seg].ds_len;
@@ -602,8 +644,14 @@
pool_init(&aau_desc_4_pool, sizeof(struct aau_desc_4),
8 * 4, offsetof(struct aau_desc_4, d_nda), 0, "aaud4pl",
NULL);
+ pool_init(&aau_desc_8_pool, sizeof(struct aau_desc_8),
+ 8 * 4, offsetof(struct aau_desc_8, d_nda), 0, "aaud8pl",
+ NULL);
+
pool_cache_init(&iopaau_desc_4_cache, &aau_desc_4_pool,
iopaau_desc_ctor, NULL, NULL);
+ pool_cache_init(&iopaau_desc_8_cache, &aau_desc_8_pool,
+ iopaau_desc_ctor, NULL, NULL);
/* Register us with dmover. */
dmover_backend_register(&sc->sc_dmb);
diff -r c25c175ff494 -r 13f6b7d551e0 sys/arch/arm/xscale/iopaauvar.h
--- a/sys/arch/arm/xscale/iopaauvar.h Sun Aug 04 02:17:06 2002 +0000
+++ b/sys/arch/arm/xscale/iopaauvar.h Sun Aug 04 02:26:18 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iopaauvar.h,v 1.3 2002/08/03 21:31:16 thorpej Exp $ */
+/* $NetBSD: iopaauvar.h,v 1.4 2002/08/04 02:26:18 thorpej Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
#include <sys/pool.h>
#include <dev/dmover/dmovervar.h>
-#define AAU_MAX_INPUTS 4
+#define AAU_MAX_INPUTS 8
/*
* Due to the way the AAU's descriptors work, the DMA segments for
@@ -77,6 +77,7 @@
};
extern struct pool_cache iopaau_desc_4_cache;
+extern struct pool_cache iopaau_desc_8_cache;
void iopaau_attach(struct iopaau_softc *);
void iopaau_process(struct dmover_backend *);
@@ -86,7 +87,7 @@
struct dmover_request *);
int iopaau_func_fill8_setup(struct iopaau_softc *,
struct dmover_request *);
-int iopaau_func_xor_1_4_setup(struct iopaau_softc *,
+int iopaau_func_xor_setup(struct iopaau_softc *,
struct dmover_request *);
void iopaau_desc_free(struct pool_cache *, void *);
Home |
Main Index |
Thread Index |
Old Index