schizovar.h revision 201395
1183423Smarius/*-
2183423Smarius * Copyright (c) 2005 by Marius Strobl <marius@FreeBSD.org>.
3183423Smarius * All rights reserved.
4183423Smarius *
5183423Smarius * Redistribution and use in source and binary forms, with or without
6183423Smarius * modification, are permitted provided that the following conditions
7183423Smarius * are met:
8183423Smarius * 1. Redistributions of source code must retain the above copyright
9183423Smarius *    notice, this list of conditions, and the following disclaimer,
10183423Smarius *    without modification, immediately at the beginning of the file.
11183423Smarius * 2. Redistributions in binary form must reproduce the above copyright
12183423Smarius *    notice, this list of conditions and the following disclaimer in
13183423Smarius *    the documentation and/or other materials provided with the
14183423Smarius *    distribution.
15183423Smarius *
16183423Smarius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17183423Smarius * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18183423Smarius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19183423Smarius * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20183423Smarius * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21183423Smarius * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22183423Smarius * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23183423Smarius * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24183423Smarius * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25183423Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26183423Smarius * SUCH DAMAGE.
27183423Smarius *
28183423Smarius * $FreeBSD: head/sys/sparc64/pci/schizovar.h 201395 2010-01-02 15:19:33Z marius $
29183423Smarius */
30183423Smarius
31183423Smarius#ifndef _SPARC64_PCI_SCHIZOVAR_H_
32183423Smarius#define	_SPARC64_PCI_SCHIZOVAR_H_
33183423Smarius
34183423Smariusstruct schizo_softc {
35183423Smarius	device_t			sc_dev;
36183423Smarius
37183423Smarius	struct mtx			*sc_mtx;
38183423Smarius
39183423Smarius	phandle_t			sc_node;
40183423Smarius
41183423Smarius	u_int				sc_mode;
42185133Smarius#define	SCHIZO_MODE_SCZ			0
43185133Smarius#define	SCHIZO_MODE_TOM			1
44185133Smarius#define	SCHIZO_MODE_XMS			2
45183423Smarius
46185133Smarius	u_int				sc_flags;
47185133Smarius#define	SCHIZO_FLAGS_BSWAR		(1 << 0)
48185133Smarius#define	SCHIZO_FLAGS_CDMA		(1 << 1)
49185133Smarius
50185133Smarius	bus_addr_t			sc_cdma_clr;
51185133Smarius	uint32_t			sc_cdma_state;
52185133Smarius#define	SCHIZO_CDMA_STATE_DONE		(1 << 0)
53185133Smarius#define	SCHIZO_CDMA_STATE_PENDING	(1 << 1)
54185133Smarius
55183423Smarius	u_int				sc_half;
56183423Smarius	uint32_t			sc_ign;
57183423Smarius	uint32_t			sc_ver;
58183423Smarius
59183423Smarius	struct resource			*sc_mem_res[TOM_NREG];
60183423Smarius	struct resource			*sc_irq_res[STX_NINTR];
61183423Smarius	void				*sc_ihand[STX_NINTR];
62183423Smarius
63183423Smarius	struct iommu_state		sc_is;
64183423Smarius
65183423Smarius	struct rman			sc_pci_mem_rman;
66183423Smarius	struct rman			sc_pci_io_rman;
67183423Smarius	bus_space_handle_t		sc_pci_bh[STX_NRANGE];
68183423Smarius	bus_space_tag_t			sc_pci_cfgt;
69183423Smarius	bus_space_tag_t			sc_pci_iot;
70183423Smarius	bus_space_tag_t			sc_pci_memt;
71183423Smarius	bus_dma_tag_t			sc_pci_dmat;
72183423Smarius
73183423Smarius	uint8_t				sc_pci_secbus;
74201395Smarius	uint8_t				sc_pci_subbus;
75183423Smarius
76183423Smarius	struct ofw_bus_iinfo		sc_pci_iinfo;
77183423Smarius
78183423Smarius	SLIST_ENTRY(schizo_softc)	sc_link;
79183423Smarius};
80183423Smarius
81183423Smarius#endif /* !_SPARC64_PCI_SCHIZOVAR_H_ */
82