1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at
9 * http://www.opensource.org/licenses/cddl1.txt.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2004-2011 Emulex. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _EMLXS_FW_H
28#define	_EMLXS_FW_H
29
30#ifdef	__cplusplus
31extern "C" {
32#endif
33
34#if 0
35#define	EMLXS_FW_TABLE_DEF	/* Causes the firmware table to be */
36				/* defined in local memory. */
37
38#define	EMLXS_FW_IMAGE_DEF	/* Causes the firmware image to be */
39				/* defined in the firmware table. */
40#endif /* 0 */
41
42#define	EMLXS_FW_MODULE		"misc/"DRIVER_NAME"/"DRIVER_NAME"_fw"
43
44/* Unique id for each firmware image */
45typedef enum emlxs_fwid
46{
47	FW_NOT_PROVIDED = 0,
48	LP10000_FW,
49	LP11000_FW,
50	LP11002_FW,
51	LPe11000_FW,
52	LPe11002_FW,
53	LPe12000_FW
54} emlxs_fwid_t;
55
56/* Firmware image descriptor */
57typedef struct emlxs_firmware
58{
59	emlxs_fwid_t	id;
60	uint32_t	size;
61	uint8_t		*image;
62	char		label[64];
63	uint32_t	kern;
64	uint32_t	stub;
65	uint32_t	sli1;
66	uint32_t	sli2;
67	uint32_t	sli3;
68	uint32_t	sli4;
69} emlxs_firmware_t;
70
71
72#ifdef EMLXS_FW_TABLE_DEF
73
74#ifndef MODFW_SUPPORT
75#define	EMLXS_FW_IMAGE_DEF
76#endif /* MODFW_SUPPORT */
77
78/* Provide firmware information for each adapter */
79#include <fw_lp10000.h>
80#include <fw_lp11000.h>
81#include <fw_lp11002.h>
82#include <fw_lpe11000.h>
83#include <fw_lpe11002.h>
84#include <fw_lpe12000.h>
85
86/* Build the firmware table */
87#define	EMLXS_FW_TABLE	\
88{\
89	{\
90		LP10000_FW,\
91		emlxs_lp10000_size,\
92		emlxs_lp10000_image,\
93		emlxs_lp10000_label,\
94		emlxs_lp10000_kern,\
95		emlxs_lp10000_stub,\
96		emlxs_lp10000_sli1,\
97		emlxs_lp10000_sli2,\
98		emlxs_lp10000_sli3,\
99		emlxs_lp10000_sli4\
100	},\
101	{\
102		LP11000_FW,\
103		emlxs_lp11000_size,\
104		emlxs_lp11000_image,\
105		emlxs_lp11000_label,\
106		emlxs_lp11000_kern,\
107		emlxs_lp11000_stub,\
108		emlxs_lp11000_sli1,\
109		emlxs_lp11000_sli2,\
110		emlxs_lp11000_sli3,\
111		emlxs_lp11000_sli4,\
112	},\
113	{\
114		LP11002_FW,\
115		emlxs_lp11002_size,\
116		emlxs_lp11002_image,\
117		emlxs_lp11002_label,\
118		emlxs_lp11002_kern,\
119		emlxs_lp11002_stub,\
120		emlxs_lp11002_sli1,\
121		emlxs_lp11002_sli2,\
122		emlxs_lp11002_sli3,\
123		emlxs_lp11002_sli4\
124	},\
125	{\
126		LPe11000_FW,\
127		emlxs_lpe11000_size,\
128		emlxs_lpe11000_image,\
129		emlxs_lpe11000_label,\
130		emlxs_lpe11000_kern,\
131		emlxs_lpe11000_stub,\
132		emlxs_lpe11000_sli1,\
133		emlxs_lpe11000_sli2,\
134		emlxs_lpe11000_sli3,\
135		emlxs_lpe11000_sli4\
136	},\
137	{\
138		LPe11002_FW,\
139		emlxs_lpe11002_size,\
140		emlxs_lpe11002_image,\
141		emlxs_lpe11002_label,\
142		emlxs_lpe11002_kern,\
143		emlxs_lpe11002_stub,\
144		emlxs_lpe11002_sli1,\
145		emlxs_lpe11002_sli2,\
146		emlxs_lpe11002_sli3,\
147		emlxs_lpe11002_sli4\
148	},\
149	{\
150		LPe12000_FW,\
151		emlxs_lpe12000_size,\
152		emlxs_lpe12000_image,\
153		emlxs_lpe12000_label,\
154		emlxs_lpe12000_kern,\
155		emlxs_lpe12000_stub,\
156		emlxs_lpe12000_sli1,\
157		emlxs_lpe12000_sli2,\
158		emlxs_lpe12000_sli3,\
159		emlxs_lpe12000_sli4\
160	}\
161}
162#endif /* EMLXS_FW_TABLE_DEF */
163
164#ifdef	__cplusplus
165}
166#endif
167
168#endif	/* _EMLXS_FW_H */
169