1
/******************************************************************************
2
* Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
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
9
* You should have received a copy of the GNU General Public License along with
10
* this program; if not, write to the Free Software Foundation, Inc.,
11
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
13
* The full GNU General Public License is included in this distribution in the
14
* file called LICENSE.
16
* Contact Information:
17
* wlanfae <wlanfae@realtek.com>
18
******************************************************************************/
23
#define EFUSE_FOR_92SU 1
25
/*--------------------------Define Parameters-------------------------------*/
26
#define EFUSE_REAL_CONTENT_LEN 512
27
#define EFUSE_MAP_LEN 128
28
#define EFUSE_MAX_SECTION 16
29
#define EFUSE_MAX_WORD_UNIT 4
30
#define EFUSE_IC_ID_OFFSET 506
32
#define EFUSE_INIT_MAP 0
33
#define EFUSE_MODIFY_MAP 1
35
#define EFUSE_CLK_CTRL EFUSE_CTRL
36
#define EFUSE_BIT(x) (1 << (x))
38
#define PG_STATE_HEADER 0x01
39
#define PG_STATE_WORD_0 0x02
40
#define PG_STATE_WORD_1 0x04
41
#define PG_STATE_WORD_2 0x08
42
#define PG_STATE_WORD_3 0x10
43
#define PG_STATE_DATA 0x20
45
#define PG_SWBYTE_H 0x01
46
#define PG_SWBYTE_L 0x02
48
/*--------------------------Define Parameters-------------------------------*/
51
/*------------------------------Define structure----------------------------*/
53
/*------------------------------Define structure----------------------------*/
56
/*------------------------Export global variable----------------------------*/
57
/*------------------------Export global variable----------------------------*/
59
/*------------------------Export Marco Definition---------------------------*/
61
/*------------------------Export Marco Definition---------------------------*/
64
/*--------------------------Exported Function prototype---------------------*/
66
EFUSE_Initialize(struct net_device* dev);
68
EFUSE_Read1Byte(struct net_device* dev,u16 Address);
70
EFUSE_Write1Byte(struct net_device* dev,u16 Address,u8 Value);
74
ReadEFuse(struct net_device* dev,u16 _offset,u16 _size_byte,u8* pbuf);
76
ReadEFuseByte(struct net_device* dev,u16 _offset,u8 *pbuf);
80
EFUSE_ShadowRead(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 *Value);
82
EFUSE_ShadowWrite(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 Value);
84
EFUSE_ShadowUpdate(struct net_device* dev);
86
EFUSE_ShadowUpdateChk(struct net_device* dev);
88
EFUSE_ShadowMapUpdate(struct net_device* dev);
90
EFUSE_RePgSection1(struct net_device* dev);
93
EFUSE_ProgramMap(struct net_device* dev,char* pFileName, u8 TableType);
94
/*--------------------------Exported Function prototype---------------------*/