diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-12-14 14:55:58 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-12-14 14:55:58 +0000 |
commit | 7a107f9dd483bd72c5f58b11d10607f100dee988 (patch) | |
tree | a0fcbd8ac7254adfcf49af295e78beadb06af6f0 /sys/arch/sparc64/dev | |
parent | 0f0681deb68ad70793cc014a0ed3a0c582a1f5b2 (diff) |
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.
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r-- | sys/arch/sparc64/dev/psycho.c | 7 |
1 files changed, 5 insertions, 2 deletions
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")); |