Home | History | Annotate | Line # | Download | only in include
bus.h revision 1.1
      1  1.1  matt /*	$NetBSD: bus.h,v 1.1 2003/10/19 03:33:50 matt Exp $	*/
      2  1.1  matt /*	$OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $	*/
      3  1.1  matt 
      4  1.1  matt /*-
      5  1.1  matt  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
      6  1.1  matt  * All rights reserved.
      7  1.1  matt  *
      8  1.1  matt  * This code is derived from software contributed to The NetBSD Foundation
      9  1.1  matt  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
     10  1.1  matt  * NASA Ames Research Center.
     11  1.1  matt  *
     12  1.1  matt  * Redistribution and use in source and binary forms, with or without
     13  1.1  matt  * modification, are permitted provided that the following conditions
     14  1.1  matt  * are met:
     15  1.1  matt  * 1. Redistributions of source code must retain the above copyright
     16  1.1  matt  *    notice, this list of conditions and the following disclaimer.
     17  1.1  matt  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.1  matt  *    notice, this list of conditions and the following disclaimer in the
     19  1.1  matt  *    documentation and/or other materials provided with the distribution.
     20  1.1  matt  * 3. All advertising materials mentioning features or use of this software
     21  1.1  matt  *    must display the following acknowledgement:
     22  1.1  matt  *	This product includes software developed by the NetBSD
     23  1.1  matt  *	Foundation, Inc. and its contributors.
     24  1.1  matt  * 4. Neither the name of The NetBSD Foundation nor the names of its
     25  1.1  matt  *    contributors may be used to endorse or promote products derived
     26  1.1  matt  *    from this software without specific prior written permission.
     27  1.1  matt  *
     28  1.1  matt  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     29  1.1  matt  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     30  1.1  matt  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     31  1.1  matt  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     32  1.1  matt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     33  1.1  matt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     34  1.1  matt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     35  1.1  matt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     36  1.1  matt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     37  1.1  matt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     38  1.1  matt  * POSSIBILITY OF SUCH DAMAGE.
     39  1.1  matt  */
     40  1.1  matt 
     41  1.1  matt /*
     42  1.1  matt  * Copyright (c) 1996 Charles M. Hannum.  All rights reserved.
     43  1.1  matt  * Copyright (c) 1996 Jason R. Thorpe.  All rights reserved.
     44  1.1  matt  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
     45  1.1  matt  *
     46  1.1  matt  * Redistribution and use in source and binary forms, with or without
     47  1.1  matt  * modification, are permitted provided that the following conditions
     48  1.1  matt  * are met:
     49  1.1  matt  * 1. Redistributions of source code must retain the above copyright
     50  1.1  matt  *    notice, this list of conditions and the following disclaimer.
     51  1.1  matt  * 2. Redistributions in binary form must reproduce the above copyright
     52  1.1  matt  *    notice, this list of conditions and the following disclaimer in the
     53  1.1  matt  *    documentation and/or other materials provided with the distribution.
     54  1.1  matt  * 3. All advertising materials mentioning features or use of this software
     55  1.1  matt  *    must display the following acknowledgement:
     56  1.1  matt  *      This product includes software developed by Christopher G. Demetriou
     57  1.1  matt  *	for the NetBSD Project.
     58  1.1  matt  * 4. The name of the author may not be used to endorse or promote products
     59  1.1  matt  *    derived from this software without specific prior written permission
     60  1.1  matt  *
     61  1.1  matt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     62  1.1  matt  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     63  1.1  matt  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     64  1.1  matt  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     65  1.1  matt  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     66  1.1  matt  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     67  1.1  matt  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     68  1.1  matt  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     69  1.1  matt  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     70  1.1  matt  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     71  1.1  matt  */
     72  1.1  matt 
     73  1.1  matt /*
     74  1.1  matt  * Copyright (c) 1997 Per Fogelstrom.  All rights reserved.
     75  1.1  matt  * Copyright (c) 1996 Niklas Hallqvist.  All rights reserved.
     76  1.1  matt  *
     77  1.1  matt  * Redistribution and use in source and binary forms, with or without
     78  1.1  matt  * modification, are permitted provided that the following conditions
     79  1.1  matt  * are met:
     80  1.1  matt  * 1. Redistributions of source code must retain the above copyright
     81  1.1  matt  *    notice, this list of conditions and the following disclaimer.
     82  1.1  matt  * 2. Redistributions in binary form must reproduce the above copyright
     83  1.1  matt  *    notice, this list of conditions and the following disclaimer in the
     84  1.1  matt  *    documentation and/or other materials provided with the distribution.
     85  1.1  matt  * 3. All advertising materials mentioning features or use of this software
     86  1.1  matt  *    must display the following acknowledgement:
     87  1.1  matt  *      This product includes software developed by Christopher G. Demetriou
     88  1.1  matt  *	for the NetBSD Project.
     89  1.1  matt  * 4. The name of the author may not be used to endorse or promote products
     90  1.1  matt  *    derived from this software without specific prior written permission
     91  1.1  matt  *
     92  1.1  matt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     93  1.1  matt  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     94  1.1  matt  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     95  1.1  matt  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     96  1.1  matt  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     97  1.1  matt  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     98  1.1  matt  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     99  1.1  matt  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    100  1.1  matt  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    101  1.1  matt  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    102  1.1  matt  */
    103  1.1  matt 
    104  1.1  matt #ifndef _IBMNWS_BUS_H_
    105  1.1  matt #define _IBMNWS_BUS_H_
    106  1.1  matt 
    107  1.1  matt /*
    108  1.1  matt  * Values for the Be bus space tag, not to be used directly by MI code.
    109  1.1  matt  */
    110  1.1  matt #define	PREP_BUS_SPACE_IO	0x80000000	/* i/o space */
    111  1.1  matt #define PREP_BUS_SPACE_MEM	0xC0000000	/* mem space */
    112  1.1  matt 
    113  1.1  matt /*
    114  1.1  matt  * Address conversion as seen from a PCI master.
    115  1.1  matt  */
    116  1.1  matt #define MPC105_DIRECT_MAPPED_SPACE	0x80000000
    117  1.1  matt #define PHYS_TO_BUS_MEM(t, x)	((x) | MPC105_DIRECT_MAPPED_SPACE)
    118  1.1  matt #define BUS_MEM_TO_PHYS(t, x)	((x) & ~MPC105_DIRECT_MAPPED_SPACE)
    119  1.1  matt 
    120  1.1  matt #ifdef _KERNEL
    121  1.1  matt extern struct powerpc_bus_space io_bus_space_tag;
    122  1.1  matt extern struct powerpc_bus_space isa_io_bus_space_tag;
    123  1.1  matt extern struct powerpc_bus_space mem_bus_space_tag;
    124  1.1  matt extern struct powerpc_bus_space isa_mem_bus_space_tag;
    125  1.1  matt #endif
    126  1.1  matt 
    127  1.1  matt #include <powerpc/bus.h>
    128  1.1  matt 
    129  1.1  matt #endif /* _IBMNWS_BUS_H_ */
    130