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 Fix up bus_space_map for latest RPI fi...
details: https://anonhg.NetBSD.org/src/rev/ed4d4452e448
branches: trunk
changeset: 342374:ed4d4452e448
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Dec 19 08:27:01 2015 +0000
description:
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
diffstat:
sys/arch/arm/broadcom/bcm2835_space.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (42 lines):
diff -r 9e4042bcd3ae -r ed4d4452e448 sys/arch/arm/broadcom/bcm2835_space.c
--- a/sys/arch/arm/broadcom/bcm2835_space.c Sat Dec 19 03:16:09 2015 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_space.c Sat Dec 19 08:27:01 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_space.c,v 1.8 2015/02/28 09:34:34 skrll Exp $ */
+/* $NetBSD: bcm2835_space.c,v 1.9 2015/12/19 08:27:01 skrll Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_space.c,v 1.8 2015/02/28 09:34:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_space.c,v 1.9 2015/12/19 08:27:01 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -292,18 +292,17 @@
int pmap_flags;
-#if defined(BCM2836)
+ /* Attempt to find the PA device mapping */
pa = ba;
-#else
- pa = ba & ~BCM2835_BUSADDR_CACHE_MASK;
-#endif
- /* this does device addresses */
- if ((pd = pmap_devmap_find_pa(pa, size)) != NULL) {
+ if ((pd = pmap_devmap_find_pa(ba, size)) != NULL) {
/* Device was statically mapped. */
*bshp = pd->pd_va + (pa - pd->pd_pa);
return 0;
}
+ /* Now assume bus address so convert to PA */
+ pa = ba & ~BCM2835_BUSADDR_CACHE_MASK;
+
startpa = trunc_page(pa);
endpa = round_page(pa + size);
Home |
Main Index |
Thread Index |
Old Index