prep_bus.h revision 1.2
11.2Sgarbled/* $NetBSD: prep_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_PREP_BUS_H_ 401.2Sgarbled#define _POWERPC_PREP_BUS_H_ 411.2Sgarbled 421.2Sgarbled#define PREP_BUS_SPACE_IO 0x80000000 431.2Sgarbled#define PREP_BUS_SPACE_MEM 0xC0000000 441.2Sgarbled 451.2Sgarbled#define PHYS_TO_BUS_MEM(t,x) ((x) | PREP_BUS_SPACE_IO) 461.2Sgarbled#define BUS_MEM_TO_PHYS(t,x) ((x) & ~PREP_BUS_SPACE_IO) 471.2Sgarbled 481.2Sgarbled#define PREP_PHYS_SIZE_IO 0x3f800000 491.2Sgarbled#define PREP_PHYS_SIZE_MEM 0x3f000000 501.2Sgarbled#define PREP_ISA_SIZE_IO 0x00010000 511.2Sgarbled#define PREP_ISA_SIZE_MEM 0x01000000 521.2Sgarbled#define PREP_EISA_SIZE_IO 0x0000f000 531.2Sgarbled#define PREP_EISA_SIZE_MEM 0x3f000000 541.2Sgarbled 551.2Sgarbled#define PREP_PHYS_RESVD_START_IO 0x10000 561.2Sgarbled#define PREP_PHYS_RESVD_SIZE_IO 0x7F0000 571.2Sgarbled 581.2Sgarbled#ifdef _KERNEL 591.2Sgarbledextern struct powerpc_bus_space prep_io_space_tag; 601.2Sgarbledextern struct powerpc_bus_space genppc_isa_io_space_tag; 611.2Sgarbledextern struct powerpc_bus_space prep_mem_space_tag; 621.2Sgarbledextern struct powerpc_bus_space genppc_isa_mem_space_tag; 631.2Sgarbled 641.2Sgarbled#include <machine/powerpc.h> 651.2Sgarbled 661.2Sgarbledvoid prep_bus_space_init(void); 671.2Sgarbledvoid prep_initppc(u_long, u_long, u_int); 681.2Sgarbledvoid mem_regions(struct mem_region **, struct mem_region **); 691.2Sgarbled#endif 701.2Sgarbled 711.2Sgarbled#endif /* _POWERPC_PREP_BUS_H_ */ 72