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