xref: /titanic_50/usr/src/uts/common/io/cpqary3/cpqary3_bd.h (revision 799823bbed51a695d01e13511bbb1369980bb714)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
14  */
15 
16 #ifndef	_CPQARY3_BD_H
17 #define	_CPQARY3_BD_H
18 
19 #ifdef	__cplusplus
20 extern "C" {
21 #endif
22 
23 /*
24  * This file collects various info about each supported
25  * controller that the driver needs to know in order to
26  * properly support the board.  during device attach, the
27  * driver can use cpqary3_bd_getbybid() to fetch the board
28  * definition for the device to which it has attached.
29  *
30  * the source for the board definitions themselves is kept
31  * in controllers, which is used to generate the c code to
32  * define a static array of structs.  this array and its
33  * search functions are defined in cpqary3_bd.c
34  *
35  * NOTE: if new fields are added or if the order of the
36  * fields is altered, then the cpqary3_bd.c definitions
37  * must be updated!
38  */
39 
40 struct cpqary3_bd {
41 	char		*bd_dispname;		/* display name */
42 	offset_t	bd_maplen;		/* register map length */
43 	uint16_t	bd_pci_subvenid;	/* PCI subvendor ID */
44 	uint16_t	bd_pci_subsysid;	/* PCI subsystem ID */
45 	uint32_t	bd_intrpendmask;	/* interrupt pending mask */
46 	uint32_t	bd_flags;		/* flags */
47 	uint32_t	bd_is_e200;
48 	uint32_t	bd_intrmask;
49 	uint32_t	bd_lockup_intrmask;
50 	uint32_t	bd_is_ssll;
51 };
52 typedef struct cpqary3_bd   cpqary3_bd_t;
53 
54 /* bd_flags */
55 #define	SA_BD_SAS	0x00000001  /* board is a sas controller */
56 
57 
58 extern cpqary3_bd_t *cpqary3_bd_getbybid(uint32_t);
59 
60 #ifdef	__cplusplus
61 }
62 #endif
63 
64 #endif	/* _CPQARY3_BD_H */
65