1203985Sneel/*-
2203985Sneel * Copyright (c) 2010 Neelkanth Natu
3203985Sneel * All rights reserved.
4203985Sneel *
5203985Sneel * Redistribution and use in source and binary forms, with or without
6203985Sneel * modification, are permitted provided that the following conditions
7203985Sneel * are met:
8203985Sneel * 1. Redistributions of source code must retain the above copyright
9203985Sneel *    notice, this list of conditions and the following disclaimer.
10203985Sneel * 2. Redistributions in binary form must reproduce the above copyright
11203985Sneel *    notice, this list of conditions and the following disclaimer in the
12203985Sneel *    documentation and/or other materials provided with the distribution.
13203985Sneel *
14203985Sneel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15203985Sneel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16203985Sneel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17203985Sneel * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18203985Sneel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19203985Sneel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20203985Sneel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21203985Sneel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22203985Sneel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23203985Sneel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24203985Sneel * SUCH DAMAGE.
25203985Sneel *
26203985Sneel * $FreeBSD$
27203985Sneel */
28203985Sneel
29203985Sneel#ifndef _SB_BUS_SPACE_H_
30203985Sneel#define	_SB_BUS_SPACE_H_
31203985Sneel
32203985Sneel#include <machine/endian.h>
33203985Sneel
34203985Sneel#if _BYTE_ORDER == _BIG_ENDIAN
35203985Sneeluint8_t sb_big_endian_read8(bus_addr_t addr);
36203985Sneeluint16_t sb_big_endian_read16(bus_addr_t addr);
37203985Sneeluint32_t sb_big_endian_read32(bus_addr_t addr);
38203985Sneelvoid sb_big_endian_write8(bus_addr_t addr, uint8_t val);
39203985Sneelvoid sb_big_endian_write16(bus_addr_t addr, uint16_t val);
40203985Sneelvoid sb_big_endian_write32(bus_addr_t addr, uint32_t val);
41203985Sneel#endif
42203985Sneel
43203985Sneel#endif
44