pci_addr_fixup.h revision 1.1 1 1.1 jmcneill /* $NetBSD: pci_addr_fixup.h,v 1.1 2008/05/18 02:06:14 jmcneill Exp $ */
2 1.1 jmcneill
3 1.1 jmcneill /*-
4 1.1 jmcneill * Copyright (c) 2000 UCHIYAMA Yasushi. All rights reserved.
5 1.1 jmcneill *
6 1.1 jmcneill * Redistribution and use in source and binary forms, with or without
7 1.1 jmcneill * modification, are permitted provided that the following conditions
8 1.1 jmcneill * are met:
9 1.1 jmcneill * 1. Redistributions of source code must retain the above copyright
10 1.1 jmcneill * notice, this list of conditions and the following disclaimer.
11 1.1 jmcneill * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 jmcneill * notice, this list of conditions and the following disclaimer in the
13 1.1 jmcneill * documentation and/or other materials provided with the distribution.
14 1.1 jmcneill * 3. The name of the author may not be used to endorse or promote products
15 1.1 jmcneill * derived from this software without specific prior written permission.
16 1.1 jmcneill *
17 1.1 jmcneill * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 1.1 jmcneill * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 1.1 jmcneill * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 1.1 jmcneill * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 1.1 jmcneill * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 1.1 jmcneill * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 1.1 jmcneill * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 1.1 jmcneill * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 1.1 jmcneill * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 1.1 jmcneill * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 1.1 jmcneill */
28 1.1 jmcneill
29 1.1 jmcneill struct pciaddr {
30 1.1 jmcneill struct extent *extent_mem;
31 1.1 jmcneill struct extent *extent_port;
32 1.1 jmcneill bus_addr_t mem_alloc_start;
33 1.1 jmcneill bus_addr_t port_alloc_start;
34 1.1 jmcneill int nbogus;
35 1.1 jmcneill };
36 1.1 jmcneill
37 1.1 jmcneill extern struct pciaddr pciaddr;
38 1.1 jmcneill
39 1.1 jmcneill void pci_addr_fixup(pci_chipset_tag_t, int);
40 1.1 jmcneill
41 1.1 jmcneill /* for cardbus stuff */
42 1.1 jmcneill typedef int (*pciaddr_resource_manage_func_t)
43 1.1 jmcneill (pci_chipset_tag_t, pcitag_t, int, void *, int,
44 1.1 jmcneill bus_addr_t *, bus_size_t);
45 1.1 jmcneill
46 1.1 jmcneill void pciaddr_resource_manage(pci_chipset_tag_t, pcitag_t,
47 1.1 jmcneill pciaddr_resource_manage_func_t,
48 1.1 jmcneill void *);
49 1.1 jmcneill
50 1.1 jmcneill void pciaddr_print_devid(pci_chipset_tag_t, pcitag_t);
51 1.1 jmcneill
52 1.1 jmcneill bus_addr_t pciaddr_ioaddr(uint32_t);
53