11.5Sthorpej/* $NetBSD: ofw_bus.h,v 1.5 2021/02/27 02:52:48 thorpej Exp $ */
21.2Sgarbled
31.2Sgarbled/*-
41.2Sgarbled * Copyright (c) 2007 The NetBSD Foundation, Inc.
51.2Sgarbled * All rights reserved.
61.2Sgarbled *
71.2Sgarbled * This code is derived from software contributed to The NetBSD Foundation
81.2Sgarbled * by Tim Rightnour
91.2Sgarbled *
101.2Sgarbled * Redistribution and use in source and binary forms, with or without
111.2Sgarbled * modification, are permitted provided that the following conditions
121.2Sgarbled * are met:
131.2Sgarbled * 1. Redistributions of source code must retain the above copyright
141.2Sgarbled *    notice, this list of conditions and the following disclaimer.
151.2Sgarbled * 2. Redistributions in binary form must reproduce the above copyright
161.2Sgarbled *    notice, this list of conditions and the following disclaimer in the
171.2Sgarbled *    documentation and/or other materials provided with the distribution.
181.2Sgarbled *
191.2Sgarbled * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.2Sgarbled * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.2Sgarbled * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.2Sgarbled * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.2Sgarbled * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.2Sgarbled * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.2Sgarbled * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.2Sgarbled * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.2Sgarbled * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.2Sgarbled * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.2Sgarbled * POSSIBILITY OF SUCH DAMAGE.
301.2Sgarbled */
311.2Sgarbled
321.4Schs#ifndef _POWERPC_OFW_BUS_H_
331.4Schs#define _POWERPC_OFW_BUS_H_
341.2Sgarbled
351.2Sgarbled#define RANGE_TYPE_PCI		1
361.2Sgarbled#define RANGE_TYPE_ISA		2
371.2Sgarbled#define RANGE_TYPE_MACIO	3
381.2Sgarbled#define RANGE_TYPE_FIRSTPCI	4
391.2Sgarbled#define RANGE_IO		1
401.2Sgarbled#define RANGE_MEM		2
411.2Sgarbled
421.2Sgarbled#ifndef EXSTORAGE_MAX
431.2Sgarbled#define EXSTORAGE_MAX		12
441.2Sgarbled#endif
451.2Sgarbled
461.2Sgarbled#ifdef _KERNEL
471.2Sgarbledextern struct powerpc_bus_space genppc_isa_io_space_tag;
481.2Sgarbledextern struct powerpc_bus_space genppc_isa_mem_space_tag;
491.2Sgarbled
501.2Sgarbled#include <machine/powerpc.h>
511.2Sgarbled
521.2Sgarbledvoid ofwoea_bus_space_init(void);
531.2Sgarbledvoid ofwoea_initppc(u_int, u_int, char *);
541.4Schsint ofwoea_map_space(int, int, int, struct powerpc_bus_space *, const char *);
551.2Sgarbled#endif
561.2Sgarbled
571.4Schs#endif /* _POWERPC_OFW_BUS_H_ */
58