Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/shark/isa teach isa_bs_mmap() about BUS_SPACE_MAP_P...
details: https://anonhg.NetBSD.org/src/rev/abcec2ddb0e5
branches: trunk
changeset: 347448:abcec2ddb0e5
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Aug 26 22:19:48 2016 +0000
description:
teach isa_bs_mmap() about BUS_SPACE_MAP_PREFETCHABLE
use the right paddr for chipsfb
diffstat:
sys/arch/shark/isa/isa_io.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r 5cf0b4a3310c -r abcec2ddb0e5 sys/arch/shark/isa/isa_io.c
--- a/sys/arch/shark/isa/isa_io.c Fri Aug 26 22:12:22 2016 +0000
+++ b/sys/arch/shark/isa/isa_io.c Fri Aug 26 22:19:48 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_io.c,v 1.13 2016/08/26 20:19:45 macallan Exp $ */
+/* $NetBSD: isa_io.c,v 1.14 2016/08/26 22:19:48 macallan Exp $ */
/*
* Copyright 1997
@@ -38,14 +38,16 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.13 2016/08/26 20:19:45 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.14 2016/08/26 22:19:48 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <uvm/uvm.h>
#include <machine/pio.h>
#include <machine/isa_machdep.h>
#include <machine/ofw.h>
+#include <machine/pmap.h>
#include "igsfb_ofbus.h"
#include "chipsfb_ofbus.h"
@@ -362,7 +364,7 @@
#endif
#if NCHIPSFB_OFBUS > 0
if ((vaddr_t)cookie == chipsfb_mem_vaddr) {
- paddr = chipsfb_mem_paddr;
+ paddr = 0;
} else
#endif
paddr = ofw_gettranslation((vaddr_t)cookie);
@@ -377,7 +379,10 @@
#ifdef OFISA_DEBUG
printf(" -> %08x %08x\n", (uint32_t)paddr, (uint32_t)ret);
#endif
- return arm_btop(ret);
+ if (flags & BUS_SPACE_MAP_PREFETCHABLE) {
+ return (arm_btop(ret) | ARM32_MMAP_WRITECOMBINE);
+ } else
+ return arm_btop(ret);
}
int
Home |
Main Index |
Thread Index |
Old Index