These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / rtl8192e / rtl8192e / r8192E_firmware.h
1 /******************************************************************************
2  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
3  *
4  * This program is distributed in the hope that it will be useful, but WITHOUT
5  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
7  * more details.
8  *
9  * The full GNU General Public License is included in this distribution in the
10  * file called LICENSE.
11  *
12  * Contact Information:
13  * wlanfae <wlanfae@realtek.com>
14 ******************************************************************************/
15 #ifndef __INC_FIRMWARE_H
16 #define __INC_FIRMWARE_H
17
18 #define RTL8192E_BOOT_IMG_FW    "RTL8192E/boot.img"
19 #define RTL8192E_MAIN_IMG_FW    "RTL8192E/main.img"
20 #define RTL8192E_DATA_IMG_FW    "RTL8192E/data.img"
21
22 enum firmware_init_step {
23         FW_INIT_STEP0_BOOT = 0,
24         FW_INIT_STEP1_MAIN = 1,
25         FW_INIT_STEP2_DATA = 2,
26 };
27
28 enum opt_rst_type {
29         OPT_SYSTEM_RESET = 0,
30         OPT_FIRMWARE_RESET = 1,
31 };
32
33 enum desc_packet_type {
34         DESC_PACKET_TYPE_INIT = 0,
35         DESC_PACKET_TYPE_NORMAL = 1,
36 };
37
38 enum firmware_status {
39         FW_STATUS_0_INIT = 0,
40         FW_STATUS_1_MOVE_BOOT_CODE = 1,
41         FW_STATUS_2_MOVE_MAIN_CODE = 2,
42         FW_STATUS_3_TURNON_CPU = 3,
43         FW_STATUS_4_MOVE_DATA_CODE = 4,
44         FW_STATUS_5_READY = 5,
45 };
46
47 #define MAX_FW_SIZE 64000
48 struct rt_fw_blob {
49         u16 size;
50         u8 data[MAX_FW_SIZE];
51 };
52
53 #define FW_BLOBS 3
54 struct rt_firmware {
55         enum firmware_status status;
56         struct rt_fw_blob blobs[FW_BLOBS];
57 };
58
59 bool rtl92e_init_fw(struct net_device *dev);
60 #endif