-/* $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.
#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 !!!
#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 !!!