psychovar.h revision 259065
117683Spst/*- 217683Spst * Copyright (c) 1999, 2000 Matthew R. Green 317683Spst * All rights reserved. 417683Spst * 517683Spst * Redistribution and use in source and binary forms, with or without 617683Spst * modification, are permitted provided that the following conditions 717683Spst * are met: 817683Spst * 1. Redistributions of source code must retain the above copyright 917683Spst * notice, this list of conditions and the following disclaimer. 1017683Spst * 2. Redistributions in binary form must reproduce the above copyright 1117683Spst * notice, this list of conditions and the following disclaimer in the 1217683Spst * documentation and/or other materials provided with the distribution. 1317683Spst * 1417683Spst * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1517683Spst * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1617683Spst * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1717683Spst * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1817683Spst * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 1917683Spst * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 2017683Spst * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2198533Sfenner * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2298533Sfenner * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2356891Sfenner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2417683Spst * SUCH DAMAGE. 2517683Spst * 2617683Spst * from: NetBSD: psychovar.h,v 1.15 2008/05/29 14:51:26 mrg Exp 2717683Spst * 2817683Spst * $FreeBSD: releng/10.0/sys/sparc64/pci/psychovar.h 225931 2011-10-02 23:22:38Z marius $ 2917683Spst */ 3017683Spst 3117683Spst#ifndef _SPARC64_PCI_PSYCHOVAR_H_ 3217683Spst#define _SPARC64_PCI_PSYCHOVAR_H_ 3356891Sfenner 3417683Spst/* 3517683Spst * Per-PCI bus on mainbus softc structure; one for sabre, or two 3617683Spst * per pair of psychos. 3717683Spst */ 3817683Spststruct psycho_softc { 3917683Spst struct bus_dma_methods *sc_dma_methods; 4017683Spst 4198533Sfenner device_t sc_dev; 4298533Sfenner 4398533Sfenner struct mtx *sc_mtx; 4498533Sfenner 4598533Sfenner /* Interrupt Group Number for this device */ 4698533Sfenner uint32_t sc_ign; 4717683Spst 4817683Spst bus_addr_t sc_pcictl; 4998533Sfenner 5098533Sfenner phandle_t sc_node; /* Firmware node */ 5198533Sfenner u_int sc_mode; 5298533Sfenner#define PSYCHO_MODE_SABRE 0 5398533Sfenner#define PSYCHO_MODE_PSYCHO 1 5498533Sfenner 5517683Spst /* Bus A or B of a psycho pair? */ 5675110Sfenner u_int sc_half; 5798533Sfenner 5898533Sfenner struct iommu_state *sc_is; 5998533Sfenner 6098533Sfenner struct resource *sc_mem_res; 6156891Sfenner struct resource *sc_irq_res[PSYCHO_NINTR]; 6298533Sfenner void *sc_ihand[PSYCHO_NINTR]; 6398533Sfenner 6456891Sfenner struct ofw_bus_iinfo sc_pci_iinfo; 6598533Sfenner 6656891Sfenner /* Tags for PCI access */ 6798533Sfenner bus_space_tag_t sc_pci_cfgt; 6898533Sfenner bus_space_tag_t sc_pci_iot; 6998533Sfenner bus_dma_tag_t sc_pci_dmat; 7098533Sfenner 7175110Sfenner bus_space_handle_t sc_pci_bh[PSYCHO_NRANGE]; 7298533Sfenner 7398533Sfenner struct rman sc_pci_mem_rman; 7498533Sfenner struct rman sc_pci_io_rman; 7598533Sfenner 7698533Sfenner uint8_t sc_pci_secbus; 7798533Sfenner uint8_t sc_pci_subbus; 7817683Spst 7917683Spst uint8_t sc_pci_hpbcfg[16]; 8017683Spst 8117683Spst SLIST_ENTRY(psycho_softc) sc_link; 8217683Spst}; 8317683Spst 8417683Spst#endif /* !_SPARC64_PCI_PSYCHOVAR_H_ */ 8517683Spst