Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k Support BUS_SPACE_MAP_SHIFTED_EVEN for bus_spa...



details:   https://anonhg.NetBSD.org/src/rev/fabec3fd9ec6
branches:  trunk
changeset: 517361:fabec3fd9ec6
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sun Nov 11 01:38:00 2001 +0000

description:
Support BUS_SPACE_MAP_SHIFTED_EVEN for bus_space_map().
Now BUS_SPACE_MAP_SHIFTED means BUS_SPACE_MAP_SHIFTED_ODD.
It is needed for Nereid Ethernet.

diffstat:

 sys/arch/x68k/dev/intio.c   |  8 +++++---
 sys/arch/x68k/include/bus.h |  7 +++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 0394e4d4ac5c -r fabec3fd9ec6 sys/arch/x68k/dev/intio.c
--- a/sys/arch/x68k/dev/intio.c Sun Nov 11 01:36:15 2001 +0000
+++ b/sys/arch/x68k/dev/intio.c Sun Nov 11 01:38:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intio.c,v 1.9 2001/08/26 12:14:22 mrg Exp $    */
+/*     $NetBSD: intio.c,v 1.10 2001/11/11 01:38:01 isaki Exp $ */
 
 /*-
  * Copyright (c) 1998 NetBSD Foundation, Inc.
@@ -328,10 +328,12 @@
        *bshp = (bus_space_handle_t)
          ((u_int) bpa - PHYS_INTIODEV + intiobase);
        /*
-        * Some devices are mapped on odd addresses only.
+        * Some devices are mapped on odd or even addresses only.
         */
-       if (flags & BUS_SPACE_MAP_SHIFTED)
+       if ((flags & BUS_SPACE_MAP_SHIFTED_MASK) == BUS_SPACE_MAP_SHIFTED_ODD)
                *bshp += 0x80000001;
+       if ((flags & BUS_SPACE_MAP_SHIFTED_MASK) == BUS_SPACE_MAP_SHIFTED_EVEN)
+               *bshp += 0x80000000;
 
        return (0);
 }
diff -r 0394e4d4ac5c -r fabec3fd9ec6 sys/arch/x68k/include/bus.h
--- a/sys/arch/x68k/include/bus.h       Sun Nov 11 01:36:15 2001 +0000
+++ b/sys/arch/x68k/include/bus.h       Sun Nov 11 01:38:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.8 2001/07/19 15:32:20 thorpej Exp $  */
+/*     $NetBSD: bus.h,v 1.9 2001/11/11 01:38:00 isaki Exp $    */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -137,7 +137,10 @@
  * For simpler hadware, many x68k devices are mapped with shifted address
  * i.e. only on even or odd addresses.
  */
-#define BUS_SPACE_MAP_SHIFTED  0x1001
+#define BUS_SPACE_MAP_SHIFTED_MASK     0x1001
+#define BUS_SPACE_MAP_SHIFTED_ODD      0x1001
+#define BUS_SPACE_MAP_SHIFTED_EVEN     0x1000
+#define BUS_SPACE_MAP_SHIFTED          BUS_SPACE_MAP_SHIFTED_ODD
 
 #define bus_space_alloc(t,rs,re,s,a,b,f,r,h) \
                ((*((t)->x68k_bus_space_alloc)) ((t),(rs),(re),(s),(a),(b),(f),(r),(h)))



Home | Main Index | Thread Index | Old Index