11.4Sthorpej/* $NetBSD: prep_bus.h,v 1.4 2021/02/27 01:31:23 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.2Sgarbled#ifndef _POWERPC_PREP_BUS_H_ 331.2Sgarbled#define _POWERPC_PREP_BUS_H_ 341.2Sgarbled 351.2Sgarbled#define PREP_BUS_SPACE_IO 0x80000000 361.2Sgarbled#define PREP_BUS_SPACE_MEM 0xC0000000 371.2Sgarbled 381.2Sgarbled#define PHYS_TO_BUS_MEM(t,x) ((x) | PREP_BUS_SPACE_IO) 391.2Sgarbled#define BUS_MEM_TO_PHYS(t,x) ((x) & ~PREP_BUS_SPACE_IO) 401.2Sgarbled 411.2Sgarbled#define PREP_PHYS_SIZE_IO 0x3f800000 421.2Sgarbled#define PREP_PHYS_SIZE_MEM 0x3f000000 431.2Sgarbled#define PREP_ISA_SIZE_IO 0x00010000 441.2Sgarbled#define PREP_ISA_SIZE_MEM 0x01000000 451.2Sgarbled#define PREP_EISA_SIZE_IO 0x0000f000 461.2Sgarbled#define PREP_EISA_SIZE_MEM 0x3f000000 471.2Sgarbled 481.2Sgarbled#define PREP_PHYS_RESVD_START_IO 0x10000 491.2Sgarbled#define PREP_PHYS_RESVD_SIZE_IO 0x7F0000 501.2Sgarbled 511.2Sgarbled#ifdef _KERNEL 521.2Sgarbledextern struct powerpc_bus_space prep_io_space_tag; 531.2Sgarbledextern struct powerpc_bus_space genppc_isa_io_space_tag; 541.2Sgarbledextern struct powerpc_bus_space prep_mem_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 prep_bus_space_init(void); 601.4Sthorpejvoid prep_initppc(u_long, u_long, u_int, paddr_t, ...); 611.2Sgarbledvoid mem_regions(struct mem_region **, struct mem_region **); 621.2Sgarbled#endif 631.2Sgarbled 641.2Sgarbled#endif /* _POWERPC_PREP_BUS_H_ */ 65