Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 support BUS_DMA_PREFETCHABLE in bus_dmame...
details: https://anonhg.NetBSD.org/src/rev/e1e57c6784dd
branches: trunk
changeset: 784630:e1e57c6784dd
user: macallan <macallan%NetBSD.org@localhost>
date: Mon Feb 04 13:26:19 2013 +0000
description:
support BUS_DMA_PREFETCHABLE in bus_dmamem_mmap()
diffstat:
sys/arch/arm/arm32/bus_dma.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r 08b356f3da55 -r e1e57c6784dd sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c Mon Feb 04 13:18:35 2013 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c Mon Feb 04 13:26:19 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.72 2013/01/28 08:03:13 skrll Exp $ */
+/* $NetBSD: bus_dma.c,v 1.73 2013/02/04 13:26:19 macallan Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.72 2013/01/28 08:03:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.73 2013/02/04 13:26:19 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1354,6 +1354,7 @@
_bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
off_t off, int prot, int flags)
{
+ paddr_t map_flags;
int i;
for (i = 0; i < nsegs; i++) {
@@ -1371,7 +1372,12 @@
continue;
}
- return (arm_btop((u_long)segs[i].ds_addr + off));
+ map_flags = 0;
+ if (flags & BUS_DMA_PREFETCHABLE)
+ map_flags |= ARM32_MMAP_WRITECOMBINE;
+
+ return (arm_btop((u_long)segs[i].ds_addr + off) | map_flags);
+
}
/* Page not found. */
Home |
Main Index |
Thread Index |
Old Index