xref: /netbsd-src/sys/arch/macppc/include/pci_machdep.h (revision 05b09539a2f546bc967763b2fcf2335aa764a9be)
1*05b09539Smatt /*	$NetBSD: pci_machdep.h,v 1.22 2011/06/18 08:08:28 matt Exp $	*/
249e6daa9Scgd 
349e6daa9Scgd /*
449e6daa9Scgd  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
549e6daa9Scgd  * Copyright (c) 1994 Charles M. Hannum.  All rights reserved.
649e6daa9Scgd  *
749e6daa9Scgd  * Redistribution and use in source and binary forms, with or without
849e6daa9Scgd  * modification, are permitted provided that the following conditions
949e6daa9Scgd  * are met:
1049e6daa9Scgd  * 1. Redistributions of source code must retain the above copyright
1149e6daa9Scgd  *    notice, this list of conditions and the following disclaimer.
1249e6daa9Scgd  * 2. Redistributions in binary form must reproduce the above copyright
1349e6daa9Scgd  *    notice, this list of conditions and the following disclaimer in the
1449e6daa9Scgd  *    documentation and/or other materials provided with the distribution.
1549e6daa9Scgd  * 3. All advertising materials mentioning features or use of this software
1649e6daa9Scgd  *    must display the following acknowledgement:
1749e6daa9Scgd  *	This product includes software developed by Charles M. Hannum.
1849e6daa9Scgd  * 4. The name of the author may not be used to endorse or promote products
1949e6daa9Scgd  *    derived from this software without specific prior written permission.
2049e6daa9Scgd  *
2149e6daa9Scgd  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2249e6daa9Scgd  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2349e6daa9Scgd  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2449e6daa9Scgd  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2549e6daa9Scgd  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2649e6daa9Scgd  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2749e6daa9Scgd  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2849e6daa9Scgd  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2949e6daa9Scgd  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3049e6daa9Scgd  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3149e6daa9Scgd  */
3249e6daa9Scgd 
33d974db0aSgarbled #ifndef MACPPC_PCI_MACHDEP_H
34d974db0aSgarbled #define MACPPC_PCI_MACHDEP_H
3549e6daa9Scgd 
36d974db0aSgarbled #include <powerpc/pci_machdep.h>
37851de295Ssommerfeld 
383195ef8fSmacallan #ifdef _KERNEL
393195ef8fSmacallan 
40d974db0aSgarbled extern struct powerpc_bus_dma_tag pci_bus_dma_tag;
4149e6daa9Scgd 
4249e6daa9Scgd /*
4349e6daa9Scgd  * Functions provided to machine-independent PCI code.
4449e6daa9Scgd  */
45*05b09539Smatt void	macppc_pci_attach_hook(device_t, device_t,
4647449a63Scgd 		    struct pcibus_attach_args *);
4735df6079Sthorpej 
4835df6079Sthorpej /*
4935df6079Sthorpej  * Internal functions.
5035df6079Sthorpej  */
5147449a63Scgd void	pci_init(int);
52d2f0c68dSmatt int	pcidev_to_ofdev(pci_chipset_tag_t, pcitag_t);
53d974db0aSgarbled void	macppc_pci_get_chipset_tag(pci_chipset_tag_t);
54d974db0aSgarbled 
553195ef8fSmacallan #endif /* _KERNEL */
563195ef8fSmacallan 
57d974db0aSgarbled #endif /* MACPPC_PCI_MACHDEP_H */
58