Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sgimips/hpc use bus_space_map()



details:   https://anonhg.NetBSD.org/src/rev/964c4fa35e6a
branches:  trunk
changeset: 346639:964c4fa35e6a
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sun Jul 24 16:47:49 2016 +0000

description:
use bus_space_map()

diffstat:

 sys/arch/sgimips/hpc/hpc.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 6b18c9f2fbb7 -r 964c4fa35e6a sys/arch/sgimips/hpc/hpc.c
--- a/sys/arch/sgimips/hpc/hpc.c        Sun Jul 24 14:09:22 2016 +0000
+++ b/sys/arch/sgimips/hpc/hpc.c        Sun Jul 24 16:47:49 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpc.c,v 1.68 2015/02/18 16:47:58 macallan Exp $        */
+/*     $NetBSD: hpc.c,v 1.69 2016/07/24 16:47:49 macallan Exp $        */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.68 2015/02/18 16:47:58 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.69 2016/07/24 16:47:49 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -527,7 +527,9 @@
 
                /* XXX This is disgusting. */
                ha.ha_st = normal_memt;
-               ha.ha_sh = MIPS_PHYS_TO_KSEG1(sc->sc_base);
+               if (bus_space_map(normal_memt, sc->sc_base, 0,
+                   BUS_SPACE_MAP_LINEAR, &ha.ha_sh) != 0)
+                       continue;
                ha.ha_dmat = &sgimips_default_bus_dma_tag;
                if (hpctype == 3)
                        ha.hpc_regs = &hpc3_values;



Home | Main Index | Thread Index | Old Index