mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Place driver rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104 in branch v4.1.8_9499
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
bad0b4cde4
commit
065126d8ce
247 changed files with 192113 additions and 30447 deletions
123
include/rtw_efuse.h
Normal file → Executable file
123
include/rtw_efuse.h
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
|
@ -20,11 +20,12 @@
|
|||
#ifndef __RTW_EFUSE_H__
|
||||
#define __RTW_EFUSE_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
#define EFUSE_ERROE_HANDLE 1
|
||||
|
||||
#define PG_STATE_HEADER 0x01
|
||||
#define PG_STATE_HEADER 0x01
|
||||
#define PG_STATE_WORD_0 0x02
|
||||
#define PG_STATE_WORD_1 0x04
|
||||
#define PG_STATE_WORD_2 0x08
|
||||
|
@ -50,54 +51,74 @@ enum _EFUSE_DEF_TYPE {
|
|||
};
|
||||
|
||||
/* E-Fuse */
|
||||
#ifdef CONFIG_RTL8192D
|
||||
#define EFUSE_MAP_SIZE 256
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8192C
|
||||
#define EFUSE_MAP_SIZE 128
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8723A
|
||||
#define EFUSE_MAP_SIZE 256
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8188E
|
||||
#define EFUSE_MAP_SIZE 512
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
#define EFUSE_MAX_SIZE 256
|
||||
#else
|
||||
#define EFUSE_MAX_SIZE 512
|
||||
#endif
|
||||
/* end of E-Fuse */
|
||||
|
||||
#define EFUSE_MAX_MAP_LEN 512
|
||||
#define EFUSE_MAX_MAP_LEN 256
|
||||
#define EFUSE_MAX_HW_SIZE 512
|
||||
#define EFUSE_MAX_SECTION_BASE 16
|
||||
|
||||
#define EXT_HEADER(header) ((header & 0x1F) == 0x0F)
|
||||
#define EXT_HEADER(header) ((header & 0x1F ) == 0x0F)
|
||||
#define ALL_WORDS_DISABLED(wde) ((wde & 0x0F) == 0x0F)
|
||||
#define GET_HDR_OFFSET_2_0(header) ((header & 0xE0) >> 5)
|
||||
#define GET_HDR_OFFSET_2_0(header) ( (header & 0xE0) >> 5)
|
||||
|
||||
#define EFUSE_REPEAT_THRESHOLD_ 3
|
||||
|
||||
/* The following is for BT Efuse definition */
|
||||
//=============================================
|
||||
// The following is for BT Efuse definition
|
||||
//=============================================
|
||||
#define EFUSE_BT_MAX_MAP_LEN 1024
|
||||
#define EFUSE_MAX_BANK 4
|
||||
#define EFUSE_MAX_BT_BANK (EFUSE_MAX_BANK-1)
|
||||
//=============================================
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
#define EFUSE_MAX_WORD_UNIT 4
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
struct pgpkt {
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
typedef struct PG_PKT_STRUCT_A{
|
||||
u8 offset;
|
||||
u8 word_en;
|
||||
u8 data[8];
|
||||
u8 data[8];
|
||||
u8 word_cnts;
|
||||
};
|
||||
}PGPKT_STRUCT,*PPGPKT_STRUCT;
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
struct efuse_hal {
|
||||
u8 fakeEfuseBank;
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
typedef struct _EFUSE_HAL{
|
||||
u8 fakeEfuseBank;
|
||||
u32 fakeEfuseUsedBytes;
|
||||
u8 fakeEfuseContent[EFUSE_MAX_HW_SIZE];
|
||||
u8 fakeEfuseInitMap[EFUSE_MAX_MAP_LEN];
|
||||
u8 fakeEfuseModifiedMap[EFUSE_MAX_MAP_LEN];
|
||||
u8 fakeEfuseContent[EFUSE_MAX_HW_SIZE];
|
||||
u8 fakeEfuseInitMap[EFUSE_MAX_MAP_LEN];
|
||||
u8 fakeEfuseModifiedMap[EFUSE_MAX_MAP_LEN];
|
||||
|
||||
u16 BTEfuseUsedBytes;
|
||||
u8 BTEfuseUsedPercentage;
|
||||
u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
u8 BTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
u8 BTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
u16 BTEfuseUsedBytes;
|
||||
u8 BTEfuseUsedPercentage;
|
||||
u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
u8 BTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
u8 BTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
|
||||
u16 fakeBTEfuseUsedBytes;
|
||||
u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
}EFUSE_HAL, *PEFUSE_HAL;
|
||||
|
||||
u16 fakeBTEfuseUsedBytes;
|
||||
u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
};
|
||||
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
extern u8 fakeEfuseBank;
|
||||
|
@ -117,34 +138,30 @@ extern u8 fakeBTEfuseInitMap[];
|
|||
extern u8 fakeBTEfuseModifiedMap[];
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
|
||||
u8 efuse_GetCurrentSize(struct adapter *adapter, u16 *size);
|
||||
u16 efuse_GetMaxSize(struct adapter *adapter);
|
||||
u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
|
||||
u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
|
||||
u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
|
||||
u16 cnts, u8 *data);
|
||||
u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
|
||||
u8 Efuse_CalculateWordCnts(u8 word_en);
|
||||
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
|
||||
void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
|
||||
void *out, bool bPseudoTest);
|
||||
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
|
||||
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
|
||||
u8 efuse_GetCurrentSize(PADAPTER padapter, u16 *size);
|
||||
u16 efuse_GetMaxSize(PADAPTER padapter);
|
||||
u8 rtw_efuse_access(PADAPTER padapter, u8 bRead, u16 start_addr, u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
|
||||
void Efuse_PowerSwitch(struct adapter *adapt,u8 bWrite,u8 PwrState);
|
||||
int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test);
|
||||
int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
|
||||
bool test);
|
||||
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
|
||||
u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr,
|
||||
u8 word_en, u8 *data, bool test);
|
||||
u16 Efuse_GetCurrentSize(PADAPTER pAdapter, u8 efuseType, BOOLEAN bPseudoTest);
|
||||
u8 Efuse_CalculateWordCnts(u8 word_en);
|
||||
void ReadEFuseByte(PADAPTER Adapter, u16 _offset, u8 *pbuf, BOOLEAN bPseudoTest) ;
|
||||
void EFUSE_GetEfuseDefinition(PADAPTER pAdapter, u8 efuseType, u8 type, void *pOut, BOOLEAN bPseudoTest);
|
||||
u8 efuse_OneByteRead(PADAPTER pAdapter, u16 addr, u8 *data, BOOLEAN bPseudoTest);
|
||||
u8 efuse_OneByteWrite(PADAPTER pAdapter, u16 addr, u8 data, BOOLEAN bPseudoTest);
|
||||
|
||||
u8 EFUSE_Read1Byte(struct adapter *adapter, u16 address);
|
||||
void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test);
|
||||
void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val);
|
||||
void Efuse_PowerSwitch(PADAPTER pAdapter,u8 bWrite,u8 PwrState);
|
||||
int Efuse_PgPacketRead(PADAPTER pAdapter, u8 offset, u8 *data, BOOLEAN bPseudoTest);
|
||||
int Efuse_PgPacketWrite(PADAPTER pAdapter, u8 offset, u8 word_en, u8 *data, BOOLEAN bPseudoTest);
|
||||
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
|
||||
u8 Efuse_WordEnableDataWrite(PADAPTER pAdapter, u16 efuse_addr, u8 word_en, u8 *data, BOOLEAN bPseudoTest);
|
||||
|
||||
u8 EFUSE_Read1Byte(PADAPTER pAdapter, u16 Address);
|
||||
void EFUSE_ShadowMapUpdate(PADAPTER pAdapter, u8 efuseType, BOOLEAN bPseudoTest);
|
||||
void EFUSE_ShadowRead(PADAPTER pAdapter, u8 Type, u16 Offset, u32 *Value);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue