Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm32 implement bus_space_vaddr()
details: https://anonhg.NetBSD.org/src/rev/45ff0730c7fb
branches: trunk
changeset: 485059:45ff0730c7fb
user: drochner <drochner%NetBSD.org@localhost>
date: Mon Apr 17 17:39:17 2000 +0000
description:
implement bus_space_vaddr()
diffstat:
sys/arch/arm32/footbridge/footbridge_com_io.c | 5 ++++-
sys/arch/arm32/footbridge/footbridge_io.c | 14 +++++++++++++-
sys/arch/arm32/include/bus.h | 15 ++++++++++++++-
sys/arch/arm32/iomd/iomd_io.c | 5 ++++-
sys/arch/arm32/isa/isa_io.c | 17 ++++++++++++++++-
sys/arch/arm32/mainbus/mainbus_io.c | 5 ++++-
sys/arch/arm32/podulebus/podulebus_io.c | 5 ++++-
7 files changed, 59 insertions(+), 7 deletions(-)
diffs (206 lines):
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/footbridge/footbridge_com_io.c
--- a/sys/arch/arm32/footbridge/footbridge_com_io.c Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/footbridge/footbridge_com_io.c Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_com_io.c,v 1.1 1998/09/06 02:20:34 mark Exp $ */
+/* $NetBSD: footbridge_com_io.c,v 1.2 2000/04/17 17:39:17 drochner Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -66,6 +66,9 @@
fcomcons_bs_alloc,
fcomcons_bs_free,
+ /* get kernel virtual address */
+ 0, /* never used */
+
/* barrier */
fcomcons_bs_barrier,
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/footbridge/footbridge_io.c
--- a/sys/arch/arm32/footbridge/footbridge_io.c Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/footbridge/footbridge_io.c Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_io.c,v 1.4 2000/01/10 07:43:07 mark Exp $ */
+/* $NetBSD: footbridge_io.c,v 1.5 2000/04/17 17:39:17 drochner Exp $ */
/*
* Copyright (c) 1997 Causality Limited
@@ -68,6 +68,9 @@
footbridge_bs_alloc,
footbridge_bs_free,
+ /* get kernel virtual address */
+ footbridge_bs_vaddr,
+
/* barrier */
footbridge_bs_barrier,
@@ -293,6 +296,15 @@
return (0);
}
+void *
+footbridge_bs_vaddr(t, bsh)
+ void *t;
+ bus_space_handle_t bsh;
+{
+
+ return ((void *)bsh);
+}
+
void
footbridge_bs_barrier(t, bsh, offset, len, flags)
void *t;
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/include/bus.h
--- a/sys/arch/arm32/include/bus.h Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/include/bus.h Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.18 2000/01/25 22:13:19 drochner Exp $ */
+/* $NetBSD: bus.h,v 1.19 2000/04/17 17:39:17 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -113,6 +113,9 @@
void (*bs_free) __P((void *, bus_space_handle_t,
bus_size_t));
+ /* get kernel virtual address */
+ void * (*bs_vaddr) __P((void *, bus_space_handle_t));
+
/* barrier */
void (*bs_barrier) __P((void *, bus_space_handle_t,
bus_size_t, bus_size_t, int));
@@ -249,6 +252,12 @@
(*(t)->bs_free)((t)->bs_cookie, (h), (s))
/*
+ * Get kernel virtual address for ranges mapped BUS_SPACE_MAP_LINEAR.
+ */
+#define bus_space_vaddr(t, h) \
+ (*(t)->bs_vaddr)((t)->bs_cookie, (h))
+
+/*
* Bus barrier operations.
*/
#define bus_space_barrier(t, h, o, l, f) \
@@ -393,6 +402,9 @@
void __bs_c(f,_bs_free) __P((void *t, bus_space_handle_t bsh, \
bus_size_t size));
+#define bs_vaddr_proto(f) \
+void * __bs_c(f,_bs_vaddr) __P((void *t, bus_space_handle_t bsh));
+
#define bs_barrier_proto(f) \
void __bs_c(f,_bs_barrier) __P((void *t, bus_space_handle_t bsh, \
bus_size_t offset, bus_size_t len, int flags));
@@ -551,6 +563,7 @@
bs_subregion_proto(f); \
bs_alloc_proto(f); \
bs_free_proto(f); \
+bs_vaddr_proto(f); \
bs_barrier_proto(f); \
bs_r_1_proto(f); \
bs_r_2_proto(f); \
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/iomd/iomd_io.c
--- a/sys/arch/arm32/iomd/iomd_io.c Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/iomd/iomd_io.c Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iomd_io.c,v 1.3 1998/07/05 23:31:16 mark Exp $ */
+/* $NetBSD: iomd_io.c,v 1.4 2000/04/17 17:39:17 drochner Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -61,6 +61,9 @@
iomd_bs_alloc,
iomd_bs_free,
+ /* get kernel virtual address */
+ 0, /* there is no linear mapping */
+
/* barrier */
iomd_bs_barrier,
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/isa/isa_io.c
--- a/sys/arch/arm32/isa/isa_io.c Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/isa/isa_io.c Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_io.c,v 1.6 1999/04/22 10:12:41 ross Exp $ */
+/* $NetBSD: isa_io.c,v 1.7 2000/04/17 17:39:18 drochner Exp $ */
/*
* Copyright 1997
@@ -71,6 +71,9 @@
isa_bs_alloc,
isa_bs_free,
+ /* get kernel virtual address */
+ isa_bs_vaddr,
+
/* barrier */
isa_bs_barrier,
@@ -146,6 +149,9 @@
isa_bs_alloc,
isa_bs_free,
+ /* get kernel virtual address */
+ isa_bs_vaddr,
+
/* barrier */
isa_bs_barrier,
@@ -288,6 +294,15 @@
panic("isa_free(): Help!\n");
}
+void *
+isa_bs_vaddr(t, bsh)
+ void *t;
+ bus_space_handle_t bsh;
+{
+
+ return ((void *)bsh);
+}
+
void
isa_bs_barrier(t, bsh, offset, len, flags)
void *t;
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/mainbus/mainbus_io.c
--- a/sys/arch/arm32/mainbus/mainbus_io.c Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/mainbus/mainbus_io.c Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus_io.c,v 1.4 1998/06/28 07:27:53 thorpej Exp $ */
+/* $NetBSD: mainbus_io.c,v 1.5 2000/04/17 17:39:18 drochner Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -60,6 +60,9 @@
mainbus_bs_alloc,
mainbus_bs_free,
+ /* get kernel virtual address */
+ 0, /* there is no linear mapping */
+
/* barrier */
mainbus_bs_barrier,
diff -r 6fe8ef2c9751 -r 45ff0730c7fb sys/arch/arm32/podulebus/podulebus_io.c
--- a/sys/arch/arm32/podulebus/podulebus_io.c Mon Apr 17 17:24:48 2000 +0000
+++ b/sys/arch/arm32/podulebus/podulebus_io.c Mon Apr 17 17:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus_io.c,v 1.7 1998/06/28 07:27:54 thorpej Exp $ */
+/* $NetBSD: podulebus_io.c,v 1.8 2000/04/17 17:39:18 drochner Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -60,6 +60,9 @@
podulebus_bs_alloc,
podulebus_bs_free,
+ /* get kernel virtual address */
+ 0, /* there is no linear mapping */
+
/* barrier */
podulebus_bs_barrier,
Home |
Main Index |
Thread Index |
Old Index