summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/cpqary3/cpqary3_bd.h
blob: 24a1ca795f439f20a24c7b76303b08340a62327d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * This file and its contents are supplied under the terms of the
 * Common Development and Distribution License ("CDDL"), version 1.0.
 * You may only use this file in accordance with the terms of version
 * 1.0 of the CDDL.
 *
 * A full copy of the text of the CDDL should have accompanied this
 * source.  A copy of the CDDL is also available via the Internet at
 * http://www.illumos.org/license/CDDL.
 */

/*
 * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
 */

#ifndef	_CPQARY3_BD_H
#define	_CPQARY3_BD_H

#ifdef	__cplusplus
extern "C" {
#endif

/*
 * This file collects various info about each supported
 * controller that the driver needs to know in order to
 * properly support the board.  during device attach, the
 * driver can use cpqary3_bd_getbybid() to fetch the board
 * definition for the device to which it has attached.
 *
 * the source for the board definitions themselves is kept
 * in controllers, which is used to generate the c code to
 * define a static array of structs.  this array and its
 * search functions are defined in cpqary3_bd.c
 *
 * NOTE: if new fields are added or if the order of the
 * fields is altered, then the cpqary3_bd.c definitions
 * must be updated!
 */

struct cpqary3_bd {
	char		*bd_dispname;		/* display name */
	offset_t	bd_maplen;		/* register map length */
	uint16_t	bd_pci_subvenid;	/* PCI subvendor ID */
	uint16_t	bd_pci_subsysid;	/* PCI subsystem ID */
	uint32_t	bd_intrpendmask;	/* interrupt pending mask */
	uint32_t	bd_flags;		/* flags */
	uint32_t	bd_is_e200;
	uint32_t	bd_intrmask;
	uint32_t	bd_lockup_intrmask;
	uint32_t	bd_is_ssll;
};
typedef struct cpqary3_bd   cpqary3_bd_t;

/* bd_flags */
#define	SA_BD_SAS	0x00000001  /* board is a sas controller */


extern cpqary3_bd_t *cpqary3_bd_getbybid(uint32_t);

#ifdef	__cplusplus
}
#endif

#endif	/* _CPQARY3_BD_H */