ofw_bus.h revision 1.2
11.2Sgarbled/* $NetBSD: ofw_bus.h,v 1.2 2007/10/17 19:56:41 garbled 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 * 3. All advertising materials mentioning features or use of this software 191.2Sgarbled * must display the following acknowledgement: 201.2Sgarbled * This product includes software developed by the NetBSD 211.2Sgarbled * Foundation, Inc. and its contributors. 221.2Sgarbled * 4. Neither the name of The NetBSD Foundation nor the names of its 231.2Sgarbled * contributors may be used to endorse or promote products derived 241.2Sgarbled * from this software without specific prior written permission. 251.2Sgarbled * 261.2Sgarbled * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 271.2Sgarbled * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 281.2Sgarbled * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 291.2Sgarbled * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 301.2Sgarbled * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 311.2Sgarbled * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 321.2Sgarbled * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 331.2Sgarbled * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 341.2Sgarbled * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 351.2Sgarbled * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 361.2Sgarbled * POSSIBILITY OF SUCH DAMAGE. 371.2Sgarbled */ 381.2Sgarbled 391.2Sgarbled#ifndef _POWERPC_OWFPPC_BUS_H_ 401.2Sgarbled#define _POWERPC_OWFPPC_BUS_H_ 411.2Sgarbled 421.2Sgarbled#define RANGE_TYPE_PCI 1 431.2Sgarbled#define RANGE_TYPE_ISA 2 441.2Sgarbled#define RANGE_TYPE_MACIO 3 451.2Sgarbled#define RANGE_TYPE_FIRSTPCI 4 461.2Sgarbled#define RANGE_IO 1 471.2Sgarbled#define RANGE_MEM 2 481.2Sgarbled 491.2Sgarbled#ifndef EXSTORAGE_MAX 501.2Sgarbled#define EXSTORAGE_MAX 12 511.2Sgarbled#endif 521.2Sgarbled 531.2Sgarbled#ifdef _KERNEL 541.2Sgarbledextern struct powerpc_bus_space genppc_isa_io_space_tag; 551.2Sgarbledextern struct powerpc_bus_space genppc_isa_mem_space_tag; 561.2Sgarbled 571.2Sgarbled#include <machine/powerpc.h> 581.2Sgarbled 591.2Sgarbledvoid ofwoea_bus_space_init(void); 601.2Sgarbledvoid ofwoea_initppc(u_int, u_int, char *); 611.2Sgarbledvoid ofwoea_batinit(void); 621.2Sgarbledint ofwoea_map_space(int rangetype, int iomem, int node, 631.2Sgarbled struct powerpc_bus_space *tag, const char *name); 641.2Sgarbled#endif 651.2Sgarbled 661.2Sgarbled#endif /* _POWERPC_PREP_BUS_H_ */ 67