| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: bus_funcs.h,v 1.10 2020/09/05 16:04:31 jakllsch Exp $ */ | | 1 | /* $NetBSD: bus_funcs.h,v 1.11 2021/01/24 13:33:56 martin Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center. | | 9 | * NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -140,192 +140,226 @@ | | | @@ -140,192 +140,226 @@ |
140 | | | 140 | |
141 | /* | | 141 | /* |
142 | * Bus barrier operations. | | 142 | * Bus barrier operations. |
143 | */ | | 143 | */ |
144 | #define bus_space_barrier(t, h, o, l, f) \ | | 144 | #define bus_space_barrier(t, h, o, l, f) \ |
145 | (*(t)->bs_barrier)((t)->bs_cookie, (h), (o), (l), (f)) | | 145 | (*(t)->bs_barrier)((t)->bs_cookie, (h), (o), (l), (f)) |
146 | | | 146 | |
147 | /* | | 147 | /* |
148 | * Bus read (single) operations. | | 148 | * Bus read (single) operations. |
149 | */ | | 149 | */ |
150 | #define bus_space_read_1(t, h, o) __bs_rs(1,(t),(h),(o)) | | 150 | #define bus_space_read_1(t, h, o) __bs_rs(1,(t),(h),(o)) |
151 | #define bus_space_read_2(t, h, o) __bs_rs(2,(t),(h),(o)) | | 151 | #define bus_space_read_2(t, h, o) __bs_rs(2,(t),(h),(o)) |
152 | #define bus_space_read_4(t, h, o) __bs_rs(4,(t),(h),(o)) | | 152 | #define bus_space_read_4(t, h, o) __bs_rs(4,(t),(h),(o)) |
| | | 153 | #ifdef __HAVE_BUS_SPACE_8 |
153 | #define bus_space_read_8(t, h, o) __bs_rs(8,(t),(h),(o)) | | 154 | #define bus_space_read_8(t, h, o) __bs_rs(8,(t),(h),(o)) |
| | | 155 | #endif |
154 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS | | 156 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS |
155 | #define bus_space_read_stream_1(t, h, o) __bs_rs_s(1,(t),(h),(o)) | | 157 | #define bus_space_read_stream_1(t, h, o) __bs_rs_s(1,(t),(h),(o)) |
156 | #define bus_space_read_stream_2(t, h, o) __bs_rs_s(2,(t),(h),(o)) | | 158 | #define bus_space_read_stream_2(t, h, o) __bs_rs_s(2,(t),(h),(o)) |
157 | #define bus_space_read_stream_4(t, h, o) __bs_rs_s(4,(t),(h),(o)) | | 159 | #define bus_space_read_stream_4(t, h, o) __bs_rs_s(4,(t),(h),(o)) |
| | | 160 | #ifdef __HAVE_BUS_SPACE_8 |
158 | #define bus_space_read_stream_8(t, h, o) __bs_rs_s(8,(t),(h),(o)) | | 161 | #define bus_space_read_stream_8(t, h, o) __bs_rs_s(8,(t),(h),(o)) |
159 | #endif | | 162 | #endif |
| | | 163 | #endif |
160 | | | 164 | |
161 | | | 165 | |
162 | /* | | 166 | /* |
163 | * Bus read multiple operations. | | 167 | * Bus read multiple operations. |
164 | */ | | 168 | */ |
165 | #define bus_space_read_multi_1(t, h, o, a, c) \ | | 169 | #define bus_space_read_multi_1(t, h, o, a, c) \ |
166 | __bs_nonsingle(rm,1,(t),(h),(o),(a),(c)) | | 170 | __bs_nonsingle(rm,1,(t),(h),(o),(a),(c)) |
167 | #define bus_space_read_multi_2(t, h, o, a, c) \ | | 171 | #define bus_space_read_multi_2(t, h, o, a, c) \ |
168 | __bs_nonsingle(rm,2,(t),(h),(o),(a),(c)) | | 172 | __bs_nonsingle(rm,2,(t),(h),(o),(a),(c)) |
169 | #define bus_space_read_multi_4(t, h, o, a, c) \ | | 173 | #define bus_space_read_multi_4(t, h, o, a, c) \ |
170 | __bs_nonsingle(rm,4,(t),(h),(o),(a),(c)) | | 174 | __bs_nonsingle(rm,4,(t),(h),(o),(a),(c)) |
| | | 175 | #ifdef __HAVE_BUS_SPACE_8 |
171 | #define bus_space_read_multi_8(t, h, o, a, c) \ | | 176 | #define bus_space_read_multi_8(t, h, o, a, c) \ |
172 | __bs_nonsingle(rm,8,(t),(h),(o),(a),(c)) | | 177 | __bs_nonsingle(rm,8,(t),(h),(o),(a),(c)) |
| | | 178 | #endif |
173 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS | | 179 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS |
174 | #define bus_space_read_multi_stream_1(t, h, o, a, c) \ | | 180 | #define bus_space_read_multi_stream_1(t, h, o, a, c) \ |
175 | __bs_nonsingle_s(rm,1,(t),(h),(o),(a),(c)) | | 181 | __bs_nonsingle_s(rm,1,(t),(h),(o),(a),(c)) |
176 | #define bus_space_read_multi_stream_2(t, h, o, a, c) \ | | 182 | #define bus_space_read_multi_stream_2(t, h, o, a, c) \ |
177 | __bs_nonsingle_s(rm,2,(t),(h),(o),(a),(c)) | | 183 | __bs_nonsingle_s(rm,2,(t),(h),(o),(a),(c)) |
178 | #define bus_space_read_multi_stream_4(t, h, o, a, c) \ | | 184 | #define bus_space_read_multi_stream_4(t, h, o, a, c) \ |
179 | __bs_nonsingle_s(rm,4,(t),(h),(o),(a),(c)) | | 185 | __bs_nonsingle_s(rm,4,(t),(h),(o),(a),(c)) |
| | | 186 | #ifdef __HAVE_BUS_SPACE_8 |
180 | #define bus_space_read_multi_stream_8(t, h, o, a, c) \ | | 187 | #define bus_space_read_multi_stream_8(t, h, o, a, c) \ |
181 | __bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c)) | | 188 | __bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c)) |
182 | #endif | | 189 | #endif |
| | | 190 | #endif |
183 | | | 191 | |
184 | | | 192 | |
185 | /* | | 193 | /* |
186 | * Bus read region operations. | | 194 | * Bus read region operations. |
187 | */ | | 195 | */ |
188 | #define bus_space_read_region_1(t, h, o, a, c) \ | | 196 | #define bus_space_read_region_1(t, h, o, a, c) \ |
189 | __bs_nonsingle(rr,1,(t),(h),(o),(a),(c)) | | 197 | __bs_nonsingle(rr,1,(t),(h),(o),(a),(c)) |
190 | #define bus_space_read_region_2(t, h, o, a, c) \ | | 198 | #define bus_space_read_region_2(t, h, o, a, c) \ |
191 | __bs_nonsingle(rr,2,(t),(h),(o),(a),(c)) | | 199 | __bs_nonsingle(rr,2,(t),(h),(o),(a),(c)) |
192 | #define bus_space_read_region_4(t, h, o, a, c) \ | | 200 | #define bus_space_read_region_4(t, h, o, a, c) \ |
193 | __bs_nonsingle(rr,4,(t),(h),(o),(a),(c)) | | 201 | __bs_nonsingle(rr,4,(t),(h),(o),(a),(c)) |
| | | 202 | #ifdef __HAVE_BUS_SPACE_8 |
194 | #define bus_space_read_region_8(t, h, o, a, c) \ | | 203 | #define bus_space_read_region_8(t, h, o, a, c) \ |
195 | __bs_nonsingle(rr,8,(t),(h),(o),(a),(c)) | | 204 | __bs_nonsingle(rr,8,(t),(h),(o),(a),(c)) |
| | | 205 | #endif |
196 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS | | 206 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS |
197 | #define bus_space_read_region_stream_1(t, h, o, a, c) \ | | 207 | #define bus_space_read_region_stream_1(t, h, o, a, c) \ |
198 | __bs_nonsingle_s(rr,1,(t),(h),(o),(a),(c)) | | 208 | __bs_nonsingle_s(rr,1,(t),(h),(o),(a),(c)) |
199 | #define bus_space_read_region_stream_2(t, h, o, a, c) \ | | 209 | #define bus_space_read_region_stream_2(t, h, o, a, c) \ |
200 | __bs_nonsingle_s(rr,2,(t),(h),(o),(a),(c)) | | 210 | __bs_nonsingle_s(rr,2,(t),(h),(o),(a),(c)) |
201 | #define bus_space_read_region_stream_4(t, h, o, a, c) \ | | 211 | #define bus_space_read_region_stream_4(t, h, o, a, c) \ |
202 | __bs_nonsingle_s(rr,4,(t),(h),(o),(a),(c)) | | 212 | __bs_nonsingle_s(rr,4,(t),(h),(o),(a),(c)) |
| | | 213 | #ifdef __HAVE_BUS_SPACE_8 |
203 | #define bus_space_read_region_stream_8(t, h, o, a, c) \ | | 214 | #define bus_space_read_region_stream_8(t, h, o, a, c) \ |
204 | __bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c)) | | 215 | __bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c)) |
205 | #endif | | 216 | #endif |
| | | 217 | #endif |
206 | | | 218 | |
207 | | | 219 | |
208 | /* | | 220 | /* |
209 | * Bus write (single) operations. | | 221 | * Bus write (single) operations. |
210 | */ | | 222 | */ |
211 | #define bus_space_write_1(t, h, o, v) __bs_ws(1,(t),(h),(o),(v)) | | 223 | #define bus_space_write_1(t, h, o, v) __bs_ws(1,(t),(h),(o),(v)) |
212 | #define bus_space_write_2(t, h, o, v) __bs_ws(2,(t),(h),(o),(v)) | | 224 | #define bus_space_write_2(t, h, o, v) __bs_ws(2,(t),(h),(o),(v)) |
213 | #define bus_space_write_4(t, h, o, v) __bs_ws(4,(t),(h),(o),(v)) | | 225 | #define bus_space_write_4(t, h, o, v) __bs_ws(4,(t),(h),(o),(v)) |
| | | 226 | #ifdef __HAVE_BUS_SPACE_8 |
214 | #define bus_space_write_8(t, h, o, v) __bs_ws(8,(t),(h),(o),(v)) | | 227 | #define bus_space_write_8(t, h, o, v) __bs_ws(8,(t),(h),(o),(v)) |
| | | 228 | #endif |
215 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS | | 229 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS |
216 | #define bus_space_write_stream_1(t, h, o, v) __bs_ws_s(1,(t),(h),(o),(v)) | | 230 | #define bus_space_write_stream_1(t, h, o, v) __bs_ws_s(1,(t),(h),(o),(v)) |
217 | #define bus_space_write_stream_2(t, h, o, v) __bs_ws_s(2,(t),(h),(o),(v)) | | 231 | #define bus_space_write_stream_2(t, h, o, v) __bs_ws_s(2,(t),(h),(o),(v)) |
218 | #define bus_space_write_stream_4(t, h, o, v) __bs_ws_s(4,(t),(h),(o),(v)) | | 232 | #define bus_space_write_stream_4(t, h, o, v) __bs_ws_s(4,(t),(h),(o),(v)) |
| | | 233 | #ifdef __HAVE_BUS_SPACE_8 |
219 | #define bus_space_write_stream_8(t, h, o, v) __bs_ws_s(8,(t),(h),(o),(v)) | | 234 | #define bus_space_write_stream_8(t, h, o, v) __bs_ws_s(8,(t),(h),(o),(v)) |
220 | #endif | | 235 | #endif |
| | | 236 | #endif |
221 | | | 237 | |
222 | | | 238 | |
223 | /* | | 239 | /* |
224 | * Bus write multiple operations. | | 240 | * Bus write multiple operations. |
225 | */ | | 241 | */ |
226 | #define bus_space_write_multi_1(t, h, o, a, c) \ | | 242 | #define bus_space_write_multi_1(t, h, o, a, c) \ |
227 | __bs_nonsingle(wm,1,(t),(h),(o),(a),(c)) | | 243 | __bs_nonsingle(wm,1,(t),(h),(o),(a),(c)) |
228 | #define bus_space_write_multi_2(t, h, o, a, c) \ | | 244 | #define bus_space_write_multi_2(t, h, o, a, c) \ |
229 | __bs_nonsingle(wm,2,(t),(h),(o),(a),(c)) | | 245 | __bs_nonsingle(wm,2,(t),(h),(o),(a),(c)) |
230 | #define bus_space_write_multi_4(t, h, o, a, c) \ | | 246 | #define bus_space_write_multi_4(t, h, o, a, c) \ |
231 | __bs_nonsingle(wm,4,(t),(h),(o),(a),(c)) | | 247 | __bs_nonsingle(wm,4,(t),(h),(o),(a),(c)) |
| | | 248 | #ifdef __HAVE_BUS_SPACE_8 |
232 | #define bus_space_write_multi_8(t, h, o, a, c) \ | | 249 | #define bus_space_write_multi_8(t, h, o, a, c) \ |
233 | __bs_nonsingle(wm,8,(t),(h),(o),(a),(c)) | | 250 | __bs_nonsingle(wm,8,(t),(h),(o),(a),(c)) |
| | | 251 | #endif |
234 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS | | 252 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS |
235 | #define bus_space_write_multi_stream_1(t, h, o, a, c) \ | | 253 | #define bus_space_write_multi_stream_1(t, h, o, a, c) \ |
236 | __bs_nonsingle_s(wm,1,(t),(h),(o),(a),(c)) | | 254 | __bs_nonsingle_s(wm,1,(t),(h),(o),(a),(c)) |
237 | #define bus_space_write_multi_stream_2(t, h, o, a, c) \ | | 255 | #define bus_space_write_multi_stream_2(t, h, o, a, c) \ |
238 | __bs_nonsingle_s(wm,2,(t),(h),(o),(a),(c)) | | 256 | __bs_nonsingle_s(wm,2,(t),(h),(o),(a),(c)) |
239 | #define bus_space_write_multi_stream_4(t, h, o, a, c) \ | | 257 | #define bus_space_write_multi_stream_4(t, h, o, a, c) \ |
240 | __bs_nonsingle_s(wm,4,(t),(h),(o),(a),(c)) | | 258 | __bs_nonsingle_s(wm,4,(t),(h),(o),(a),(c)) |
| | | 259 | #ifdef __HAVE_BUS_SPACE_8 |
241 | #define bus_space_write_multi_stream_8(t, h, o, a, c) \ | | 260 | #define bus_space_write_multi_stream_8(t, h, o, a, c) \ |
242 | __bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c)) | | 261 | __bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c)) |
243 | #endif | | 262 | #endif |
| | | 263 | #endif |
244 | | | 264 | |
245 | | | 265 | |
246 | /* | | 266 | /* |
247 | * Bus write region operations. | | 267 | * Bus write region operations. |
248 | */ | | 268 | */ |
249 | #define bus_space_write_region_1(t, h, o, a, c) \ | | 269 | #define bus_space_write_region_1(t, h, o, a, c) \ |
250 | __bs_nonsingle(wr,1,(t),(h),(o),(a),(c)) | | 270 | __bs_nonsingle(wr,1,(t),(h),(o),(a),(c)) |
251 | #define bus_space_write_region_2(t, h, o, a, c) \ | | 271 | #define bus_space_write_region_2(t, h, o, a, c) \ |
252 | __bs_nonsingle(wr,2,(t),(h),(o),(a),(c)) | | 272 | __bs_nonsingle(wr,2,(t),(h),(o),(a),(c)) |
253 | #define bus_space_write_region_4(t, h, o, a, c) \ | | 273 | #define bus_space_write_region_4(t, h, o, a, c) \ |
254 | __bs_nonsingle(wr,4,(t),(h),(o),(a),(c)) | | 274 | __bs_nonsingle(wr,4,(t),(h),(o),(a),(c)) |
| | | 275 | #ifdef __HAVE_BUS_SPACE_8 |
255 | #define bus_space_write_region_8(t, h, o, a, c) \ | | 276 | #define bus_space_write_region_8(t, h, o, a, c) \ |
256 | __bs_nonsingle(wr,8,(t),(h),(o),(a),(c)) | | 277 | __bs_nonsingle(wr,8,(t),(h),(o),(a),(c)) |
| | | 278 | #endif |
257 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS | | 279 | #ifdef __BUS_SPACE_HAS_STREAM_METHODS |
258 | #define bus_space_write_region_stream_1(t, h, o, a, c) \ | | 280 | #define bus_space_write_region_stream_1(t, h, o, a, c) \ |
259 | __bs_nonsingle_s(wr,1,(t),(h),(o),(a),(c)) | | 281 | __bs_nonsingle_s(wr,1,(t),(h),(o),(a),(c)) |
260 | #define bus_space_write_region_stream_2(t, h, o, a, c) \ | | 282 | #define bus_space_write_region_stream_2(t, h, o, a, c) \ |
261 | __bs_nonsingle_s(wr,2,(t),(h),(o),(a),(c)) | | 283 | __bs_nonsingle_s(wr,2,(t),(h),(o),(a),(c)) |
262 | #define bus_space_write_region_stream_4(t, h, o, a, c) \ | | 284 | #define bus_space_write_region_stream_4(t, h, o, a, c) \ |
263 | __bs_nonsingle_s(wr,4,(t),(h),(o),(a),(c)) | | 285 | __bs_nonsingle_s(wr,4,(t),(h),(o),(a),(c)) |
| | | 286 | #ifdef __HAVE_BUS_SPACE_8 |
264 | #define bus_space_write_region_stream_8(t, h, o, a, c) \ | | 287 | #define bus_space_write_region_stream_8(t, h, o, a, c) \ |
265 | __bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c)) | | 288 | __bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c)) |
266 | #endif | | 289 | #endif |
| | | 290 | #endif |
267 | | | 291 | |
268 | | | 292 | |
269 | /* | | 293 | /* |
270 | * Set multiple operations. | | 294 | * Set multiple operations. |
271 | */ | | 295 | */ |
272 | #define bus_space_set_multi_1(t, h, o, v, c) \ | | 296 | #define bus_space_set_multi_1(t, h, o, v, c) \ |
273 | __bs_set(sm,1,(t),(h),(o),(v),(c)) | | 297 | __bs_set(sm,1,(t),(h),(o),(v),(c)) |
274 | #define bus_space_set_multi_2(t, h, o, v, c) \ | | 298 | #define bus_space_set_multi_2(t, h, o, v, c) \ |
275 | __bs_set(sm,2,(t),(h),(o),(v),(c)) | | 299 | __bs_set(sm,2,(t),(h),(o),(v),(c)) |
276 | #define bus_space_set_multi_4(t, h, o, v, c) \ | | 300 | #define bus_space_set_multi_4(t, h, o, v, c) \ |
277 | __bs_set(sm,4,(t),(h),(o),(v),(c)) | | 301 | __bs_set(sm,4,(t),(h),(o),(v),(c)) |
| | | 302 | #ifdef __HAVE_BUS_SPACE_8 |
278 | #define bus_space_set_multi_8(t, h, o, v, c) \ | | 303 | #define bus_space_set_multi_8(t, h, o, v, c) \ |
279 | __bs_set(sm,8,(t),(h),(o),(v),(c)) | | 304 | __bs_set(sm,8,(t),(h),(o),(v),(c)) |
| | | 305 | #endif |
280 | | | 306 | |
281 | /* | | 307 | /* |
282 | * Set region operations. | | 308 | * Set region operations. |
283 | */ | | 309 | */ |
284 | #define bus_space_set_region_1(t, h, o, v, c) \ | | 310 | #define bus_space_set_region_1(t, h, o, v, c) \ |
285 | __bs_set(sr,1,(t),(h),(o),(v),(c)) | | 311 | __bs_set(sr,1,(t),(h),(o),(v),(c)) |
286 | #define bus_space_set_region_2(t, h, o, v, c) \ | | 312 | #define bus_space_set_region_2(t, h, o, v, c) \ |
287 | __bs_set(sr,2,(t),(h),(o),(v),(c)) | | 313 | __bs_set(sr,2,(t),(h),(o),(v),(c)) |
288 | #define bus_space_set_region_4(t, h, o, v, c) \ | | 314 | #define bus_space_set_region_4(t, h, o, v, c) \ |
289 | __bs_set(sr,4,(t),(h),(o),(v),(c)) | | 315 | __bs_set(sr,4,(t),(h),(o),(v),(c)) |
| | | 316 | #ifdef __HAVE_BUS_SPACE_8 |
290 | #define bus_space_set_region_8(t, h, o, v, c) \ | | 317 | #define bus_space_set_region_8(t, h, o, v, c) \ |
291 | __bs_set(sr,8,(t),(h),(o),(v),(c)) | | 318 | __bs_set(sr,8,(t),(h),(o),(v),(c)) |
| | | 319 | #endif |
292 | | | 320 | |
293 | /* | | 321 | /* |
294 | * Copy operations. | | 322 | * Copy operations. |
295 | */ | | 323 | */ |
296 | #define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \ | | 324 | #define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \ |
297 | __bs_copy(1, t, h1, o1, h2, o2, c) | | 325 | __bs_copy(1, t, h1, o1, h2, o2, c) |
298 | #define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \ | | 326 | #define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \ |
299 | __bs_copy(2, t, h1, o1, h2, o2, c) | | 327 | __bs_copy(2, t, h1, o1, h2, o2, c) |
300 | #define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \ | | 328 | #define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \ |
301 | __bs_copy(4, t, h1, o1, h2, o2, c) | | 329 | __bs_copy(4, t, h1, o1, h2, o2, c) |
| | | 330 | #ifdef __HAVE_BUS_SPACE_8 |
302 | #define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ | | 331 | #define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ |
303 | __bs_copy(8, t, h1, o1, h2, o2, c) | | 332 | __bs_copy(8, t, h1, o1, h2, o2, c) |
| | | 333 | #endif |
304 | | | 334 | |
305 | /* | | 335 | /* |
306 | * Probing operations. | | 336 | * Probing operations. |
307 | */ | | 337 | */ |
308 | #ifdef __BUS_SPACE_HAS_PROBING_METHODS | | 338 | #ifdef __BUS_SPACE_HAS_PROBING_METHODS |
309 | #define bus_space_peek_1(t, h, o, p) __bs_pe(1,(t),(h),(o),(p)) | | 339 | #define bus_space_peek_1(t, h, o, p) __bs_pe(1,(t),(h),(o),(p)) |
310 | #define bus_space_peek_2(t, h, o, p) __bs_pe(2,(t),(h),(o),(p)) | | 340 | #define bus_space_peek_2(t, h, o, p) __bs_pe(2,(t),(h),(o),(p)) |
311 | #define bus_space_peek_4(t, h, o, p) __bs_pe(4,(t),(h),(o),(p)) | | 341 | #define bus_space_peek_4(t, h, o, p) __bs_pe(4,(t),(h),(o),(p)) |
| | | 342 | #ifdef __HAVE_BUS_SPACE_8 |
312 | #define bus_space_peek_8(t, h, o, p) __bs_pe(8,(t),(h),(o),(p)) | | 343 | #define bus_space_peek_8(t, h, o, p) __bs_pe(8,(t),(h),(o),(p)) |
| | | 344 | #endif |
313 | | | 345 | |
314 | #define bus_space_poke_1(t, h, o, v) __bs_po(1,(t),(h),(o),(v)) | | 346 | #define bus_space_poke_1(t, h, o, v) __bs_po(1,(t),(h),(o),(v)) |
315 | #define bus_space_poke_2(t, h, o, v) __bs_po(2,(t),(h),(o),(v)) | | 347 | #define bus_space_poke_2(t, h, o, v) __bs_po(2,(t),(h),(o),(v)) |
316 | #define bus_space_poke_4(t, h, o, v) __bs_po(4,(t),(h),(o),(v)) | | 348 | #define bus_space_poke_4(t, h, o, v) __bs_po(4,(t),(h),(o),(v)) |
| | | 349 | #ifdef __HAVE_BUS_SPACE_8 |
317 | #define bus_space_poke_8(t, h, o, v) __bs_po(8,(t),(h),(o),(v)) | | 350 | #define bus_space_poke_8(t, h, o, v) __bs_po(8,(t),(h),(o),(v)) |
318 | #endif | | 351 | #endif |
| | | 352 | #endif |
319 | | | 353 | |
320 | /* | | 354 | /* |
321 | * Macros to provide prototypes for all the functions used in the | | 355 | * Macros to provide prototypes for all the functions used in the |
322 | * bus_space structure | | 356 | * bus_space structure |
323 | */ | | 357 | */ |
324 | | | 358 | |
325 | #define bs_map_proto(f) \ | | 359 | #define bs_map_proto(f) \ |
326 | int __bs_c(f,_bs_map)(void *t, bus_addr_t addr, \ | | 360 | int __bs_c(f,_bs_map)(void *t, bus_addr_t addr, \ |
327 | bus_size_t size, int cacheable, bus_space_handle_t *bshp); | | 361 | bus_size_t size, int cacheable, bus_space_handle_t *bshp); |
328 | | | 362 | |
329 | #define bs_unmap_proto(f) \ | | 363 | #define bs_unmap_proto(f) \ |
330 | void __bs_c(f,_bs_unmap)(void *t, bus_space_handle_t bsh, \ | | 364 | void __bs_c(f,_bs_unmap)(void *t, bus_space_handle_t bsh, \ |
331 | bus_size_t size); | | 365 | bus_size_t size); |