Deleted Added
sdiff udiff text old ( 93067 ) new ( 98148 )
full compact
1/*
2 * Copyright (c) 1999, 2000 Matthew R. Green
3 * All rights reserved.
4 * Copyright 2001 by Thomas Moestl <tmm@FreeBSD.org>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp
30 *
31 * $FreeBSD: head/sys/sparc64/pci/ofw_pci.h 98148 2002-06-12 19:20:57Z tmm $
32 */
33
34#ifndef _SPARC64_PCI_OFW_PCI_H_
35#define _SPARC64_PCI_OFW_PCI_H_
36
37/* PCI range child spaces. XXX: are these MI? */
38#define PCI_CS_CONFIG 0x00
39#define PCI_CS_IO 0x01
40#define PCI_CS_MEM32 0x02
41#define PCI_CS_MEM64 0x03
42
43struct ofw_pci_imap {
44 u_int32_t phys_hi;
45 u_int32_t phys_mid;
46 u_int32_t phys_lo;
47 u_int32_t intr;
48 int32_t child_node;
49 u_int32_t child_intr;
50};
51
52struct ofw_pci_imap_msk {
53 u_int32_t phys_hi;
54 u_int32_t phys_mid;
55 u_int32_t phys_lo;
56 u_int32_t intr;
57};
58
59struct ofw_pci_bdesc;
60typedef void ofw_pci_binit_t(device_t, struct ofw_pci_bdesc *);
61
62struct ofw_pci_bdesc {
63 u_int obd_bus;
64 u_int obd_slot;
65 u_int obd_func;
66 u_int obd_secbus;
67 u_int obd_subbus;
68 ofw_pci_binit_t *obd_init;
69 struct ofw_pci_bdesc *obd_super;
70};
71
72u_int32_t ofw_pci_route_intr(phandle_t);
73u_int8_t ofw_pci_alloc_busno(phandle_t);
74ofw_pci_binit_t ofw_pci_binit;
75void ofw_pci_init(device_t, phandle_t, struct ofw_pci_bdesc *);
76phandle_t ofw_pci_find_node(int, int, int);
77phandle_t ofw_pci_node(device_t);
78
79#endif /* ! _SPARC64_PCI_OFW_PCI_H_ */