1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
4 *
5 * Contact Information: wlanfae <wlanfae@realtek.com>
6 */
7#ifndef __INC_FIRMWARE_H
8#define __INC_FIRMWARE_H
9
10#define RTL8192E_BOOT_IMG_FW "RTL8192E/boot.img"
11#define RTL8192E_MAIN_IMG_FW "RTL8192E/main.img"
12#define RTL8192E_DATA_IMG_FW "RTL8192E/data.img"
13
14enum firmware_init_step {
15 FW_INIT_STEP0_BOOT = 0,
16 FW_INIT_STEP1_MAIN = 1,
17 FW_INIT_STEP2_DATA = 2,
18};
19
20enum opt_rst_type {
21 OPT_SYSTEM_RESET = 0,
22 OPT_FIRMWARE_RESET = 1,
23};
24
25enum desc_packet_type {
26 DESC_PACKET_TYPE_INIT = 0,
27 DESC_PACKET_TYPE_NORMAL = 1,
28};
29
30enum firmware_status {
31 FW_STATUS_0_INIT = 0,
32 FW_STATUS_1_MOVE_BOOT_CODE = 1,
33 FW_STATUS_2_MOVE_MAIN_CODE = 2,
34 FW_STATUS_3_TURNON_CPU = 3,
35 FW_STATUS_4_MOVE_DATA_CODE = 4,
36 FW_STATUS_5_READY = 5,
37};
38
39#define MAX_FW_SIZE 64000
40struct rt_fw_blob {
41 u16 size;
42 u8 data[MAX_FW_SIZE];
43};
44
45#define FW_BLOBS 3
46struct rt_firmware {
47 enum firmware_status status;
48 struct rt_fw_blob blobs[FW_BLOBS];
49};
50
51bool rtl92e_init_fw(struct net_device *dev);
52#endif
53

source code of linux/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h