Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/dev Now that sbus_bus_mmap was converted to d...



details:   https://anonhg.NetBSD.org/src/rev/87c0be2fc9d4
branches:  trunk
changeset: 519957:87c0be2fc9d4
user:      uwe <uwe%NetBSD.org@localhost>
date:      Mon Dec 31 15:00:58 2001 +0000

description:
Now that sbus_bus_mmap was converted to do the proper address
translation, get rid of sbus_bus_addr.  Since sbus_bus_addr is used by
framebuffer drivers that are shared with sparc64 we cannot just change
the callers to use BUS_ADDR() w/out coordinating the change with
sparc64 that uses a different calling protocol, so stub our
sbus_bus_addr to just return BUS_ADDR.

diffstat:

 sys/arch/sparc/dev/sbus.c |  20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)

diffs (35 lines):

diff -r 9e3b9ed96223 -r 87c0be2fc9d4 sys/arch/sparc/dev/sbus.c
--- a/sys/arch/sparc/dev/sbus.c Mon Dec 31 14:23:11 2001 +0000
+++ b/sys/arch/sparc/dev/sbus.c Mon Dec 31 15:00:58 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sbus.c,v 1.43 2001/12/20 07:53:59 uwe Exp $ */
+/*     $NetBSD: sbus.c,v 1.44 2001/12/31 15:00:58 uwe Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -610,23 +610,9 @@
        u_int btype;
        u_int offset;
 {
-       int slot = (int)btype;
-       struct sbus_softc *sc = t->cookie;
-       int i;
 
-       for (i = 0; i < sc->sc_nrange; i++) {
-               bus_addr_t baddr;
-               bus_addr_t iospace;
-
-               if (sc->sc_range[i].cspace != slot)
-                       continue;
-
-               baddr = sc->sc_range[i].poffset + offset;
-               iospace = (bus_addr_t)sc->sc_range[i].pspace;
-               baddr = baddr|(iospace<<32);
-               return (baddr);
-       }
-       return (-1);
+       /* XXX: sbus_bus_addr should be g/c'ed */
+       return (BUS_ADDR(btype, offset));
 }
 
 



Home | Main Index | Thread Index | Old Index