1 /* $NetBSD: bus.h,v 1.14 2006/11/16 01:32:38 christos Exp $ */
4 * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
34 * Copyright (C) 1997 Scott Reynolds. All rights reserved.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in the
43 * documentation and/or other materials provided with the distribution.
44 * 3. The name of the author may not be used to endorse or promote products
45 * derived from this software without specific prior written permission
47 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
48 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
49 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
50 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
51 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
52 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
53 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
54 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
56 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63 * Values for the hp300 bus space tag, not to be used directly by MI code.
65 #define HP300_BUS_SPACE_INTIO 0 /* space is intio space */
66 #define HP300_BUS_SPACE_DIO 1 /* space is dio space */
69 * Bus address and size types
71 typedef u_long bus_addr_t
;
72 typedef u_long bus_size_t
;
75 * Access methods for bus resources and address space.
77 typedef struct bus_space_tag
*bus_space_tag_t
;
78 typedef u_long bus_space_handle_t
;
81 * Implementation specific structures.
82 * XXX Don't use outside of bus_space definitions!
83 * XXX maybe this should be encapsuled in a non-global .h file?
86 struct bus_space_tag
{
89 uint8_t (*bsr1
)(bus_space_tag_t
, bus_space_handle_t
,
91 uint16_t (*bsr2
)(bus_space_tag_t
, bus_space_handle_t
,
93 uint32_t (*bsr4
)(bus_space_tag_t
, bus_space_handle_t
,
95 void (*bsrm1
)(bus_space_tag_t
, bus_space_handle_t
,
96 bus_size_t
, uint8_t *, bus_size_t
);
97 void (*bsrm2
)(bus_space_tag_t
, bus_space_handle_t
,
98 bus_size_t
, uint16_t *, bus_size_t
);
99 void (*bsrm4
)(bus_space_tag_t
, bus_space_handle_t
,
100 bus_size_t
, uint32_t *, bus_size_t
);
101 void (*bsrr1
)(bus_space_tag_t
, bus_space_handle_t
,
102 bus_size_t
, uint8_t *, bus_size_t
);
103 void (*bsrr2
)(bus_space_tag_t
, bus_space_handle_t
,
104 bus_size_t
, uint16_t *, bus_size_t
);
105 void (*bsrr4
)(bus_space_tag_t
, bus_space_handle_t
,
106 bus_size_t
, uint32_t *, bus_size_t
);
107 void (*bsw1
)(bus_space_tag_t
, bus_space_handle_t
,
108 bus_size_t
, uint8_t);
109 void (*bsw2
)(bus_space_tag_t
, bus_space_handle_t
,
110 bus_size_t
, uint16_t);
111 void (*bsw4
)(bus_space_tag_t
, bus_space_handle_t
,
112 bus_size_t
, uint32_t);
113 void (*bswm1
)(bus_space_tag_t
, bus_space_handle_t
,
114 bus_size_t
, const uint8_t *, bus_size_t
);
115 void (*bswm2
)(bus_space_tag_t
, bus_space_handle_t
,
116 bus_size_t
, const uint16_t *, bus_size_t
);
117 void (*bswm4
)(bus_space_tag_t
, bus_space_handle_t
,
118 bus_size_t
, const uint32_t *, bus_size_t
);
119 void (*bswr1
)(bus_space_tag_t
, bus_space_handle_t
,
120 bus_size_t
, const uint8_t *, bus_size_t
);
121 void (*bswr2
)(bus_space_tag_t
, bus_space_handle_t
,
122 bus_size_t
, const uint16_t *, bus_size_t
);
123 void (*bswr4
)(bus_space_tag_t
, bus_space_handle_t
,
124 bus_size_t
, const uint32_t *, bus_size_t
);
125 void (*bssm1
)(bus_space_tag_t
, bus_space_handle_t
,
126 bus_size_t
, uint8_t, bus_size_t
);
127 void (*bssm2
)(bus_space_tag_t
, bus_space_handle_t
,
128 bus_size_t
, uint16_t, bus_size_t
);
129 void (*bssm4
)(bus_space_tag_t
, bus_space_handle_t
,
130 bus_size_t
, uint32_t, bus_size_t
);
131 void (*bssr1
)(bus_space_tag_t
, bus_space_handle_t
,
132 bus_size_t
, uint8_t, bus_size_t
);
133 void (*bssr2
)(bus_space_tag_t
, bus_space_handle_t
,
134 bus_size_t
, uint16_t, bus_size_t
);
135 void (*bssr4
)(bus_space_tag_t
, bus_space_handle_t
,
136 bus_size_t
, uint32_t, bus_size_t
);
140 * int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
141 * bus_size_t size, int flags, bus_space_handle_t *bshp);
143 * Map a region of bus space.
146 #define BUS_SPACE_MAP_CACHEABLE 0x01
147 #define BUS_SPACE_MAP_LINEAR 0x02
148 #define BUS_SPACE_MAP_PREFETCHABLE 0x04
150 int bus_space_map(bus_space_tag_t
, bus_addr_t
, bus_size_t
,
151 int, bus_space_handle_t
*);
154 * void bus_space_unmap(bus_space_tag_t t,
155 * bus_space_handle_t bsh, bus_size_t size);
157 * Unmap a region of bus space.
160 void bus_space_unmap(bus_space_tag_t
, bus_space_handle_t
, bus_size_t
);
163 * int bus_space_subregion(bus_space_tag_t t,
164 * bus_space_handle_t bsh, bus_size_t offset, bus_size_t size,
165 * bus_space_handle_t *nbshp);
167 * Get a new handle for a subregion of an already-mapped area of bus space.
170 int bus_space_subregion(bus_space_tag_t t
, bus_space_handle_t bsh
,
171 bus_size_t offset
, bus_size_t size
, bus_space_handle_t
*nbshp
);
174 * int bus_space_alloc(bus_space_tag_t t, bus_addr_t, rstart,
175 * bus_addr_t rend, bus_size_t size, bus_size_t align,
176 * bus_size_t boundary, int flags, bus_addr_t *addrp,
177 * bus_space_handle_t *bshp);
179 * Allocate a region of bus space.
182 int bus_space_alloc(bus_space_tag_t t
, bus_addr_t rstart
,
183 bus_addr_t rend
, bus_size_t size
, bus_size_t align
,
184 bus_size_t boundary
, int cacheable
, bus_addr_t
*addrp
,
185 bus_space_handle_t
*bshp
);
188 * int bus_space_free(bus_space_tag_t t,
189 * bus_space_handle_t bsh, bus_size_t size);
191 * Free a region of bus space.
194 void bus_space_free(bus_space_tag_t t
, bus_space_handle_t bsh
,
198 * void *bus_space_vaddr(bus_space_tag_t, bus_space_handle_t);
200 * Get the kernel virtual address for the mapped bus space.
201 * Only allowed for regions mapped with BUS_SPACE_MAP_LINEAR.
204 #define bus_space_vaddr(t, h) (void *)(h)
207 * int hp300_bus_space_probe(bus_space_tag_t t,
208 * bus_space_handle_t bsh, bus_size_t offset, int sz);
210 * Probe the bus at t/bsh/offset, using sz as the size of the load.
212 * This is a machine-dependent extension, and is not to be used by
213 * machine-independent code.
216 int hp300_bus_space_probe(bus_space_tag_t t
,
217 bus_space_handle_t bsh
, bus_size_t offset
, int sz
);
220 * u_intN_t bus_space_read_N(bus_space_tag_t tag,
221 * bus_space_handle_t bsh, bus_size_t offset);
223 * Read a 1, 2, 4, or 8 byte quantity from bus space
224 * described by tag/handle/offset.
227 #define bus_space_read_1(t, h, o) \
228 (((t)->bsr1 != NULL) ? ((t)->bsr1)(t, h, o) : \
229 (*(volatile uint8_t *)((h) + (o))))
231 #define bus_space_read_2(t, h, o) \
232 (((t)->bsr2 != NULL) ? ((t)->bsr2)(t, h, o) : \
233 (*(volatile uint16_t *)((h) + (o))))
235 #define bus_space_read_4(t, h, o) \
236 (((t)->bsr4 != NULL) ? ((t)->bsr4)(t, h, o) : \
237 (*(volatile uint32_t *)((h) + (o))))
239 #if 0 /* Cause a link error for bus_space_read_8 */
240 #define bus_space_read_8(t, h, o) !!! bus_space_read_8 unimplemented !!!
244 * void bus_space_read_multi_N(bus_space_tag_t tag,
245 * bus_space_handle_t bsh, bus_size_t offset,
246 * u_intN_t *addr, size_t count);
248 * Read `count' 1, 2, 4, or 8 byte quantities from bus space
249 * described by tag/handle/offset and copy into buffer provided.
252 #define bus_space_read_multi_1(t, h, o, a, c) \
254 if ((t)->bsrm1 != NULL) \
255 ((t)->bsrm1)(t, h, o, a, c); \
261 1: movb %%a0@,%%a1@+ ; \
265 "r" ((h) + (o)), "g" (a), "g" (c) : \
266 "%a0","%a1","%d0"); \
268 } while (/* CONSTCOND */ 0)
270 #define bus_space_read_multi_2(t, h, o, a, c) \
272 if ((t)->bsrm2 != NULL) \
273 ((t)->bsrm2)(t, h, o, a, c); \
279 1: movw %%a0@,%%a1@+ ; \
283 "r" ((h) + (o)), "g" (a), "g" (c) : \
284 "%a0","%a1","%d0"); \
286 } while (/* CONSTCOND */ 0)
288 #define bus_space_read_multi_4(t, h, o, a, c) do { \
289 if ((t)->bsrm4 != NULL) \
290 ((t)->bsrm4)(t, h, o, a, c); \
296 1: movl %%a0@,%%a1@+ ; \
300 "r" ((h) + (o)), "g" (a), "g" (c) : \
301 "%a0","%a1","%d0"); \
303 } while (/* CONSTCOND */ 0)
305 #if 0 /* Cause a link error for bus_space_read_multi_8 */
306 #define bus_space_read_multi_8 !!! bus_space_read_multi_8 unimplemented !!!
310 * void bus_space_read_region_N(bus_space_tag_t tag,
311 * bus_space_handle_t bsh, bus_size_t offset,
312 * u_intN_t *addr, size_t count);
314 * Read `count' 1, 2, 4, or 8 byte quantities from bus space
315 * described by tag/handle and starting at `offset' and copy into
319 #define bus_space_read_region_1(t, h, o, a, c) \
321 if ((t)->bsrr1 != NULL) \
322 ((t)->bsrr1)(t, h, o, a, c); \
328 1: movb %%a0@+,%%a1@+ ; \
332 "r" ((h) + (o)), "g" (a), "g" (c) : \
333 "%a0","%a1","%d0"); \
335 } while (/* CONSTCOND */ 0)
337 #define bus_space_read_region_2(t, h, o, a, c) \
339 if ((t)->bsrr2 != NULL) \
340 ((t)->bsrr2)(t, h, o, a, c); \
346 1: movw %%a0@+,%%a1@+ ; \
350 "r" ((h) + (o)), "g" (a), "g" (c) : \
351 "%a0","%a1","%d0"); \
353 } while (/* CONSTCOND */ 0)
355 #define bus_space_read_region_4(t, h, o, a, c) \
357 if ((t)->bsrr4 != NULL) \
358 ((t)->bsrr4)(t, h, o, a, c); \
364 1: movl %%a0@+,%%a1@+ ; \
368 "r" ((h) + (o)), "g" (a), "g" (c) : \
369 "%a0","%a1","%d0"); \
371 } while (/* CONSTCOND */ 0)
373 #if 0 /* Cause a link error for bus_space_read_region_8 */
374 #define bus_space_read_region_8 !!! bus_space_read_region_8 unimplemented !!!
378 * void bus_space_write_N(bus_space_tag_t tag,
379 * bus_space_handle_t bsh, bus_size_t offset,
382 * Write the 1, 2, 4, or 8 byte value `value' to bus space
383 * described by tag/handle/offset.
386 #define bus_space_write_1(t, h, o, v) \
388 if ((t)->bsw1 != NULL) \
389 ((t)->bsw1)(t, h, o, v); \
391 ((void)(*(volatile uint8_t *)((h) + (o)) = (v))); \
392 } while (/* CONSTCOND */ 0)
394 #define bus_space_write_2(t, h, o, v) \
396 if ((t)->bsw2 != NULL) \
397 ((t)->bsw2)(t, h, o, v); \
399 ((void)(*(volatile uint16_t *)((h) + (o)) = (v))); \
400 } while (/* CONSTCOND */ 0)
402 #define bus_space_write_4(t, h, o, v) \
404 if ((t)->bsw4 != NULL) \
405 ((t)->bsw4)(t, h, o, v); \
407 ((void)(*(volatile uint32_t *)((h) + (o)) = (v))); \
408 } while (/* CONSTCOND */ 0)
410 #if 0 /* Cause a link error for bus_space_write_8 */
411 #define bus_space_write_8 !!! bus_space_write_8 not implemented !!!
415 * void bus_space_write_multi_N(bus_space_tag_t tag,
416 * bus_space_handle_t bsh, bus_size_t offset,
417 * const u_intN_t *addr, size_t count);
419 * Write `count' 1, 2, 4, or 8 byte quantities from the buffer
420 * provided to bus space described by tag/handle/offset.
423 #define bus_space_write_multi_1(t, h, o, a, c) \
425 if ((t)->bswm1 != NULL) \
426 ((t)->bswm1)(t, h, o, a, c); \
432 1: movb %%a1@+,%%a0@ ; \
436 "r" ((h) + (o)), "g" (a), "g" (c) : \
437 "%a0","%a1","%d0"); \
439 } while (/* CONSTCOND */ 0)
441 #define bus_space_write_multi_2(t, h, o, a, c) \
443 if ((t)->bswm2 != NULL) \
444 ((t)->bswm2)(t, h, o, a, c); \
450 1: movw %%a1@+,%%a0@ ; \
454 "r" ((h) + (o)), "g" (a), "g" (c) : \
455 "%a0","%a1","%d0"); \
457 } while (/* CONSTCOND */ 0)
459 #define bus_space_write_multi_4(t, h, o, a, c) \
462 if ((t)->bswm4 != NULL) \
463 ((t)->bswm4)(t, h, o, a, c); \
469 1: movl %%a1@+,%%a0@ ; \
473 "r" ((h) + (o)), "g" (a), "g" (c) : \
474 "%a0","%a1","%d0"); \
476 } while (/* CONSTCOND */ 0)
478 #if 0 /* Cause a link error for bus_space_write_8 */
479 #define bus_space_write_multi_8(t, h, o, a, c) \
480 !!! bus_space_write_multi_8 unimplimented !!!
484 * void bus_space_write_region_N(bus_space_tag_t tag,
485 * bus_space_handle_t bsh, bus_size_t offset,
486 * const u_intN_t *addr, size_t count);
488 * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided
489 * to bus space described by tag/handle starting at `offset'.
492 #define bus_space_write_region_1(t, h, o, a, c) \
494 if ((t)->bswr1 != NULL) \
495 ((t)->bswr1)(t, h, o, a, c); \
501 1: movb %%a1@+,%%a0@+ ; \
505 "r" ((h) + (o)), "g" (a), "g" (c) : \
506 "%a0","%a1","%d0"); \
508 } while (/* CONSTCOND */ 0)
510 #define bus_space_write_region_2(t, h, o, a, c) \
512 if ((t)->bswr2) != NULL) \
513 ((t)->bswr2)(t, h, o, a, c); \
519 1: movw %%a1@+,%%a0@+ ; \
523 "r" ((h) + (o)), "g" (a), "g" (c) : \
524 "%a0","%a1","%d0"); \
526 } while (/* CONSTCOND */ 0)
528 #define bus_space_write_region_4(t, h, o, a, c) \
530 if ((t)->bswr4) != NULL) \
531 ((t)->bswr4)(t, h, o, a, c); \
537 1: movl %%a1@+,%%a0@+ ; \
541 "r" ((h) + (o)), "g" (a), "g" (c) : \
542 "%a0","%a1","%d0"); \
544 } while (/* CONSTCOND */ 0)
546 #if 0 /* Cause a link error for bus_space_write_region_8 */
547 #define bus_space_write_region_8 \
548 !!! bus_space_write_region_8 unimplemented !!!
552 * void bus_space_set_multi_N(bus_space_tag_t tag,
553 * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val,
556 * Write the 1, 2, 4, or 8 byte value `val' to bus space described
557 * by tag/handle/offset `count' times.
560 #define bus_space_set_multi_1(t, h, o, val, c) \
562 if ((t)->bssm1 != NULL) \
563 ((t)->bssm1)(t, h, o, val, c); \
569 1: movb %%d1,%%a0@ ; \
573 "r" ((h) + (o)), "g" (val), "g" (c) : \
574 "%a0","%d0","%d1"); \
576 } while (/* CONSTCOND */ 0)
578 #define bus_space_set_multi_2(t, h, o, val, c) \
580 if ((t)->bssm2 != NULL) \
581 ((t)->bssm2)(t, h, o, val, c); \
587 1: movw %%d1,%%a0@ ; \
591 "r" ((h) + (o)), "g" (val), "g" (c) : \
592 "%a0","%d0","%d1"); \
594 } while (/* CONSTCOND */ 0)
596 #define bus_space_set_multi_4(t, h, o, val, c) \
598 if ((t)->bssm4 != NULL) \
599 ((t)->bssm4)(t, h, o, val, c); \
605 1: movl %%d1,%%a0@ ; \
609 "r" ((h) + (o)), "g" (val), "g" (c) : \
610 "%a0","%d0","%d1"); \
612 } while (/* CONSTCOND */ 0)
614 #if 0 /* Cause a link error for bus_space_set_multi_8 */
615 #define bus_space_set_multi_8 \
616 !!! bus_space_set_multi_8 unimplemented !!!
620 * void bus_space_set_region_N(bus_space_tag_t tag,
621 * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val,
624 * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described
625 * by tag/handle starting at `offset'.
628 #define bus_space_set_region_1(t, h, o, val, c) \
630 if ((t)->bssr1 != NULL) \
631 ((t)->bssr1)(t, h, o, val, c); \
637 1: movb %%d1,%%a0@+ ; \
641 "r" ((h) + (o)), "g" (val), "g" (c) : \
642 "%a0","%d0","%d1"); \
644 } while (/* CONSTCOND */ 0)
646 #define bus_space_set_region_2(t, h, o, val, c) \
648 if ((t)->bssr2 != NULL) \
649 ((t)->bssr2)(t, h, o, val, c); \
655 1: movw %%d1,%%a0@+ ; \
659 "r" ((h) + (o)), "g" (val), "g" (c) : \
660 "%a0","%d0","%d1"); \
662 } while (/* CONSTCOND */ 0)
664 #define bus_space_set_region_4(t, h, o, val, c) \
667 if ((t)->bssr4 != NULL) \
668 ((t)->bssr4)(t, h, o, val, c); \
674 1: movl %%d1,%%a0@+ ; \
678 "r" ((h) + (o)), "g" (val), "g" (c) : \
679 "%a0","%d0","%d1"); \
681 } while (/* CONSTCOND */ 0)
683 #if 0 /* Cause a link error for bus_space_set_region_8 */
684 #define bus_space_set_region_8 \
685 !!! bus_space_set_region_8 unimplemented !!!
689 * void bus_space_copy_region_N(bus_space_tag_t tag,
690 * bus_space_handle_t bsh1, bus_size_t off1,
691 * bus_space_handle_t bsh2, bus_size_t off2,
694 * Copy `count' 1, 2, 4, or 8 byte values from bus space starting
695 * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2.
698 #define __HP300_copy_region_N(BYTES) \
699 static __inline void \
700 __CONCAT(bus_space_copy_region_,BYTES)(bus_space_tag_t t, \
701 bus_space_handle_t h1, bus_size_t o1, bus_space_handle_t h2, \
702 bus_size_t o2, bus_size_t c) \
706 if ((h1 + o1) >= (h2 + o2)) { \
707 /* src after dest: copy forward */ \
708 for (o = 0; c != 0; c--, o += BYTES) \
709 __CONCAT(bus_space_write_,BYTES)(t, h2, o2 + o, \
710 __CONCAT(bus_space_read_,BYTES)(t, h1, o1 + o)); \
712 /* dest after src: copy backwards */ \
713 for (o = (c - 1) * BYTES; c != 0; c--, o -= BYTES) \
714 __CONCAT(bus_space_write_,BYTES)(t, h2, o2 + o, \
715 __CONCAT(bus_space_read_,BYTES)(t, h1, o1 + o)); \
718 __HP300_copy_region_N(1)
719 __HP300_copy_region_N(2)
720 __HP300_copy_region_N(4)
721 #if 0 /* Cause a link error for bus_space_copy_region_8 */
722 #define bus_space_copy_region_8 \
723 !!! bus_space_copy_region_8 unimplemented !!!
726 #undef __HP300_copy_region_N
729 * Bus read/write barrier methods.
731 * void bus_space_barrier(bus_space_tag_t tag,
732 * bus_space_handle_t bsh, bus_size_t offset,
733 * bus_size_t len, int flags);
735 * Note: the 680x0 does not currently require barriers, but we must
736 * provide the flags to MI code.
738 #define bus_space_barrier(t, h, o, l, f) \
739 ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f)))
740 #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
741 #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
743 #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
745 #endif /* _HP300_BUS_H_ */