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 usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
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 2009 Emulex.  All rights reserved.
24  * Use is subject to License terms.
25  */
26 
27 
28 #ifndef _EMLXS_FW_H
29 #define	_EMLXS_FW_H
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 #if 0
36 #define	EMLXS_FW_TABLE_DEF	/* Causes the firmware table to be */
37 				/* defined in local memory. */
38 
39 #define	EMLXS_FW_IMAGE_DEF	/* Causes the firmware image to be */
40 				/* defined in the firmware table. */
41 #endif
42 
43 #define	EMLXS_FW_MODULE  "misc/emlxs/emlxs_fw"
44 
45 /* Unique id for each firmware image */
46 typedef enum emlxs_fwid
47 {
48 	FW_NOT_PROVIDED = 0,
49 	LP10000_FW,
50 	LP11000_FW,
51 	LP11002_FW,
52 	LPe11000_FW,
53 	LPe11002_FW,
54 	LPe12000_FW
55 } emlxs_fwid_t;
56 
57 /* Firmware image descriptor */
58 typedef struct emlxs_firmware
59 {
60 	emlxs_fwid_t	id;
61 	uint32_t	size;
62 	uint8_t		*image;
63 	char		label[64];
64 	uint32_t	kern;
65 	uint32_t	stub;
66 	uint32_t	sli1;
67 	uint32_t	sli2;
68 	uint32_t	sli3;
69 	uint32_t	sli4;
70 } emlxs_firmware_t;
71 
72 
73 #ifdef EMLXS_FW_TABLE_DEF
74 
75 #ifndef MODFW_SUPPORT
76 #define	EMLXS_FW_IMAGE_DEF
77 #endif /* MODFW_SUPPORT */
78 
79 /* Provide firmware information for each adapter */
80 #include <fw_lp10000.h>
81 #include <fw_lp11000.h>
82 #include <fw_lp11002.h>
83 #include <fw_lpe11000.h>
84 #include <fw_lpe11002.h>
85 #include <fw_lpe12000.h>
86 
87 /* Build the firmware table */
88 static emlxs_firmware_t emlxs_fw_table[] =
89 {
90 	{
91 		LP10000_FW,
92 		emlxs_lp10000_size,
93 		emlxs_lp10000_image,
94 		emlxs_lp10000_label,
95 		emlxs_lp10000_kern,
96 		emlxs_lp10000_stub,
97 		emlxs_lp10000_sli1,
98 		emlxs_lp10000_sli2,
99 		emlxs_lp10000_sli3,
100 		emlxs_lp10000_sli4
101 	},
102 	{
103 		LP11000_FW,
104 		emlxs_lp11000_size,
105 		emlxs_lp11000_image,
106 		emlxs_lp11000_label,
107 		emlxs_lp11000_kern,
108 		emlxs_lp11000_stub,
109 		emlxs_lp11000_sli1,
110 		emlxs_lp11000_sli2,
111 		emlxs_lp11000_sli3,
112 		emlxs_lp11000_sli4,
113 	},
114 	{
115 		LP11002_FW,
116 		emlxs_lp11002_size,
117 		emlxs_lp11002_image,
118 		emlxs_lp11002_label,
119 		emlxs_lp11002_kern,
120 		emlxs_lp11002_stub,
121 		emlxs_lp11002_sli1,
122 		emlxs_lp11002_sli2,
123 		emlxs_lp11002_sli3,
124 		emlxs_lp11002_sli4
125 	},
126 	{
127 		LPe11000_FW,
128 		emlxs_lpe11000_size,
129 		emlxs_lpe11000_image,
130 		emlxs_lpe11000_label,
131 		emlxs_lpe11000_kern,
132 		emlxs_lpe11000_stub,
133 		emlxs_lpe11000_sli1,
134 		emlxs_lpe11000_sli2,
135 		emlxs_lpe11000_sli3,
136 		emlxs_lpe11000_sli4
137 	},
138 	{
139 		LPe11002_FW,
140 		emlxs_lpe11002_size,
141 		emlxs_lpe11002_image,
142 		emlxs_lpe11002_label,
143 		emlxs_lpe11002_kern,
144 		emlxs_lpe11002_stub,
145 		emlxs_lpe11002_sli1,
146 		emlxs_lpe11002_sli2,
147 		emlxs_lpe11002_sli3,
148 		emlxs_lpe11002_sli4
149 	},
150 	{
151 		LPe12000_FW,
152 		emlxs_lpe12000_size,
153 		emlxs_lpe12000_image,
154 		emlxs_lpe12000_label,
155 		emlxs_lpe12000_kern,
156 		emlxs_lpe12000_stub,
157 		emlxs_lpe12000_sli1,
158 		emlxs_lpe12000_sli2,
159 		emlxs_lpe12000_sli3,
160 		emlxs_lpe12000_sli4
161 	}
162 
163 }; /* emlxs_fw_table[] */
164 
165 #define	EMLXS_FW_COUNT	(sizeof (emlxs_fw_table) / sizeof (emlxs_firmware_t))
166 
167 #endif /* EMLXS_FW_TABLE_DEF */
168 
169 #ifdef	__cplusplus
170 }
171 #endif
172 
173 #endif	/* _EMLXS_FW_H */
174