1/* $NetBSD: bus.h,v 1.11 2003/07/28 17:35:54 thorpej Exp $ */ 2 |
3/*-
|
2 * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
4 * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. |
5 * All rights reserved. 6 * 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. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 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. 19 * 3. All advertising materials mentioning features or use of this software 20 * must display the following acknowledgement: 21 * This product includes software developed by the NetBSD 22 * Foundation, Inc. and its contributors. 23 * 4. Neither the name of The NetBSD Foundation nor the names of its 24 * contributors may be used to endorse or promote products derived 25 * from this software without specific prior written permission. 26 * 27 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 28 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 29 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 31 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 */ 39 40/*- 41 * Copyright (c) 1996 Charles M. Hannum. All rights reserved. 42 * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 43 * 44 * Redistribution and use in source and binary forms, with or without 45 * modification, are permitted provided that the following conditions 46 * are met: 47 * 1. Redistributions of source code must retain the above copyright 48 * notice, this list of conditions and the following disclaimer. 49 * 2. Redistributions in binary form must reproduce the above copyright 50 * notice, this list of conditions and the following disclaimer in the 51 * documentation and/or other materials provided with the distribution. 52 * 3. All advertising materials mentioning features or use of this software 53 * must display the following acknowledgement: 54 * This product includes software developed by Christopher G. Demetriou 55 * for the NetBSD Project. 56 * 4. The name of the author may not be used to endorse or promote products 57 * derived from this software without specific prior written permission 58 * 59 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 60 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 61 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 62 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 63 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 64 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 65 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 66 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 67 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 68 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 69 *
|
68 * $NetBSD: bus.h,v 1.9.4.1 2000/06/30 16:27:30 simonb Exp $
69 * $FreeBSD: head/sys/powerpc/include/bus.h 165147 2006-12-13 03:25:31Z marcel $
|
70 * $FreeBSD: head/sys/powerpc/include/bus.h 174782 2007-12-19 18:00:50Z marcel $ |
71 */ 72
|
72#ifndef _MACPPC_BUS_H_
73#define _MACPPC_BUS_H_
|
73#ifndef _MACHINE_BUS_H_ 74#define _MACHINE_BUS_H_ |
75 76#include <machine/_bus.h>
|
76#include <machine/pio.h>
|
77
|
78#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
79#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
80#define BUS_SPACE_MAXSIZE 0xFFFFFFFF
81#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF
|
78#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) 79 80#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF |
81#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF
|
83#define BUS_SPACE_MAXADDR 0xFFFFFFFF
|
82#define BUS_SPACE_MAXADDR 0xFFFFFFFF 83#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF 84#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF 85#define BUS_SPACE_MAXSIZE 0xFFFFFFFF |
86
|
85#define BUS_SPACE_UNRESTRICTED (~0)
|
87#define BUS_SPACE_MAP_CACHEABLE 0x01 88#define BUS_SPACE_MAP_LINEAR 0x02 89#define BUS_SPACE_MAP_PREFETCHABLE 0x04 |
90
|
87/*
88 * Values for the macppc bus space tag, not to be used directly by MI code.
89 */
|
91#define BUS_SPACE_UNRESTRICTED (~0) |
92
|
91#define __BUS_SPACE_HAS_STREAM_METHODS 1
|
93#define BUS_SPACE_BARRIER_READ 0x01 94#define BUS_SPACE_BARRIER_WRITE 0x02 |
95
|
93/*
94 * Define the PPC tag values
95 */
96#define PPC_BUS_SPACE_MEM 1 /* space is mem space */
97#define PPC_BUS_SPACE_IO 2 /* space is io space */
|
96struct bus_space_access; |
97
|
99static __inline void *
100__ppc_ba(bus_space_tag_t tag __unused, bus_space_handle_t handle,
101 bus_size_t offset)
102{
103 return ((void *)(handle + offset));
104}
|
98struct bus_space { 99 /* mapping/unmapping */ 100 int (*bs_map)(bus_addr_t, bus_size_t, int, 101 bus_space_handle_t *); 102 void (*bs_unmap)(bus_size_t); 103 int (*bs_subregion)(bus_space_handle_t, bus_size_t, 104 bus_size_t, bus_space_handle_t *); |
105
|
106/*
107 * int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
108 * bus_size_t size, int flags, bus_space_handle_t *bshp));
109 *
110 * Map a region of bus space.
111 */
|
106 /* allocation/deallocation */ 107 int (*bs_alloc)(bus_addr_t, bus_addr_t, bus_size_t, 108 bus_size_t, bus_size_t, int, bus_addr_t *, bus_space_handle_t *); 109 void (*bs_free)(bus_space_handle_t, bus_size_t); |
110
|
113static __inline int
114bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr,
115 bus_size_t size __unused, int flags __unused,
116 bus_space_handle_t *bshp)
117{
|
111 void (*bs_barrier)(bus_space_handle_t, bus_size_t, 112 bus_size_t, int); |
113
|
119 *bshp = addr;
120 return (0);
121}
|
114 /* Read single. */ 115 uint8_t (*bs_r_1)(bus_space_handle_t, bus_size_t); 116 uint16_t (*bs_r_2)(bus_space_handle_t, bus_size_t); 117 uint32_t (*bs_r_4)(bus_space_handle_t, bus_size_t); 118 uint64_t (*bs_r_8)(bus_space_handle_t, bus_size_t); |
119
|
123/*
124 * int bus_space_unmap(bus_space_tag_t t,
125 * bus_space_handle_t bsh, bus_size_t size));
126 *
127 * Unmap a region of bus space.
128 */
|
120 uint16_t (*bs_r_s_2)(bus_space_handle_t, bus_size_t); 121 uint32_t (*bs_r_s_4)(bus_space_handle_t, bus_size_t); 122 uint64_t (*bs_r_s_8)(bus_space_handle_t, bus_size_t); |
123
|
130static __inline void
131bus_space_unmap(bus_space_tag_t t __unused, bus_space_handle_t bsh __unused,
132 bus_size_t size __unused)
133{
134}
|
124 /* read multiple */ 125 void (*bs_rm_1)(bus_space_handle_t, bus_size_t, uint8_t *, 126 bus_size_t); 127 void (*bs_rm_2)(bus_space_handle_t, bus_size_t, uint16_t *, 128 bus_size_t); 129 void (*bs_rm_4)(bus_space_handle_t, bus_size_t, uint32_t *, 130 bus_size_t); 131 void (*bs_rm_8)(bus_space_handle_t, bus_size_t, uint64_t *, 132 bus_size_t); |
133
|
136/*
137 * int bus_space_subregion(bus_space_tag_t t,
138 * bus_space_handle_t bsh, bus_size_t offset, bus_size_t size,
139 * bus_space_handle_t *nbshp));
140 *
141 * Get a new handle for a subregion of an already-mapped area of bus space.
142 */
|
134 void (*bs_rm_s_2)(bus_space_handle_t, bus_size_t, uint16_t *, 135 bus_size_t); 136 void (*bs_rm_s_4)(bus_space_handle_t, bus_size_t, uint32_t *, 137 bus_size_t); 138 void (*bs_rm_s_8)(bus_space_handle_t, bus_size_t, uint64_t *, 139 bus_size_t); |
140
|
144static __inline int
145bus_space_subregion(bus_space_tag_t t __unused, bus_space_handle_t bsh,
146 bus_size_t offset, bus_size_t size __unused, bus_space_handle_t *nbshp)
147{
148 *nbshp = bsh + offset;
149 return (0);
150}
|
141 /* read region */ 142 void (*bs_rr_1)(bus_space_handle_t, bus_size_t, uint8_t *, 143 bus_size_t); 144 void (*bs_rr_2)(bus_space_handle_t, bus_size_t, uint16_t *, 145 bus_size_t); 146 void (*bs_rr_4)(bus_space_handle_t, bus_size_t, uint32_t *, 147 bus_size_t); 148 void (*bs_rr_8)(bus_space_handle_t, bus_size_t, uint64_t *, 149 bus_size_t); |
150
|
152/*
153 * int bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart,
154 * bus_addr_t rend, bus_size_t size, bus_size_t align,
155 * bus_size_t boundary, int flags, bus_addr_t *addrp,
156 * bus_space_handle_t *bshp));
157 *
158 * Allocate a region of bus space.
159 */
|
151 void (*bs_rr_s_2)(bus_space_handle_t, bus_size_t, uint16_t *, 152 bus_size_t); 153 void (*bs_rr_s_4)(bus_space_handle_t, bus_size_t, uint32_t *, 154 bus_size_t); 155 void (*bs_rr_s_8)(bus_space_handle_t, bus_size_t, uint64_t *, 156 bus_size_t); |
157
|
161#if 0
162#define bus_space_alloc(t, rs, re, s, a, b, f, ap, hp) !!! unimplemented !!!
163#endif
|
158 /* write */ 159 void (*bs_w_1)(bus_space_handle_t, bus_size_t, uint8_t); 160 void (*bs_w_2)(bus_space_handle_t, bus_size_t, uint16_t); 161 void (*bs_w_4)(bus_space_handle_t, bus_size_t, uint32_t); 162 void (*bs_w_8)(bus_space_handle_t, bus_size_t, uint64_t); |
163
|
165/*
166 * int bus_space_free(bus_space_tag_t t,
167 * bus_space_handle_t bsh, bus_size_t size));
168 *
169 * Free a region of bus space.
170 */
171#if 0
172#define bus_space_free(t, h, s) !!! unimplemented !!!
173#endif
|
164 void (*bs_w_s_2)(bus_space_handle_t, bus_size_t, uint16_t); 165 void (*bs_w_s_4)(bus_space_handle_t, bus_size_t, uint32_t); 166 void (*bs_w_s_8)(bus_space_handle_t, bus_size_t, uint64_t); |
167
|
175/*
176 * u_intN_t bus_space_read_N(bus_space_tag_t tag,
177 * bus_space_handle_t bsh, bus_size_t offset));
178 *
179 * Read a 1, 2, 4, or 8 byte quantity from bus space
180 * described by tag/handle/offset.
181 */
|
168 /* write multiple */ 169 void (*bs_wm_1)(bus_space_handle_t, bus_size_t, 170 const uint8_t *, bus_size_t); 171 void (*bs_wm_2)(bus_space_handle_t, bus_size_t, 172 const uint16_t *, bus_size_t); 173 void (*bs_wm_4)(bus_space_handle_t, bus_size_t, 174 const uint32_t *, bus_size_t); 175 void (*bs_wm_8)(bus_space_handle_t, bus_size_t, 176 const uint64_t *, bus_size_t); |
177
|
183static __inline u_int8_t
184bus_space_read_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
185{
186 return (in8(__ppc_ba(t, h, o)));
187}
|
178 void (*bs_wm_s_2)(bus_space_handle_t, bus_size_t, 179 const uint16_t *, bus_size_t); 180 void (*bs_wm_s_4)(bus_space_handle_t, bus_size_t, 181 const uint32_t *, bus_size_t); 182 void (*bs_wm_s_8)(bus_space_handle_t, bus_size_t, 183 const uint64_t *, bus_size_t); |
184
|
189static __inline u_int16_t
190bus_space_read_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
191{
192 return (in16rb(__ppc_ba(t, h, o)));
193}
|
185 /* write region */ 186 void (*bs_wr_1)(bus_space_handle_t, bus_size_t, 187 const uint8_t *, bus_size_t); 188 void (*bs_wr_2)(bus_space_handle_t, bus_size_t, 189 const uint16_t *, bus_size_t); 190 void (*bs_wr_4)(bus_space_handle_t, bus_size_t, 191 const uint32_t *, bus_size_t); 192 void (*bs_wr_8)(bus_space_handle_t, bus_size_t, 193 const uint64_t *, bus_size_t); |
194
|
195static __inline u_int32_t
196bus_space_read_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
197{
198 return (in32rb(__ppc_ba(t, h, o)));
199}
|
195 void (*bs_wr_s_2)(bus_space_handle_t, bus_size_t, 196 const uint16_t *, bus_size_t); 197 void (*bs_wr_s_4)(bus_space_handle_t, bus_size_t, 198 const uint32_t *, bus_size_t); 199 void (*bs_wr_s_8)(bus_space_handle_t, bus_size_t, 200 const uint64_t *, bus_size_t); |
201
|
201#if 0 /* Cause a link error for bus_space_read_8 */
202#define bus_space_read_8(t, h, o) !!! unimplemented !!!
203#endif
|
202 /* set multiple */ 203 void (*bs_sm_1)(bus_space_handle_t, bus_size_t, uint8_t, 204 bus_size_t); 205 void (*bs_sm_2)(bus_space_handle_t, bus_size_t, uint16_t, 206 bus_size_t); 207 void (*bs_sm_4)(bus_space_handle_t, bus_size_t, uint32_t, 208 bus_size_t); 209 void (*bs_sm_8)(bus_space_handle_t, bus_size_t, uint64_t, 210 bus_size_t); |
211
|
205static __inline u_int8_t
206bus_space_read_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
207{
208 return (in8(__ppc_ba(t, h, o)));
209}
|
212 void (*bs_sm_s_2)(bus_space_handle_t, bus_size_t, uint16_t, 213 bus_size_t); 214 void (*bs_sm_s_4)(bus_space_handle_t, bus_size_t, uint32_t, 215 bus_size_t); 216 void (*bs_sm_s_8)(bus_space_handle_t, bus_size_t, uint64_t, 217 bus_size_t); |
218
|
211static __inline u_int16_t
212bus_space_read_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
213{
214 return (in16(__ppc_ba(t, h, o)));
215}
|
219 /* set region */ 220 void (*bs_sr_1)(bus_space_handle_t, bus_size_t, uint8_t, 221 bus_size_t); 222 void (*bs_sr_2)(bus_space_handle_t, bus_size_t, uint16_t, 223 bus_size_t); 224 void (*bs_sr_4)(bus_space_handle_t, bus_size_t, uint32_t, 225 bus_size_t); 226 void (*bs_sr_8)(bus_space_handle_t, bus_size_t, uint64_t, 227 bus_size_t); |
228
|
217static __inline u_int32_t
218bus_space_read_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
219{
220 return (in32(__ppc_ba(t, h, o)));
221}
|
229 void (*bs_sr_s_2)(bus_space_handle_t, bus_size_t, uint16_t, 230 bus_size_t); 231 void (*bs_sr_s_4)(bus_space_handle_t, bus_size_t, uint32_t, 232 bus_size_t); 233 void (*bs_sr_s_8)(bus_space_handle_t, bus_size_t, uint64_t, 234 bus_size_t); |
235
|
223#if 0 /* Cause a link error for bus_space_read_stream_8 */
224#define bus_space_read_stream_8(t, h, o) !!! unimplemented !!!
225#endif
|
236 /* copy region */ 237 void (*bs_cr_1)(bus_space_handle_t, bus_size_t, 238 bus_space_handle_t, bus_size_t, bus_size_t); 239 void (*bs_cr_2)(bus_space_handle_t, bus_size_t, 240 bus_space_handle_t, bus_size_t, bus_size_t); 241 void (*bs_cr_4)(bus_space_handle_t, bus_size_t, 242 bus_space_handle_t, bus_size_t, bus_size_t); 243 void (*bs_cr_8)(bus_space_handle_t, bus_size_t, 244 bus_space_handle_t, bus_size_t, bus_size_t); |
245
|
227/*
228 * void bus_space_read_multi_N(bus_space_tag_t tag,
229 * bus_space_handle_t bsh, bus_size_t offset,
230 * u_intN_t *addr, size_t count));
231 *
232 * Read `count' 1, 2, 4, or 8 byte quantities from bus space
233 * described by tag/handle/offset and copy into buffer provided.
234 */
|
246 void (*bs_cr_s_2)(bus_space_handle_t, bus_size_t, 247 bus_space_handle_t, bus_size_t, bus_size_t); 248 void (*bs_cr_s_4)(bus_space_handle_t, bus_size_t, 249 bus_space_handle_t, bus_size_t, bus_size_t); 250 void (*bs_cr_s_8)(bus_space_handle_t, bus_size_t, 251 bus_space_handle_t, bus_size_t, bus_size_t); 252}; |
253
|
236static __inline void
237bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
238 u_int8_t *a, size_t c)
239{
240 ins8(__ppc_ba(t, h, o), a, c);
241}
|
254extern struct bus_space bs_be_tag; 255extern struct bus_space bs_le_tag; |
256
|
243static __inline void
244bus_space_read_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
245 u_int16_t *a, size_t c)
246{
247 ins16rb(__ppc_ba(t, h, o), a, c);
248}
|
257#define __bs_c(a,b) __CONCAT(a,b) 258#define __bs_opname(op,size) __bs_c(__bs_c(__bs_c(bs_,op),_),size) |
259
|
250static __inline void
251bus_space_read_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
252 u_int32_t *a, size_t c)
253{
254 ins32rb(__ppc_ba(t, h, o), a, c);
255}
|
260#define __bs_rs(sz, t, h, o) \ 261 (*(t)->__bs_opname(r,sz))(h, o) 262#define __bs_ws(sz, t, h, o, v) \ 263 (*(t)->__bs_opname(w,sz))(h, o, v) 264#define __bs_nonsingle(type, sz, t, h, o, a, c) \ 265 (*(t)->__bs_opname(type,sz))(h, o, a, c) 266#define __bs_set(type, sz, t, h, o, v, c) \ 267 (*(t)->__bs_opname(type,sz))(h, o, v, c) 268#define __bs_copy(sz, t, h1, o1, h2, o2, cnt) \ 269 (*(t)->__bs_opname(c,sz))(h1, o1, h2, o2, cnt) |
270
|
257#if 0 /* Cause a link error for bus_space_read_multi_8 */
258#define bus_space_read_multi_8 !!! unimplemented !!!
259#endif
|
271/* 272 * Mapping and unmapping operations. 273 */ 274#define bus_space_map(t, a, s, c, hp) (*(t)->bs_map)(a, s, c, hp) 275#define bus_space_unmap(t, h, s) (*(t)->bs_unmap)(h, s) 276#define bus_space_subregion(t, h, o, s, hp) (*(t)->bs_subregion)(h, o, s, hp) |
277
|
261static __inline void
262bus_space_read_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h,
263 bus_size_t o, u_int8_t *a, size_t c)
264{
265 ins8(__ppc_ba(t, h, o), a, c);
266}
|
278/* 279 * Allocation and deallocation operations. 280 */ 281#define bus_space_alloc(t, rs, re, s, a, b, c, ap, hp) \ 282 (*(t)->bs_alloc)(rs, re, s, a, b, c, ap, hp) 283#define bus_space_free(t, h, s) \ 284 (*(t)->bs_free)(h, s) |
285
|
268static __inline void
269bus_space_read_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h,
270 bus_size_t o, u_int16_t *a, size_t c)
271{
272 ins16(__ppc_ba(t, h, o), a, c);
273}
|
286/* 287 * Bus barrier operations. 288 */ 289#define bus_space_barrier(t, h, o, l, f) (*(t)->bs_barrier)(h, o, l, f) |
290
|
275static __inline void
276bus_space_read_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h,
277 bus_size_t o, u_int32_t *a, size_t c)
278{
279 ins32(__ppc_ba(t, h, o), a, c);
280}
|
291/* 292 * Bus read (single) operations. 293 */ 294#define bus_space_read_1(t, h, o) __bs_rs(1,t,h,o) 295#define bus_space_read_2(t, h, o) __bs_rs(2,t,h,o) 296#define bus_space_read_4(t, h, o) __bs_rs(4,t,h,o) 297#define bus_space_read_8(t, h, o) __bs_rs(8,t,h,o) |
298
|
282#if 0 /* Cause a link error for bus_space_read_multi_stream_8 */
283#define bus_space_read_multi_stream_8 !!! unimplemented !!!
284#endif
|
299#define bus_space_read_stream_1 bus_space_read_1 300#define bus_space_read_stream_2(t, h, o) __bs_rs(s_2,t,h,o) 301#define bus_space_read_stream_4(t, h, o) __bs_rs(s_4,t,h,o) 302#define bus_space_read_stream_8(t, h, o) __bs_rs(s_8,t,h,o) |
303 304/*
|
287 * void bus_space_read_region_N(bus_space_tag_t tag,
288 * bus_space_handle_t bsh, bus_size_t offset,
289 * u_intN_t *addr, size_t count));
290 *
291 * Read `count' 1, 2, 4, or 8 byte quantities from bus space
292 * described by tag/handle and starting at `offset' and copy into
293 * buffer provided.
|
305 * Bus read multiple operations. |
306 */
|
307#define bus_space_read_multi_1(t, h, o, a, c) \ 308 __bs_nonsingle(rm,1,(t),(h),(o),(a),(c)) 309#define bus_space_read_multi_2(t, h, o, a, c) \ 310 __bs_nonsingle(rm,2,(t),(h),(o),(a),(c)) 311#define bus_space_read_multi_4(t, h, o, a, c) \ 312 __bs_nonsingle(rm,4,(t),(h),(o),(a),(c)) 313#define bus_space_read_multi_8(t, h, o, a, c) \ 314 __bs_nonsingle(rm,8,(t),(h),(o),(a),(c)) |
315
|
296static __inline void
297bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
298 bus_size_t offset, u_int8_t *addr, size_t count)
299{
300 volatile u_int8_t *s = __ppc_ba(tag, bsh, offset);
|
316#define bus_space_read_multi_stream_1 bus_space_read_multi_1 317#define bus_space_read_multi_stream_2(t, h, o, a, c) \ 318 __bs_nonsingle(rm,s_2,(t),(h),(o),(a),(c)) 319#define bus_space_read_multi_stream_4(t, h, o, a, c) \ 320 __bs_nonsingle(rm,s_4,(t),(h),(o),(a),(c)) 321#define bus_space_read_multi_stream_8(t, h, o, a, c) \ 322 __bs_nonsingle(rm,s_8,(t),(h),(o),(a),(c)) |
323
|
302 while (count--)
303 *addr++ = *s++;
304 __asm __volatile("eieio; sync");
305}
306
307static __inline void
308bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
309 bus_size_t offset, u_int16_t *addr, size_t count)
310{
311 volatile u_int16_t *s = __ppc_ba(tag, bsh, offset);
312
313 while (count--)
314 __asm __volatile("lhbrx %0, 0, %1" :
315 "=r"(*addr++) : "r"(s++));
316 __asm __volatile("eieio; sync");
317}
318
319static __inline void
320bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
321 bus_size_t offset, u_int32_t *addr, size_t count)
322{
323 volatile u_int32_t *s = __ppc_ba(tag, bsh, offset);
324
325 while (count--)
326 __asm __volatile("lwbrx %0, 0, %1" :
327 "=r"(*addr++) : "r"(s++));
328 __asm __volatile("eieio; sync");
329}
330
331#if 0 /* Cause a link error for bus_space_read_region_8 */
332#define bus_space_read_region_8 !!! unimplemented !!!
333#endif
334
335static __inline void
336bus_space_read_region_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh,
337 bus_size_t offset, u_int16_t *addr, size_t count)
338{
339 volatile u_int16_t *s = __ppc_ba(tag, bsh, offset);
340
341 while (count--)
342 *addr++ = *s++;
343 __asm __volatile("eieio; sync");
344}
345
346static __inline void
347bus_space_read_region_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh,
348 bus_size_t offset, u_int32_t *addr, size_t count)
349{
350 volatile u_int32_t *s = __ppc_ba(tag, bsh, offset);
351
352 while (count--)
353 *addr++ = *s++;
354 __asm __volatile("eieio; sync");
355}
356
357#if 0 /* Cause a link error */
358#define bus_space_read_region_stream_8 !!! unimplemented !!!
359#endif
360
|
324/*
|
362 * void bus_space_write_N(bus_space_tag_t tag,
363 * bus_space_handle_t bsh, bus_size_t offset,
364 * u_intN_t value));
365 *
366 * Write the 1, 2, 4, or 8 byte value `value' to bus space
367 * described by tag/handle/offset.
|
325 * Bus read region operations. |
326 */
|
327#define bus_space_read_region_1(t, h, o, a, c) \ 328 __bs_nonsingle(rr,1,(t),(h),(o),(a),(c)) 329#define bus_space_read_region_2(t, h, o, a, c) \ 330 __bs_nonsingle(rr,2,(t),(h),(o),(a),(c)) 331#define bus_space_read_region_4(t, h, o, a, c) \ 332 __bs_nonsingle(rr,4,(t),(h),(o),(a),(c)) 333#define bus_space_read_region_8(t, h, o, a, c) \ 334 __bs_nonsingle(rr,8,(t),(h),(o),(a),(c)) |
335
|
370static __inline void
371bus_space_write_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
372 uint8_t v)
373{
374 out8(__ppc_ba(t, h, o), v);
375}
|
336#define bus_space_read_region_stream_1 bus_space_read_region_1 337#define bus_space_read_region_stream_2(t, h, o, a, c) \ 338 __bs_nonsingle(rr,s_2,(t),(h),(o),(a),(c)) 339#define bus_space_read_region_stream_4(t, h, o, a, c) \ 340 __bs_nonsingle(rr,s_4,(t),(h),(o),(a),(c)) 341#define bus_space_read_region_stream_8(t, h, o, a, c) \ 342 __bs_nonsingle(rr,s_8,(t),(h),(o),(a),(c)) |
343
|
377static __inline void
378bus_space_write_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
379 uint16_t v)
380{
381 out16rb(__ppc_ba(t, h, o), v);
382}
383
384static __inline void
385bus_space_write_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
386 uint32_t v)
387{
388 out32rb(__ppc_ba(t, h, o), v);
389}
390
391#if 0 /* Cause a link error for bus_space_write_8 */
392#define bus_space_write_8 !!! unimplemented !!!
393#endif
394
395static __inline void
396bus_space_write_stream_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
397 uint8_t v)
398{
399 out8(__ppc_ba(t, h, o), v);
400}
401
402static __inline void
403bus_space_write_stream_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
404 uint16_t v)
405{
406 out16(__ppc_ba(t, h, o), v);
407}
408
409static __inline void
410bus_space_write_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
411 uint32_t v)
412{
413 out32(__ppc_ba(t, h, o), v);
414}
415
416#if 0 /* Cause a link error for bus_space_write_stream_8 */
417#define bus_space_write_stream_8 !!! unimplemented !!!
418#endif
419
420
|
344/*
|
422 * void bus_space_write_multi_N(bus_space_tag_t tag,
423 * bus_space_handle_t bsh, bus_size_t offset,
424 * const u_intN_t *addr, size_t count));
425 *
426 * Write `count' 1, 2, 4, or 8 byte quantities from the buffer
427 * provided to bus space described by tag/handle/offset.
|
345 * Bus write (single) operations. |
346 */
|
347#define bus_space_write_1(t, h, o, v) __bs_ws(1,(t),(h),(o),(v)) 348#define bus_space_write_2(t, h, o, v) __bs_ws(2,(t),(h),(o),(v)) 349#define bus_space_write_4(t, h, o, v) __bs_ws(4,(t),(h),(o),(v)) 350#define bus_space_write_8(t, h, o, v) __bs_ws(8,(t),(h),(o),(v)) |
351
|
430static __inline void
431bus_space_write_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
432 uint8_t *a, size_t c)
433{
434 outsb(__ppc_ba(t, h, o), a, c);
435}
|
352#define bus_space_write_stream_1 bus_space_write_1 353#define bus_space_write_stream_2(t, h, o, v) __bs_ws(s_2,(t),(h),(o),(v)) 354#define bus_space_write_stream_4(t, h, o, v) __bs_ws(s_4,(t),(h),(o),(v)) 355#define bus_space_write_stream_8(t, h, o, v) __bs_ws(s_8,(t),(h),(o),(v)) |
356
|
437static __inline void
438bus_space_write_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
439 uint16_t *a, size_t c)
440{
441 outsw(__ppc_ba(t, h, o), a, c);
442}
443
444static __inline void
445bus_space_write_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
446 uint32_t *a, size_t c)
447{
448 outsl(__ppc_ba(t, h, o), a, c);
449}
450
451#if 0
452#define bus_space_write_multi_8 !!! unimplemented !!!
453#endif
454
455static __inline void
456bus_space_write_multi_stream_1(bus_space_tag_t t, bus_space_handle_t h,
457 bus_size_t o, const u_int8_t *a, size_t c)
458{
459 outsb(__ppc_ba(t, h, o), a, c);
460}
461
462static __inline void
463bus_space_write_multi_stream_2(bus_space_tag_t t, bus_space_handle_t h,
464 bus_size_t o, const u_int16_t *a, size_t c)
465{
466 outsw(__ppc_ba(t, h, o), a, c);
467}
468
469static __inline void
470bus_space_write_multi_stream_4(bus_space_tag_t t, bus_space_handle_t h,
471 bus_size_t o, const u_int32_t *a, size_t c)
472{
473 outsl(__ppc_ba(t, h, o), a, c);
474}
475
476#if 0
477#define bus_space_write_multi_stream_8 !!! unimplemented !!!
478#endif
479
|
357/*
|
481 * void bus_space_write_region_N(bus_space_tag_t tag,
482 * bus_space_handle_t bsh, bus_size_t offset,
483 * const u_intN_t *addr, size_t count));
484 *
485 * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided
486 * to bus space described by tag/handle starting at `offset'.
|
358 * Bus write multiple operations. |
359 */
|
360#define bus_space_write_multi_1(t, h, o, a, c) \ 361 __bs_nonsingle(wm,1,(t),(h),(o),(a),(c)) 362#define bus_space_write_multi_2(t, h, o, a, c) \ 363 __bs_nonsingle(wm,2,(t),(h),(o),(a),(c)) 364#define bus_space_write_multi_4(t, h, o, a, c) \ 365 __bs_nonsingle(wm,4,(t),(h),(o),(a),(c)) 366#define bus_space_write_multi_8(t, h, o, a, c) \ 367 __bs_nonsingle(wm,8,(t),(h),(o),(a),(c)) |
368
|
489static __inline void
490bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
491 bus_size_t offset, const u_int8_t *addr, size_t count)
492{
493 volatile u_int8_t *d = __ppc_ba(tag, bsh, offset);
|
369#define bus_space_write_multi_stream_1 bus_space_write_multi_1 370#define bus_space_write_multi_stream_2(t, h, o, a, c) \ 371 __bs_nonsingle(wm,s_2,(t),(h),(o),(a),(c)) 372#define bus_space_write_multi_stream_4(t, h, o, a, c) \ 373 __bs_nonsingle(wm,s_4,(t),(h),(o),(a),(c)) 374#define bus_space_write_multi_stream_8(t, h, o, a, c) \ 375 __bs_nonsingle(wm,s_8,(t),(h),(o),(a),(c)) |
376
|
495 while (count--)
496 *d++ = *addr++;
497 __asm __volatile("eieio; sync");
498}
499
500static __inline void
501bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
502 bus_size_t offset, const u_int16_t *addr, size_t count)
503{
504 volatile u_int16_t *d = __ppc_ba(tag, bsh, offset);
505
506 while (count--)
507 __asm __volatile("sthbrx %0, 0, %1" ::
508 "r"(*addr++), "r"(d++));
509 __asm __volatile("eieio; sync");
510}
511
512static __inline void
513bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
514 bus_size_t offset, const u_int32_t *addr, size_t count)
515{
516 volatile u_int32_t *d = __ppc_ba(tag, bsh, offset);
517
518 while (count--)
519 __asm __volatile("stwbrx %0, 0, %1" ::
520 "r"(*addr++), "r"(d++));
521 __asm __volatile("eieio; sync");
522}
523
524#if 0
525#define bus_space_write_region_8 !!! bus_space_write_region_8 unimplemented !!!
526#endif
527
528static __inline void
529bus_space_write_region_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh,
530 bus_size_t offset, const u_int16_t *addr, size_t count)
531{
532 volatile u_int16_t *d = __ppc_ba(tag, bsh, offset);
533
534 while (count--)
535 *d++ = *addr++;
536 __asm __volatile("eieio; sync");
537}
538
539static __inline void
540bus_space_write_region_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh,
541 bus_size_t offset, const u_int32_t *addr, size_t count)
542{
543 volatile u_int32_t *d = __ppc_ba(tag, bsh, offset);
544
545 while (count--)
546 *d++ = *addr++;
547 __asm __volatile("eieio; sync");
548}
549
550#if 0
551#define bus_space_write_region_stream_8 !!! unimplemented !!!
552#endif
553
|
377/*
|
555 * void bus_space_set_multi_N(bus_space_tag_t tag,
556 * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val,
557 * size_t count));
558 *
559 * Write the 1, 2, 4, or 8 byte value `val' to bus space described
560 * by tag/handle/offset `count' times.
|
378 * Bus write region operations. |
379 */
|
380#define bus_space_write_region_1(t, h, o, a, c) \ 381 __bs_nonsingle(wr,1,(t),(h),(o),(a),(c)) 382#define bus_space_write_region_2(t, h, o, a, c) \ 383 __bs_nonsingle(wr,2,(t),(h),(o),(a),(c)) 384#define bus_space_write_region_4(t, h, o, a, c) \ 385 __bs_nonsingle(wr,4,(t),(h),(o),(a),(c)) 386#define bus_space_write_region_8(t, h, o, a, c) \ 387 __bs_nonsingle(wr,8,(t),(h),(o),(a),(c)) |
388
|
563static __inline void
564bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
565 bus_size_t offset, u_int8_t val, size_t count)
566{
567 volatile u_int8_t *d = __ppc_ba(tag, bsh, offset);
|
389#define bus_space_write_region_stream_1 bus_space_write_region_1 390#define bus_space_write_region_stream_2(t, h, o, a, c) \ 391 __bs_nonsingle(wr,s_2,(t),(h),(o),(a),(c)) 392#define bus_space_write_region_stream_4(t, h, o, a, c) \ 393 __bs_nonsingle(wr,s_4,(t),(h),(o),(a),(c)) 394#define bus_space_write_region_stream_8(t, h, o, a, c) \ 395 __bs_nonsingle(wr,s_8,(t),(h),(o),(a),(c)) |
396
|
569 while (count--)
570 *d = val;
571 __asm __volatile("eieio; sync");
572}
573
574static __inline void
575bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
576 bus_size_t offset, u_int16_t val, size_t count)
577{
578 volatile u_int16_t *d = __ppc_ba(tag, bsh, offset);
579
580 while (count--)
581 __asm __volatile("sthbrx %0, 0, %1" ::
582 "r"(val), "r"(d));
583 __asm __volatile("eieio; sync");
584}
585
586static __inline void
587bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
588 bus_size_t offset, u_int32_t val, size_t count)
589{
590 volatile u_int32_t *d = __ppc_ba(tag, bsh, offset);
591
592 while (count--)
593 __asm __volatile("stwbrx %0, 0, %1" ::
594 "r"(val), "r"(d));
595 __asm __volatile("eieio; sync");
596}
597
598#if 0
599#define bus_space_set_multi_8 !!! bus_space_set_multi_8 unimplemented !!!
600#endif
601
602static __inline void
603bus_space_set_multi_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh,
604 bus_size_t offset, u_int16_t val, size_t count)
605{
606 volatile u_int16_t *d = __ppc_ba(tag, bsh, offset);
607
608 while (count--)
609 *d = val;
610 __asm __volatile("eieio; sync");
611}
612
613static __inline void
614bus_space_set_multi_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh,
615 bus_size_t offset, u_int32_t val, size_t count)
616{
617 volatile u_int32_t *d = __ppc_ba(tag, bsh, offset);
618
619 while (count--)
620 *d = val;
621 __asm __volatile("eieio; sync");
622}
623
624#if 0
625#define bus_space_set_multi_stream_8 !!! unimplemented !!!
626#endif
627
|
397/*
|
629 * void bus_space_set_region_N(bus_space_tag_t tag,
630 * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val,
631 * size_t count));
632 *
633 * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described
634 * by tag/handle starting at `offset'.
|
398 * Set multiple operations. |
399 */
|
400#define bus_space_set_multi_1(t, h, o, v, c) \ 401 __bs_set(sm,1,(t),(h),(o),(v),(c)) 402#define bus_space_set_multi_2(t, h, o, v, c) \ 403 __bs_set(sm,2,(t),(h),(o),(v),(c)) 404#define bus_space_set_multi_4(t, h, o, v, c) \ 405 __bs_set(sm,4,(t),(h),(o),(v),(c)) 406#define bus_space_set_multi_8(t, h, o, v, c) \ 407 __bs_set(sm,8,(t),(h),(o),(v),(c)) |
408
|
637static __inline void
638bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
639 bus_size_t offset, u_int8_t val, size_t count)
640{
641 volatile u_int8_t *d = __ppc_ba(tag, bsh, offset);
|
409#define bus_space_set_multi_stream_1 bus_space_set_multi_1 410#define bus_space_set_multi_stream_2(t, h, o, v, c) \ 411 __bs_set(sm,s_2,(t),(h),(o),(v),(c)) 412#define bus_space_set_multi_stream_4(t, h, o, v, c) \ 413 __bs_set(sm,s_4,(t),(h),(o),(v),(c)) 414#define bus_space_set_multi_stream_8(t, h, o, v, c) \ 415 __bs_set(sm,s_8,(t),(h),(o),(v),(c)) |
416
|
643 while (count--)
644 *d++ = val;
645 __asm __volatile("eieio; sync");
646}
647
648static __inline void
649bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
650 bus_size_t offset, u_int16_t val, size_t count)
651{
652 volatile u_int16_t *d = __ppc_ba(tag, bsh, offset);
653
654 while (count--)
655 __asm __volatile("sthbrx %0, 0, %1" ::
656 "r"(val), "r"(d++));
657 __asm __volatile("eieio; sync");
658}
659
660static __inline void
661bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
662 bus_size_t offset, u_int32_t val, size_t count)
663{
664 volatile u_int32_t *d = __ppc_ba(tag, bsh, offset);
665
666 while (count--)
667 __asm __volatile("stwbrx %0, 0, %1" ::
668 "r"(val), "r"(d++));
669 __asm __volatile("eieio; sync");
670}
671
672#if 0
673#define bus_space_set_region_8 !!! bus_space_set_region_8 unimplemented !!!
674#endif
675
676static __inline void
677bus_space_set_region_stream_2(bus_space_tag_t tag, bus_space_handle_t bsh,
678 bus_size_t offset, u_int16_t val, size_t count)
679{
680 volatile u_int16_t *d = __ppc_ba(tag, bsh, offset);
681
682 while (count--)
683 *d++ = val;
684 __asm __volatile("eieio; sync");
685}
686
687static __inline void
688bus_space_set_region_stream_4(bus_space_tag_t tag, bus_space_handle_t bsh,
689 bus_size_t offset, u_int32_t val, size_t count)
690{
691 volatile u_int32_t *d = __ppc_ba(tag, bsh, offset);
692
693 while (count--)
694 *d++ = val;
695 __asm __volatile("eieio; sync");
696}
697
698#if 0
699#define bus_space_set_region_stream_8 !!! unimplemented !!!
700#endif
701
|
417/*
|
703 * void bus_space_copy_region_N(bus_space_tag_t tag,
704 * bus_space_handle_t bsh1, bus_size_t off1,
705 * bus_space_handle_t bsh2, bus_size_t off2,
706 * size_t count));
707 *
708 * Copy `count' 1, 2, 4, or 8 byte values from bus space starting
709 * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2.
|
418 * Set region operations. |
419 */
|
420#define bus_space_set_region_1(t, h, o, v, c) \ 421 __bs_set(sr,1,(t),(h),(o),(v),(c)) 422#define bus_space_set_region_2(t, h, o, v, c) \ 423 __bs_set(sr,2,(t),(h),(o),(v),(c)) 424#define bus_space_set_region_4(t, h, o, v, c) \ 425 __bs_set(sr,4,(t),(h),(o),(v),(c)) 426#define bus_space_set_region_8(t, h, o, v, c) \ 427 __bs_set(sr,8,(t),(h),(o),(v),(c)) |
428
|
712 /* XXX IMPLEMENT bus_space_copy_N() XXX */
|
429#define bus_space_set_region_stream_1 bus_space_set_region_1 430#define bus_space_set_region_stream_2(t, h, o, v, c) \ 431 __bs_set(sr,s_2,(t),(h),(o),(v),(c)) 432#define bus_space_set_region_stream_4(t, h, o, v, c) \ 433 __bs_set(sr,s_4,(t),(h),(o),(v),(c)) 434#define bus_space_set_region_stream_8(t, h, o, v, c) \ 435 __bs_set(sr,s_8,(t),(h),(o),(v),(c)) |
436
|
437#if 0 |
438/*
|
715 * Bus read/write barrier methods.
716 *
717 * void bus_space_barrier(bus_space_tag_t tag,
718 * bus_space_handle_t bsh, bus_size_t offset,
719 * bus_size_t len, int flags));
720 *
721 * Note: the macppc does not currently require barriers, but we must
722 * provide the flags to MI code.
|
439 * Copy operations. |
440 */
|
441#define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \ 442 __bs_copy(1, t, h1, o1, h2, o2, c) 443#define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \ 444 __bs_copy(2, t, h1, o1, h2, o2, c) 445#define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \ 446 __bs_copy(4, t, h1, o1, h2, o2, c) 447#define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ 448 __bs_copy(8, t, h1, o1, h2, o2, c) |
449
|
725#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
726#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
|
450#define bus_space_copy_region_stream_1 bus_space_copy_region_1 451#define bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) \ 452 __bs_copy(s_2, t, h1, o1, h2, o2, c) 453#define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ 454 __bs_copy(s_4, t, h1, o1, h2, o2, c) 455#define bus_space_copy_region_stream_8(t, h1, o1, h2, o2, c) \ 456 __bs_copy(s_8, t, h1, o1, h2, o2, c) 457#endif |
458
|
728static __inline void
729bus_space_barrier(bus_space_tag_t tag __unused,
730 bus_space_handle_t bsh __unused, bus_size_t offset __unused,
731 bus_size_t len __unused, int flags __unused)
732{
733 __asm __volatile("" : : : "memory");
734}
735
736
737#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
738
|
459#include <machine/bus_dma.h> 460
|
741#endif /* _MACPPC_BUS_H_ */
|
461#endif /* _MACHINE_BUS_H_ */ |
|