Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom add mmap
details: https://anonhg.NetBSD.org/src/rev/6e03910a7bb8
branches: trunk
changeset: 789289:6e03910a7bb8
user: matt <matt%NetBSD.org@localhost>
date: Mon Aug 12 21:20:02 2013 +0000
description:
add mmap
diffstat:
sys/arch/arm/broadcom/bcmgen_space.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 3b827939e9d3 -r 6e03910a7bb8 sys/arch/arm/broadcom/bcmgen_space.c
--- a/sys/arch/arm/broadcom/bcmgen_space.c Mon Aug 12 21:19:09 2013 +0000
+++ b/sys/arch/arm/broadcom/bcmgen_space.c Mon Aug 12 21:20:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmgen_space.c,v 1.2 2013/01/09 17:45:13 matt Exp $ */
+/* $NetBSD: bcmgen_space.c,v 1.3 2013/08/12 21:20:02 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcmgen_space.c,v 1.2 2013/01/09 17:45:13 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcmgen_space.c,v 1.3 2013/08/12 21:20:02 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -254,6 +254,16 @@
return (void *)bsh;
}
+paddr_t
+bcmgen_bs_mmap(void *t, bus_addr_t bpa, off_t offset, int prot, int flags)
+{
+ paddr_t bus_flags = 0;
+
+ if (flags & BUS_SPACE_MAP_PREFETCHABLE)
+ bus_flags |= ARM32_MMAP_WRITECOMBINE;
+
+ return (arm_btop(bpa + offset) | bus_flags);
+}
int
bcmgen_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend,
Home |
Main Index |
Thread Index |
Old Index