bus.h revision 114930
11558Srgrimes/*- 21558Srgrimes * Copyright (c) KATO Takenori, 1999. 31558Srgrimes * 41558Srgrimes * All rights reserved. Unpublished rights reserved under the copyright 51558Srgrimes * laws of Japan. 61558Srgrimes * 71558Srgrimes * Redistribution and use in source and binary forms, with or without 81558Srgrimes * modification, are permitted provided that the following conditions 91558Srgrimes * are met: 101558Srgrimes * 111558Srgrimes * 1. Redistributions of source code must retain the above copyright 121558Srgrimes * notice, this list of conditions and the following disclaimer as 131558Srgrimes * the first lines of this file unmodified. 141558Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 151558Srgrimes * notice, this list of conditions and the following disclaimer in the 161558Srgrimes * documentation and/or other materials provided with the distribution. 171558Srgrimes * 3. The name of the author may not be used to endorse or promote products 181558Srgrimes * derived from this software without specific prior written permission. 191558Srgrimes * 201558Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 211558Srgrimes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 221558Srgrimes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 231558Srgrimes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 241558Srgrimes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 251558Srgrimes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 261558Srgrimes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 271558Srgrimes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 281558Srgrimes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 291558Srgrimes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30102411Scharnier * 311558Srgrimes * $FreeBSD: head/sys/amd64/include/bus.h 114930 2003-05-12 02:44:37Z peter $ 3223675Speter */ 33102411Scharnier 3441477Sjulian#ifndef _AMD64_BUS_H_ 35102411Scharnier#define _AMD64_BUS_H_ 36102411Scharnier 37102411Scharnier#include <machine/bus_amd64.h> 381558Srgrimes#include <machine/bus_dma.h> 39202109Smckusick 4023675Speter/* 411558Srgrimes * Stream accesses are the same as normal accesses on amd64; there are no 421558Srgrimes * supported bus systems with an endianess different from the host one. 4374556Smckusick */ 4423799Sbde#define bus_space_read_stream_1(t, h, o) bus_space_read_1((t), (h), (o)) 4523675Speter#define bus_space_read_stream_2(t, h, o) bus_space_read_2((t), (h), (o)) 46202109Smckusick#define bus_space_read_stream_4(t, h, o) bus_space_read_4((t), (h), (o)) 47101037Smux 481558Srgrimes#define bus_space_read_multi_stream_1(t, h, o, a, c) \ 4923675Speter bus_space_read_multi_1((t), (h), (o), (a), (c)) 501558Srgrimes#define bus_space_read_multi_stream_2(t, h, o, a, c) \ 511558Srgrimes bus_space_read_multi_2((t), (h), (o), (a), (c)) 521558Srgrimes#define bus_space_read_multi_stream_4(t, h, o, a, c) \ 531558Srgrimes bus_space_read_multi_4((t), (h), (o), (a), (c)) 54202107Smckusick 55202107Smckusick#define bus_space_write_stream_1(t, h, o, v) \ 5692839Simp bus_space_write_1((t), (h), (o), (v)) 5792839Simp#define bus_space_write_stream_2(t, h, o, v) \ 581558Srgrimes bus_space_write_2((t), (h), (o), (v)) 597585Sbde#define bus_space_write_stream_4(t, h, o, v) \ 6092839Simp bus_space_write_4((t), (h), (o), (v)) 611558Srgrimes 6298542Smckusick#define bus_space_write_multi_stream_1(t, h, o, a, c) \ 6392806Sobrien bus_space_write_multi_1((t), (h), (o), (a), (c)) 641558Srgrimes#define bus_space_write_multi_stream_2(t, h, o, a, c) \ 651558Srgrimes bus_space_write_multi_2((t), (h), (o), (a), (c)) 6698542Smckusick#define bus_space_write_multi_stream_4(t, h, o, a, c) \ 6798542Smckusick bus_space_write_multi_4((t), (h), (o), (a), (c)) 681558Srgrimes 691558Srgrimes#define bus_space_set_multi_stream_1(t, h, o, v, c) \ 7041474Sjulian bus_space_set_multi_1((t), (h), (o), (v), (c)) 711558Srgrimes#define bus_space_set_multi_stream_2(t, h, o, v, c) \ 721558Srgrimes bus_space_set_multi_2((t), (h), (o), (v), (c)) 731558Srgrimes#define bus_space_set_multi_stream_4(t, h, o, v, c) \ 7434266Sjulian bus_space_set_multi_4((t), (h), (o), (v), (c)) 7534266Sjulian 7623675Speter#define bus_space_read_region_stream_1(t, h, o, a, c) \ 7734266Sjulian bus_space_read_region_1((t), (h), (o), (a), (c)) 781558Srgrimes#define bus_space_read_region_stream_2(t, h, o, a, c) \ 7923675Speter bus_space_read_region_2((t), (h), (o), (a), (c)) 801558Srgrimes#define bus_space_read_region_stream_4(t, h, o, a, c) \ 811558Srgrimes bus_space_read_region_4((t), (h), (o), (a), (c)) 821558Srgrimes 831558Srgrimes#define bus_space_write_region_stream_1(t, h, o, a, c) \ 841558Srgrimes bus_space_write_region_1((t), (h), (o), (a), (c)) 851558Srgrimes#define bus_space_write_region_stream_2(t, h, o, a, c) \ 861558Srgrimes bus_space_write_region_2((t), (h), (o), (a), (c)) 8723675Speter#define bus_space_write_region_stream_4(t, h, o, a, c) \ 881558Srgrimes bus_space_write_region_4((t), (h), (o), (a), (c)) 891558Srgrimes 9034266Sjulian#define bus_space_set_region_stream_1(t, h, o, v, c) \ 9134266Sjulian bus_space_set_region_1((t), (h), (o), (v), (c)) 9223675Speter#define bus_space_set_region_stream_2(t, h, o, v, c) \ 9334266Sjulian bus_space_set_region_2((t), (h), (o), (v), (c)) 941558Srgrimes#define bus_space_set_region_stream_4(t, h, o, v, c) \ 951558Srgrimes bus_space_set_region_4((t), (h), (o), (v), (c)) 961558Srgrimes 971558Srgrimes#define bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) \ 98136281Struckman bus_space_copy_region_1((t), (h1), (o1), (h2), (o2), (c)) 991558Srgrimes#define bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) \ 1001558Srgrimes bus_space_copy_region_2((t), (h1), (o1), (h2), (o2), (c)) 1011558Srgrimes#define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ 1021558Srgrimes bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) 10323675Speter 1041558Srgrimes#endif /* _AMD64_BUS_H_ */ 1051558Srgrimes