xref: /netbsd-src/sys/arch/sparc/sparc/msiiepvar.h (revision 5eadbc3ac174cf47c88f8d339df4a13c7a9c5e96)
1 /*	$NetBSD: msiiepvar.h,v 1.10 2021/01/24 07:36:54 mrg Exp $ */
2 
3 /*
4  * Copyright (c) 2001 Valeriy E. Ushakov
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  * 3. The name of the author may not be used to endorse or promote products
16  *    derived from this software without specific prior written permission
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef _SPARC_MSIIEP_VAR_H_
31 #define _SPARC_MSIIEP_VAR_H_
32 
33 struct msiiep_attach_args {
34 	const char *msa_name;
35 	struct mainbus_attach_args *msa_ma;
36 };
37 
38 struct mspcic_softc {
39 	/* PROM node */
40 	int			sc_node;
41 
42 	/* parent (mainbus) tags */
43 	bus_space_tag_t		sc_bustag;
44 	bus_dma_tag_t		sc_dmatag;
45 
46 	/* our tags */
47 	bus_space_tag_t		sc_memt;
48 	bus_space_tag_t		sc_iot;
49 	bus_dma_tag_t		sc_dmat;
50 };
51 
52 extern int	mspcic_assigned_interrupt(int);
53 
54 /*
55  * Bus space tags for memory and i/o.
56  */
57 
58 struct mspcic_pci_map {
59 	uint32_t sysbase;
60 	uint32_t pcibase;
61 	uint32_t size;
62 };
63 
64 #define IOMAP_SIZE 2
65 #define MEMMAP_SIZE 3
66 
67 extern struct mspcic_pci_map mspcic_pci_iomap[];
68 extern struct mspcic_pci_map mspcic_pci_memmap[];
69 
70 #endif /* _SPARC_MSIIEP_VAR_H_ */
71