Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/tsarm/isa Fix mem/io extents usage. Previou...



details:   https://anonhg.NetBSD.org/src/rev/f7e7eef3fa71
branches:  trunk
changeset: 573266:f7e7eef3fa71
user:      joff <joff%NetBSD.org@localhost>
date:      Mon Jan 24 02:38:15 2005 +0000

description:
Fix mem/io extents usage.  Previously had been mis-using the bs_cookie for a bs_tag.

diffstat:

 sys/arch/evbarm/tsarm/isa/isa_io.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (63 lines):

diff -r b833f92c9241 -r f7e7eef3fa71 sys/arch/evbarm/tsarm/isa/isa_io.c
--- a/sys/arch/evbarm/tsarm/isa/isa_io.c        Mon Jan 24 02:36:04 2005 +0000
+++ b/sys/arch/evbarm/tsarm/isa/isa_io.c        Mon Jan 24 02:38:15 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_io.c,v 1.2 2005/01/09 21:32:08 joff Exp $  */
+/*     $NetBSD: isa_io.c,v 1.3 2005/01/24 02:38:15 joff Exp $  */
 
 /*
  * Copyright 1997
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.2 2005/01/09 21:32:08 joff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.3 2005/01/24 02:38:15 joff Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -282,7 +282,7 @@
        struct extent *ex;
        int err;
 
-       if (t == &isa_io_bs_tag) 
+       if (t == isa_io_bs_tag.bs_cookie) 
                ex = isaio_ex;
        else
                ex = isamem_ex;
@@ -312,8 +312,6 @@
        bus_size_t offset, size;
        bus_space_handle_t *nbshp;
 {
-/*     printf("isa_subregion(tag=%p, bsh=%lx, off=%lx, sz=%lx)\n",
-           t, bsh, offset, size);*/
        *nbshp = bsh + offset;
        return(0);
 }
@@ -332,7 +330,7 @@
        u_long bpa;
        int err;
 
-       if (t == &isa_io_bs_tag) 
+       if (t == isa_io_bs_tag.bs_cookie) 
                ex = isaio_ex;
        else
                ex = isamem_ex;
@@ -344,7 +342,7 @@
        if (err)
                return err;
 
-       *bshp = *bpap = bpa;
+       *bshp = *bpap = bpa + (bus_addr_t)t;
        return 0;
 }
 
@@ -356,7 +354,7 @@
 {
        struct extent *ex;
 
-       if (t == &isa_io_bs_tag) 
+       if (t == isa_io_bs_tag.bs_cookie) 
                ex = isaio_ex;
        else
                ex = isamem_ex;



Home | Main Index | Thread Index | Old Index