150476Speter/*- 211023Speter * Copyright (c) 2009 by Marius Strobl <marius@FreeBSD.org>. 3206622Suqs * All rights reserved. 479538Sru * 511023Speter * Redistribution and use in source and binary forms, with or without 611023Speter * modification, are permitted provided that the following conditions 760258Ssheldonh * are met: 811023Speter * 1. Redistributions of source code must retain the above copyright 956467Sasmodai * notice, this list of conditions, and the following disclaimer, 1084877Syokota * without modification, immediately at the beginning of the file. 1184877Syokota * 2. Redistributions in binary form must reproduce the above copyright 1284877Syokota * notice, this list of conditions and the following disclaimer in 1384877Syokota * the documentation and/or other materials provided with the 1484877Syokota * distribution. 1584877Syokota * 1611023Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1734842Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1811023Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1911023Speter * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 20131530Sru * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2134842Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2234842Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2311023Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24117011Sru * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25117011Sru * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26117011Sru * SUCH DAMAGE. 2734842Speter * 2811023Speter * $FreeBSD$ 2934842Speter */ 3057676Ssheldonh 3157676Ssheldonh#ifndef _SPARC64_PCI_FIREVAR_H_ 3211023Speter#define _SPARC64_PCI_FIREVAR_H_ 3311023Speter 3434842Speterstruct fire_softc { 3557676Ssheldonh struct iommu_state sc_is; 3657676Ssheldonh struct bus_dma_methods sc_dma_methods; 3734842Speter 3811023Speter struct mtx sc_msi_mtx; 3957676Ssheldonh struct mtx sc_pcib_mtx; 4057676Ssheldonh 4134842Speter struct resource *sc_mem_res[FIRE_NREG]; 4234842Speter struct resource *sc_irq_res[FIRE_NINTR]; 4311023Speter void *sc_ihand[FIRE_NINTR]; 44117011Sru 45117011Sru struct rman sc_pci_mem_rman; 46117011Sru struct rman sc_pci_io_rman; 47117011Sru bus_space_handle_t sc_pci_bh[FIRE_NRANGE]; 4811023Speter bus_space_tag_t sc_pci_cfgt; 4957676Ssheldonh bus_space_tag_t sc_pci_iot; 5057676Ssheldonh bus_dma_tag_t sc_pci_dmat; 5134842Speter 5211023Speter device_t sc_dev; 5334842Speter 5434842Speter uint64_t *sc_msiq; 5534842Speter u_char *sc_msi_bitmap; 5675531Sdd uint32_t *sc_msi_msiq_table; 5711023Speter u_char *sc_msiq_bitmap; 5811023Speter uint64_t sc_msi_addr32; 5911023Speter uint64_t sc_msi_addr64; 6011023Speter uint32_t sc_msi_count; 6111023Speter uint32_t sc_msi_first; 6211023Speter uint32_t sc_msi_data_mask; 6311023Speter uint32_t sc_msix_data_width; 6411023Speter uint32_t sc_msiq_count; 6536753Sjkoshy uint32_t sc_msiq_size; 6657676Ssheldonh uint32_t sc_msiq_first; 6757676Ssheldonh uint32_t sc_msiq_ino_first; 68131530Sru 69131530Sru phandle_t sc_node; 7034842Speter 7134842Speter u_int sc_mode; 7234842Speter#define FIRE_MODE_FIRE 0 7334842Speter#define FIRE_MODE_OBERON 1 7411023Speter 7511023Speter u_int sc_flags; 7611023Speter#define FIRE_MSIX (1 << 0) 77117011Sru 78117011Sru uint32_t sc_ign; 79117011Sru 80117011Sru uint32_t sc_stats_ilu_err; 8111023Speter uint32_t sc_stats_jbc_ce_async; 82131530Sru uint32_t sc_stats_jbc_unsol_int; 83131530Sru uint32_t sc_stats_jbc_unsol_rd; 8411023Speter uint32_t sc_stats_mmu_err; 8511023Speter uint32_t sc_stats_tlu_ce; 8634842Speter uint32_t sc_stats_tlu_oe_non_fatal; 8734842Speter uint32_t sc_stats_tlu_oe_rx_err; 8834842Speter uint32_t sc_stats_tlu_oe_tx_err; 8911023Speter uint32_t sc_stats_ubc_dmardue; 9011023Speter 9157676Ssheldonh uint8_t sc_pci_secbus; 9257676Ssheldonh uint8_t sc_pci_subbus; 93131530Sru 94131530Sru struct ofw_bus_iinfo sc_pci_iinfo; 9511023Speter}; 9611023Speter 9711023Speter#endif /* !_SPARC64_PCI_FIREVAR_H_ */ 9811023Speter