Module Name: src
Committed By: macallan
Date: Fri Aug 26 20:19:45 UTC 2016
Modified Files:
src/sys/arch/shark/isa: isa_io.c
Log Message:
add the same special casing for chipsfb as we already do for igsfb to
isa_bs_mmap()
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/shark/isa/isa_io.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/shark/isa/isa_io.c
diff -u src/sys/arch/shark/isa/isa_io.c:1.12 src/sys/arch/shark/isa/isa_io.c:1.13
--- src/sys/arch/shark/isa/isa_io.c:1.12 Tue Jan 31 04:28:50 2012
+++ src/sys/arch/shark/isa/isa_io.c Fri Aug 26 20:19:45 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_io.c,v 1.12 2012/01/31 04:28:50 matt Exp $ */
+/* $NetBSD: isa_io.c,v 1.13 2016/08/26 20:19:45 macallan Exp $ */
/*
* Copyright 1997
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.12 2012/01/31 04:28:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.13 2016/08/26 20:19:45 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,12 +47,18 @@ __KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1
#include <machine/isa_machdep.h>
#include <machine/ofw.h>
#include "igsfb_ofbus.h"
+#include "chipsfb_ofbus.h"
#if NIGSFB_OFBUS > 0
extern vaddr_t igsfb_mem_vaddr, igsfb_mmio_vaddr;
extern paddr_t igsfb_mem_paddr;
#endif
+#if NCHIPSFB_OFBUS > 0
+extern vaddr_t chipsfb_mem_vaddr, chipsfb_mmio_vaddr;
+extern paddr_t chipsfb_mem_paddr;
+#endif
+
/* Proto types for all the bus_space structure functions */
bs_protos(isa);
@@ -354,6 +360,11 @@ isa_bs_mmap(void *cookie, bus_addr_t add
paddr = igsfb_mem_paddr;
} else
#endif
+#if NCHIPSFB_OFBUS > 0
+ if ((vaddr_t)cookie == chipsfb_mem_vaddr) {
+ paddr = chipsfb_mem_paddr;
+ } else
+#endif
paddr = ofw_gettranslation((vaddr_t)cookie);
if (paddr == -1) {