1*6fb00c13Sjsg /* $OpenBSD: iobusvar.h,v 1.5 2024/05/20 23:20:29 jsg Exp $ */ 261e15267Ssyuu 361e15267Ssyuu /* 461e15267Ssyuu * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) 561e15267Ssyuu * 661e15267Ssyuu * Redistribution and use in source and binary forms, with or without 761e15267Ssyuu * modification, are permitted provided that the following conditions 861e15267Ssyuu * are met: 961e15267Ssyuu * 1. Redistributions of source code must retain the above copyright 1061e15267Ssyuu * notice, this list of conditions and the following disclaimer. 1161e15267Ssyuu * 2. Redistributions in binary form must reproduce the above copyright 1261e15267Ssyuu * notice, this list of conditions and the following disclaimer in the 1361e15267Ssyuu * documentation and/or other materials provided with the distribution. 1461e15267Ssyuu * 1561e15267Ssyuu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 1661e15267Ssyuu * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1761e15267Ssyuu * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1861e15267Ssyuu * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 1961e15267Ssyuu * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2061e15267Ssyuu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2161e15267Ssyuu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2261e15267Ssyuu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2361e15267Ssyuu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2461e15267Ssyuu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2561e15267Ssyuu * SUCH DAMAGE. 2661e15267Ssyuu * 2761e15267Ssyuu */ 2861e15267Ssyuu 2961e15267Ssyuu #ifndef _IOBUSVAR_H_ 3061e15267Ssyuu #define _IOBUSVAR_H_ 3161e15267Ssyuu 3261e15267Ssyuu #include <machine/bus.h> 3361e15267Ssyuu 3461e15267Ssyuu extern bus_space_t iobus_tag; 3561e15267Ssyuu 3661e15267Ssyuu struct iobus_attach_args { 3761e15267Ssyuu char *aa_name; 3861e15267Ssyuu int aa_unitno; 3961e15267Ssyuu 4073a9bee3Sjasper bus_addr_t aa_addr; 4173a9bee3Sjasper int aa_irq; 4261e15267Ssyuu 4361e15267Ssyuu bus_space_tag_t aa_bust; 4461e15267Ssyuu bus_dma_tag_t aa_dmat; 4561e15267Ssyuu }; 4661e15267Ssyuu 4773a9bee3Sjasper struct octeon_iobus_addrs { 4873a9bee3Sjasper const char *name; 4973a9bee3Sjasper bus_addr_t address; 5073a9bee3Sjasper }; 5173a9bee3Sjasper 52489a03d0Sjmatthew int iobus_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, 53489a03d0Sjmatthew bus_space_handle_t *); 54489a03d0Sjmatthew void iobus_space_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t); 55489a03d0Sjmatthew 5661e15267Ssyuu #endif /* _IOBUSVAR_H_ */ 57