1291a2b48SSukumar Swaminathan /*
2291a2b48SSukumar Swaminathan  * CDDL HEADER START
3291a2b48SSukumar Swaminathan  *
4291a2b48SSukumar Swaminathan  * The contents of this file are subject to the terms of the
5291a2b48SSukumar Swaminathan  * Common Development and Distribution License (the "License").
6291a2b48SSukumar Swaminathan  * You may not use this file except in compliance with the License.
7291a2b48SSukumar Swaminathan  *
8*8f23e9faSHans Rosenfeld  * You can obtain a copy of the license at
9*8f23e9faSHans Rosenfeld  * http://www.opensource.org/licenses/cddl1.txt.
10291a2b48SSukumar Swaminathan  * See the License for the specific language governing permissions
11291a2b48SSukumar Swaminathan  * and limitations under the License.
12291a2b48SSukumar Swaminathan  *
13291a2b48SSukumar Swaminathan  * When distributing Covered Code, include this CDDL HEADER in each
14291a2b48SSukumar Swaminathan  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15291a2b48SSukumar Swaminathan  * If applicable, add the following below this CDDL HEADER, with the
16291a2b48SSukumar Swaminathan  * fields enclosed by brackets "[]" replaced with your own identifying
17291a2b48SSukumar Swaminathan  * information: Portions Copyright [yyyy] [name of copyright owner]
18291a2b48SSukumar Swaminathan  *
19291a2b48SSukumar Swaminathan  * CDDL HEADER END
20291a2b48SSukumar Swaminathan  */
21291a2b48SSukumar Swaminathan 
22291a2b48SSukumar Swaminathan /*
23*8f23e9faSHans Rosenfeld  * Copyright (c) 2004-2011 Emulex. All rights reserved.
2482527734SSukumar Swaminathan  * Use is subject to license terms.
25291a2b48SSukumar Swaminathan  */
26291a2b48SSukumar Swaminathan 
27291a2b48SSukumar Swaminathan #ifndef _EMLXS_FW_H
28291a2b48SSukumar Swaminathan #define	_EMLXS_FW_H
29291a2b48SSukumar Swaminathan 
30291a2b48SSukumar Swaminathan #ifdef	__cplusplus
31291a2b48SSukumar Swaminathan extern "C" {
32291a2b48SSukumar Swaminathan #endif
33291a2b48SSukumar Swaminathan 
34291a2b48SSukumar Swaminathan #if 0
35291a2b48SSukumar Swaminathan #define	EMLXS_FW_TABLE_DEF	/* Causes the firmware table to be */
36291a2b48SSukumar Swaminathan 				/* defined in local memory. */
37291a2b48SSukumar Swaminathan 
38291a2b48SSukumar Swaminathan #define	EMLXS_FW_IMAGE_DEF	/* Causes the firmware image to be */
39291a2b48SSukumar Swaminathan 				/* defined in the firmware table. */
40*8f23e9faSHans Rosenfeld #endif /* 0 */
41291a2b48SSukumar Swaminathan 
42*8f23e9faSHans Rosenfeld #define	EMLXS_FW_MODULE		"misc/"DRIVER_NAME"/"DRIVER_NAME"_fw"
43291a2b48SSukumar Swaminathan 
44291a2b48SSukumar Swaminathan /* Unique id for each firmware image */
45291a2b48SSukumar Swaminathan typedef enum emlxs_fwid
46291a2b48SSukumar Swaminathan {
47291a2b48SSukumar Swaminathan 	FW_NOT_PROVIDED = 0,
48291a2b48SSukumar Swaminathan 	LP10000_FW,
49291a2b48SSukumar Swaminathan 	LP11000_FW,
50291a2b48SSukumar Swaminathan 	LP11002_FW,
51291a2b48SSukumar Swaminathan 	LPe11000_FW,
52291a2b48SSukumar Swaminathan 	LPe11002_FW,
53291a2b48SSukumar Swaminathan 	LPe12000_FW
54291a2b48SSukumar Swaminathan } emlxs_fwid_t;
55291a2b48SSukumar Swaminathan 
56291a2b48SSukumar Swaminathan /* Firmware image descriptor */
57291a2b48SSukumar Swaminathan typedef struct emlxs_firmware
58291a2b48SSukumar Swaminathan {
59291a2b48SSukumar Swaminathan 	emlxs_fwid_t	id;
60291a2b48SSukumar Swaminathan 	uint32_t	size;
61291a2b48SSukumar Swaminathan 	uint8_t		*image;
62291a2b48SSukumar Swaminathan 	char		label[64];
63291a2b48SSukumar Swaminathan 	uint32_t	kern;
64291a2b48SSukumar Swaminathan 	uint32_t	stub;
65291a2b48SSukumar Swaminathan 	uint32_t	sli1;
66291a2b48SSukumar Swaminathan 	uint32_t	sli2;
67291a2b48SSukumar Swaminathan 	uint32_t	sli3;
68291a2b48SSukumar Swaminathan 	uint32_t	sli4;
69291a2b48SSukumar Swaminathan } emlxs_firmware_t;
70291a2b48SSukumar Swaminathan 
71291a2b48SSukumar Swaminathan 
72291a2b48SSukumar Swaminathan #ifdef EMLXS_FW_TABLE_DEF
73291a2b48SSukumar Swaminathan 
74291a2b48SSukumar Swaminathan #ifndef MODFW_SUPPORT
75291a2b48SSukumar Swaminathan #define	EMLXS_FW_IMAGE_DEF
76291a2b48SSukumar Swaminathan #endif /* MODFW_SUPPORT */
77291a2b48SSukumar Swaminathan 
78291a2b48SSukumar Swaminathan /* Provide firmware information for each adapter */
79291a2b48SSukumar Swaminathan #include <fw_lp10000.h>
80291a2b48SSukumar Swaminathan #include <fw_lp11000.h>
81291a2b48SSukumar Swaminathan #include <fw_lp11002.h>
82291a2b48SSukumar Swaminathan #include <fw_lpe11000.h>
83291a2b48SSukumar Swaminathan #include <fw_lpe11002.h>
84291a2b48SSukumar Swaminathan #include <fw_lpe12000.h>
85291a2b48SSukumar Swaminathan 
86291a2b48SSukumar Swaminathan /* Build the firmware table */
8782527734SSukumar Swaminathan #define	EMLXS_FW_TABLE	\
8882527734SSukumar Swaminathan {\
8982527734SSukumar Swaminathan 	{\
9082527734SSukumar Swaminathan 		LP10000_FW,\
9182527734SSukumar Swaminathan 		emlxs_lp10000_size,\
9282527734SSukumar Swaminathan 		emlxs_lp10000_image,\
9382527734SSukumar Swaminathan 		emlxs_lp10000_label,\
9482527734SSukumar Swaminathan 		emlxs_lp10000_kern,\
9582527734SSukumar Swaminathan 		emlxs_lp10000_stub,\
9682527734SSukumar Swaminathan 		emlxs_lp10000_sli1,\
9782527734SSukumar Swaminathan 		emlxs_lp10000_sli2,\
9882527734SSukumar Swaminathan 		emlxs_lp10000_sli3,\
9982527734SSukumar Swaminathan 		emlxs_lp10000_sli4\
10082527734SSukumar Swaminathan 	},\
10182527734SSukumar Swaminathan 	{\
10282527734SSukumar Swaminathan 		LP11000_FW,\
10382527734SSukumar Swaminathan 		emlxs_lp11000_size,\
10482527734SSukumar Swaminathan 		emlxs_lp11000_image,\
10582527734SSukumar Swaminathan 		emlxs_lp11000_label,\
10682527734SSukumar Swaminathan 		emlxs_lp11000_kern,\
10782527734SSukumar Swaminathan 		emlxs_lp11000_stub,\
10882527734SSukumar Swaminathan 		emlxs_lp11000_sli1,\
10982527734SSukumar Swaminathan 		emlxs_lp11000_sli2,\
11082527734SSukumar Swaminathan 		emlxs_lp11000_sli3,\
11182527734SSukumar Swaminathan 		emlxs_lp11000_sli4,\
11282527734SSukumar Swaminathan 	},\
11382527734SSukumar Swaminathan 	{\
11482527734SSukumar Swaminathan 		LP11002_FW,\
11582527734SSukumar Swaminathan 		emlxs_lp11002_size,\
11682527734SSukumar Swaminathan 		emlxs_lp11002_image,\
11782527734SSukumar Swaminathan 		emlxs_lp11002_label,\
11882527734SSukumar Swaminathan 		emlxs_lp11002_kern,\
11982527734SSukumar Swaminathan 		emlxs_lp11002_stub,\
12082527734SSukumar Swaminathan 		emlxs_lp11002_sli1,\
12182527734SSukumar Swaminathan 		emlxs_lp11002_sli2,\
12282527734SSukumar Swaminathan 		emlxs_lp11002_sli3,\
12382527734SSukumar Swaminathan 		emlxs_lp11002_sli4\
12482527734SSukumar Swaminathan 	},\
12582527734SSukumar Swaminathan 	{\
12682527734SSukumar Swaminathan 		LPe11000_FW,\
12782527734SSukumar Swaminathan 		emlxs_lpe11000_size,\
12882527734SSukumar Swaminathan 		emlxs_lpe11000_image,\
12982527734SSukumar Swaminathan 		emlxs_lpe11000_label,\
13082527734SSukumar Swaminathan 		emlxs_lpe11000_kern,\
13182527734SSukumar Swaminathan 		emlxs_lpe11000_stub,\
13282527734SSukumar Swaminathan 		emlxs_lpe11000_sli1,\
13382527734SSukumar Swaminathan 		emlxs_lpe11000_sli2,\
13482527734SSukumar Swaminathan 		emlxs_lpe11000_sli3,\
13582527734SSukumar Swaminathan 		emlxs_lpe11000_sli4\
13682527734SSukumar Swaminathan 	},\
13782527734SSukumar Swaminathan 	{\
13882527734SSukumar Swaminathan 		LPe11002_FW,\
13982527734SSukumar Swaminathan 		emlxs_lpe11002_size,\
14082527734SSukumar Swaminathan 		emlxs_lpe11002_image,\
14182527734SSukumar Swaminathan 		emlxs_lpe11002_label,\
14282527734SSukumar Swaminathan 		emlxs_lpe11002_kern,\
14382527734SSukumar Swaminathan 		emlxs_lpe11002_stub,\
14482527734SSukumar Swaminathan 		emlxs_lpe11002_sli1,\
14582527734SSukumar Swaminathan 		emlxs_lpe11002_sli2,\
14682527734SSukumar Swaminathan 		emlxs_lpe11002_sli3,\
14782527734SSukumar Swaminathan 		emlxs_lpe11002_sli4\
14882527734SSukumar Swaminathan 	},\
14982527734SSukumar Swaminathan 	{\
15082527734SSukumar Swaminathan 		LPe12000_FW,\
15182527734SSukumar Swaminathan 		emlxs_lpe12000_size,\
15282527734SSukumar Swaminathan 		emlxs_lpe12000_image,\
15382527734SSukumar Swaminathan 		emlxs_lpe12000_label,\
15482527734SSukumar Swaminathan 		emlxs_lpe12000_kern,\
15582527734SSukumar Swaminathan 		emlxs_lpe12000_stub,\
15682527734SSukumar Swaminathan 		emlxs_lpe12000_sli1,\
15782527734SSukumar Swaminathan 		emlxs_lpe12000_sli2,\
15882527734SSukumar Swaminathan 		emlxs_lpe12000_sli3,\
15982527734SSukumar Swaminathan 		emlxs_lpe12000_sli4\
16082527734SSukumar Swaminathan 	}\
16182527734SSukumar Swaminathan }
162291a2b48SSukumar Swaminathan #endif /* EMLXS_FW_TABLE_DEF */
163291a2b48SSukumar Swaminathan 
164291a2b48SSukumar Swaminathan #ifdef	__cplusplus
165291a2b48SSukumar Swaminathan }
166291a2b48SSukumar Swaminathan #endif
167291a2b48SSukumar Swaminathan 
168291a2b48SSukumar Swaminathan #endif	/* _EMLXS_FW_H */
169