bus.h revision 91394
132517Sgibbs/*- 258762Skato * Copyright (c) KATO Takenori, 1999. 332517Sgibbs * 458762Skato * All rights reserved. Unpublished rights reserved under the copyright 558762Skato * laws of Japan. 632517Sgibbs * 732517Sgibbs * Redistribution and use in source and binary forms, with or without 832517Sgibbs * modification, are permitted provided that the following conditions 932517Sgibbs * are met: 1058762Skato * 1132517Sgibbs * 1. Redistributions of source code must retain the above copyright 1258762Skato * notice, this list of conditions and the following disclaimer as 1358762Skato * the first lines of this file unmodified. 1432517Sgibbs * 2. Redistributions in binary form must reproduce the above copyright 1532517Sgibbs * notice, this list of conditions and the following disclaimer in the 1632517Sgibbs * documentation and/or other materials provided with the distribution. 1758762Skato * 3. The name of the author may not be used to endorse or promote products 1858762Skato * derived from this software without specific prior written permission. 1958762Skato * 2032517Sgibbs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2132517Sgibbs * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2232517Sgibbs * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2332517Sgibbs * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2432517Sgibbs * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2532517Sgibbs * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2632517Sgibbs * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2732517Sgibbs * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2832517Sgibbs * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2932517Sgibbs * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3058762Skato * 3158762Skato * $FreeBSD: head/sys/amd64/include/bus.h 91394 2002-02-27 17:16:18Z tmm $ 3232517Sgibbs */ 3332517Sgibbs 3432517Sgibbs#ifndef _I386_BUS_H_ 3532517Sgibbs#define _I386_BUS_H_ 3632517Sgibbs 3758762Skato#ifdef PC98 3858762Skato/* NEC PC-98 */ 3958762Skato#include <machine/bus_pc98.h> 4058762Skato#else 4158762Skato/* IBM-PC */ 4258762Skato#include <machine/bus_at386.h> 4348527Simp#endif 4484593Snyan#include <machine/bus_dma.h> 4548527Simp 4691394Stmm/* 4791394Stmm * Stream accesses are the same as normal accesses on i386/pc98; there are no 4891394Stmm * supported bus systems with an endianess different from the host one. 4991394Stmm */ 5091394Stmm#define bus_space_read_stream_1(t, h, o) bus_space_read_1((t), (h), (o)) 5191394Stmm#define bus_space_read_stream_2(t, h, o) bus_space_read_2((t), (h), (o)) 5291394Stmm#define bus_space_read_stream_4(t, h, o) bus_space_read_4((t), (h), (o)) 5391394Stmm 5491394Stmm#define bus_space_read_multi_stream_1(t, h, o, a, c) \ 5591394Stmm bus_space_read_multi_1((t), (h), (o), (a), (c)) 5691394Stmm#define bus_space_read_multi_stream_2(t, h, o, a, c) \ 5791394Stmm bus_space_read_multi_2((t), (h), (o), (a), (c)) 5891394Stmm#define bus_space_read_multi_stream_4(t, h, o, a, c) \ 5991394Stmm bus_space_read_multi_4((t), (h), (o), (a), (c)) 6091394Stmm 6191394Stmm#define bus_space_write_stream_1(t, h, o, v) \ 6291394Stmm bus_space_write_1((t), (h), (o), (v)) 6391394Stmm#define bus_space_write_stream_2(t, h, o, v) \ 6491394Stmm bus_space_write_2((t), (h), (o), (v)) 6591394Stmm#define bus_space_write_stream_4(t, h, o, v) \ 6691394Stmm bus_space_write_4((t), (h), (o), (v)) 6791394Stmm 6891394Stmm#define bus_space_write_multi_stream_1(t, h, o, a, c) \ 6991394Stmm bus_space_write_multi_1((t), (h), (o), (a), (c)) 7091394Stmm#define bus_space_write_multi_stream_2(t, h, o, a, c) \ 7191394Stmm bus_space_write_multi_2((t), (h), (o), (a), (c)) 7291394Stmm#define bus_space_write_multi_stream_4(t, h, o, a, c) \ 7391394Stmm bus_space_write_multi_4((t), (h), (o), (a), (c)) 7491394Stmm 7591394Stmm#define bus_space_set_multi_stream_1(t, h, o, v, c) \ 7691394Stmm bus_space_set_multi_1((t), (h), (o), (v), (c)) 7791394Stmm#define bus_space_set_multi_stream_2(t, h, o, v, c) \ 7891394Stmm bus_space_set_multi_2((t), (h), (o), (v), (c)) 7991394Stmm#define bus_space_set_multi_stream_4(t, h, o, v, c) \ 8091394Stmm bus_space_set_multi_4((t), (h), (o), (v), (c)) 8191394Stmm 8291394Stmm#define bus_space_read_region_stream_1(t, h, o, a, c) \ 8391394Stmm bus_space_read_region_1((t), (h), (o), (a), (c)) 8491394Stmm#define bus_space_read_region_stream_2(t, h, o, a, c) \ 8591394Stmm bus_space_read_region_2((t), (h), (o), (a), (c)) 8691394Stmm#define bus_space_read_region_stream_4(t, h, o, a, c) \ 8791394Stmm bus_space_read_region_4((t), (h), (o), (a), (c)) 8891394Stmm 8991394Stmm#define bus_space_write_region_stream_1(t, h, o, a, c) \ 9091394Stmm bus_space_write_region_1((t), (h), (o), (a), (c)) 9191394Stmm#define bus_space_write_region_stream_2(t, h, o, a, c) \ 9291394Stmm bus_space_write_region_2((t), (h), (o), (a), (c)) 9391394Stmm#define bus_space_write_region_stream_4(t, h, o, a, c) \ 9491394Stmm bus_space_write_region_4((t), (h), (o), (a), (c)) 9591394Stmm 9691394Stmm#define bus_space_set_region_stream_1(t, h, o, v, c) \ 9791394Stmm bus_space_set_region_1((t), (h), (o), (v), (c)) 9891394Stmm#define bus_space_set_region_stream_2(t, h, o, v, c) \ 9991394Stmm bus_space_set_region_2((t), (h), (o), (v), (c)) 10091394Stmm#define bus_space_set_region_stream_4(t, h, o, v, c) \ 10191394Stmm bus_space_set_region_4((t), (h), (o), (v), (c)) 10291394Stmm 10391394Stmm#define bus_space_copy_region_stream_1(t, h1, o1, h2, o2, c) \ 10491394Stmm bus_space_copy_region_1((t), (h1), (o1), (h2), (o2), (c)) 10591394Stmm#define bus_space_copy_region_stream_2(t, h1, o1, h2, o2, c) \ 10691394Stmm bus_space_copy_region_2((t), (h1), (o1), (h2), (o2), (c)) 10791394Stmm#define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ 10891394Stmm bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) 10991394Stmm 11032517Sgibbs#endif /* _I386_BUS_H_ */ 111