Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/dev use obio_space_map() to map DMA register...



details:   https://anonhg.NetBSD.org/src/rev/15a679522316
branches:  trunk
changeset: 832260:15a679522316
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri May 04 17:20:34 2018 +0000

description:
use obio_space_map() to map DMA registers, now this works on both G5 and
32bit hardware

diffstat:

 sys/arch/macppc/dev/snapper.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (31 lines):

diff -r 0ecb8e2ecf61 -r 15a679522316 sys/arch/macppc/dev/snapper.c
--- a/sys/arch/macppc/dev/snapper.c     Fri May 04 17:17:48 2018 +0000
+++ b/sys/arch/macppc/dev/snapper.c     Fri May 04 17:20:34 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: snapper.c,v 1.46 2018/03/29 18:34:32 macallan Exp $    */
+/*     $NetBSD: snapper.c,v 1.47 2018/05/04 17:20:34 macallan Exp $    */
 /*     Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp     */
 /*     Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp         */
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.46 2018/03/29 18:34:32 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.47 2018/05/04 17:20:34 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -788,10 +788,8 @@
 #endif
 
        bus_space_map(sc->sc_tag, reg[0], reg[1], 0, &sc->sc_bsh);
-       bus_space_map(sc->sc_tag, reg[2], reg[3],
-           BUS_SPACE_MAP_LINEAR, &sc->sc_odmah);
-       bus_space_map(sc->sc_tag, reg[4], reg[5],
-           BUS_SPACE_MAP_LINEAR, &sc->sc_idmah);
+       obio_space_map(reg[2], reg[3], &sc->sc_odmah);
+       obio_space_map(reg[4], reg[5], &sc->sc_idmah);
 
        sc->sc_odma = bus_space_vaddr(sc->sc_tag, sc->sc_odmah);
        sc->sc_idma = bus_space_vaddr(sc->sc_tag, sc->sc_idmah);



Home | Main Index | Thread Index | Old Index