From 7a107f9dd483bd72c5f58b11d10607f100dee988 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 14 Dec 2001 14:55:58 +0000 Subject: Use default mapping type (little endian) if the type is 0, otherwise use the passed in type. This allows PCI devices to create big endian mappings which is necessary for vgafb. --- sys/arch/sparc64/dev/psycho.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64/dev') diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index 7eae42f7e31..9436f9c63c1 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.8 2001/10/15 03:36:16 jason Exp $ */ +/* $OpenBSD: psycho.c,v 1.9 2001/12/14 14:55:57 jason Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -869,6 +869,9 @@ _psycho_bus_map(t, btype, offset, size, flags, vaddr, hp) ss = psycho_get_childspace(t->type); DPRINTF(PDB_BUSMAP, (" cspace %d", ss)); + if (btype == 0) + btype = t->type; + for (i = 0; i < pp->pp_nrange; i++) { bus_addr_t paddr; @@ -880,7 +883,7 @@ _psycho_bus_map(t, btype, offset, size, flags, vaddr, hp) DPRINTF(PDB_BUSMAP, ("\n_psycho_bus_map: mapping paddr space %lx offset %lx paddr %qx\n", (long)ss, (long)offset, (unsigned long long)paddr)); - return (bus_space_map2(sc->sc_bustag, t->type, paddr, + return (bus_space_map2(sc->sc_bustag, btype, paddr, size, flags, vaddr, hp)); } DPRINTF(PDB_BUSMAP, (" FAILED\n")); -- cgit v1.2.3