1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause-NetBSD
3 *
4 * Copyright (c) 1999, 2000 Matthew R. Green
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * from: NetBSD: psychovar.h,v 1.15 2008/05/29 14:51:26 mrg Exp
29 *
30 * $FreeBSD$
31 */
32
33 #ifndef _SPARC64_PCI_PSYCHOVAR_H_
34 #define _SPARC64_PCI_PSYCHOVAR_H_
35
36 /*
37 * Per-PCI bus on mainbus softc structure; one for sabre, or two
38 * per pair of psychos.
39 */
40 struct psycho_softc {
41 /*
42 * This is here so that we can hook up the common bus interface
43 * methods in ofw_pci.c directly.
44 */
45 struct ofw_pci_softc sc_ops;
46
47 struct iommu_state *sc_is;
48 struct bus_dma_methods *sc_dma_methods;
49
50 struct mtx *sc_mtx;
51
52 struct resource *sc_mem_res;
53 struct resource *sc_irq_res[PSYCHO_NINTR];
54 void *sc_ihand[PSYCHO_NINTR];
55
56 uint8_t sc_pci_hpbcfg[16];
57
58 SLIST_ENTRY(psycho_softc) sc_link;
59
60 device_t sc_dev;
61
62 bus_addr_t sc_pcictl;
63
64 u_int sc_mode;
65 #define PSYCHO_MODE_SABRE 0
66 #define PSYCHO_MODE_PSYCHO 1
67
68 /* Bus A or B of a psycho pair? */
69 u_int sc_half;
70
71 /* Interrupt Group Number for this device */
72 uint32_t sc_ign;
73 };
74
75 #endif /* !_SPARC64_PCI_PSYCHOVAR_H_ */
Cache object: 4f2af9d0e8b05590cced0ef43ca81062
|