summaryrefslogtreecommitdiff
path: root/sys/arch/arc/include/bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/arc/include/bus.h')
-rw-r--r--sys/arch/arc/include/bus.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/sys/arch/arc/include/bus.h b/sys/arch/arc/include/bus.h
index 7b121c8c018..71ce3df4b49 100644
--- a/sys/arch/arc/include/bus.h
+++ b/sys/arch/arc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.8 1996/11/28 23:35:42 niklas Exp $ */
+/* $OpenBSD: bus.h,v 1.9 1997/01/10 23:41:25 pefo Exp $ */
/*
* Copyright (c) 1996 Niklas Hallqvist. All rights reserved.
@@ -70,18 +70,17 @@ bus_space_read(4,32)
#define bus_space_read_8 !!! bus_space_read_8 unimplemented !!!
-#define bus_space_read_multi(n, m) \
-static __inline void \
-CAT(bus_space_read_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_addr_t ba, CAT3(u_int,m,_t) *buf, bus_size_t cnt) \
-{ \
- while (cnt--) \
- *buf++ = CAT(bus_space_read_,n)(bst, bsh, ba); \
-}
+#define bus_space_read_multi_1(t, h, o, a, c) do { \
+ insb((h) + (o), (a), (c)); \
+ } while(0)
-bus_space_read_multi(1,8)
-bus_space_read_multi(2,16)
-bus_space_read_multi(4,32)
+#define bus_space_read_multi_2(t, h, o, a, c) do { \
+ insw((h) + (o), (a), (c)); \
+ } while(0)
+
+#define bus_space_read_multi_4(t, h, o, a, c) do { \
+ insl((h) + (o), (a), (c)); \
+ } while(0)
#define bus_space_read_multi_8 !!! bus_space_read_multi_8 not implemented !!!
@@ -99,18 +98,18 @@ bus_space_write(4,32)
#define bus_space_write_8 !!! bus_space_write_8 unimplemented !!!
-#define bus_space_write_multi(n, m) \
-static __inline void \
-CAT(bus_space_write_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
- bus_addr_t ba, const CAT3(u_int,m,_t) *buf, bus_size_t cnt) \
-{ \
- while (cnt--) \
- CAT(bus_space_write_,n)(bst, bsh, ba, *buf++); \
-}
-bus_space_write_multi(1,8)
-bus_space_write_multi(2,16)
-bus_space_write_multi(4,32)
+#define bus_space_write_multi_1(t, h, o, a, c) do { \
+ outsb((h) + (o), (a), (c)); \
+ } while(0)
+
+#define bus_space_write_multi_2(t, h, o, a, c) do { \
+ outsw((h) + (o), (a), (c)); \
+ } while(0)
+
+#define bus_space_write_multi_4(t, h, o, a, c) do { \
+ outsl((h) + (o), (a), (c)); \
+ } while(0)
#define bus_space_write_multi_8 !!! bus_space_write_multi_8 not implemented !!!