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 add the same special casing for chipsfb a...



details:   https://anonhg.NetBSD.org/src/rev/14c5345f7c5a
branches:  trunk
changeset: 347443:14c5345f7c5a
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Aug 26 20:19:45 2016 +0000

description:
add the same special casing for chipsfb as we already do for igsfb to
isa_bs_mmap()

diffstat:

 sys/arch/shark/isa/isa_io.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r 980f08dc7067 -r 14c5345f7c5a sys/arch/shark/isa/isa_io.c
--- a/sys/arch/shark/isa/isa_io.c       Fri Aug 26 19:45:55 2016 +0000
+++ b/sys/arch/shark/isa/isa_io.c       Fri Aug 26 20:19:45 2016 +0000
@@ -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 @@
 #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 @@
                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) {



Home | Main Index | Thread Index | Old Index