1 /******************************************************************************
3 * (c) Copyright 2008, RealTEK Technologies Inc. All Rights Reserved.
5 * Module: Efuse.h ( Header File)
18 * 09/23/2008 MHC Porting Efuse R/W API from WMAC.
19 * 11/10/2008 MHC Porting Efuse.h from 8712 SDIO.
20 * 1. We muse redefine the header file to fit our coding
22 * 2. THe API we export to other module, we must redefine
26 ******************************************************************************/
27 /* Check to see if the file has been included already. */
32 // Roger porting for 8192SU
33 #define EFUSE_FOR_92SU 1
35 /*--------------------------Define Parameters-------------------------------*/
36 #define EFUSE_MAC_LEN 0x200
38 #define EFUSE_INIT_MAP 0
39 #define EFUSE_MODIFY_MAP 1
41 #define EFUSE_CLK_CTRL EFUSE_CTRL
42 #define EFUSE_BIT(x) (1 << (x))
45 #define PG_STATE_HEADER 0x01
46 #define PG_STATE_WORD_0 0x02
47 #define PG_STATE_WORD_1 0x04
48 #define PG_STATE_WORD_2 0x08
49 #define PG_STATE_WORD_3 0x10
50 #define PG_STATE_DATA 0x20
52 #define PG_SWBYTE_H 0x01
53 #define PG_SWBYTE_L 0x02
55 /*--------------------------Define Parameters-------------------------------*/
58 /*------------------------------Define structure----------------------------*/
60 /*------------------------------Define structure----------------------------*/
63 /*------------------------Export global variable----------------------------*/
64 /*------------------------Export global variable----------------------------*/
66 /*------------------------Export Marco Definition---------------------------*/
68 /*------------------------Export Marco Definition---------------------------*/
71 /*--------------------------Exported Function prototype---------------------*/
73 EFUSE_Initialize(struct net_device* dev);
75 EFUSE_Read1Byte(struct net_device* dev,u16 Address);
77 EFUSE_Write1Byte(struct net_device* dev,u16 Address,u8 Value);
81 ReadEFuse(struct net_device* dev,u16 _offset,u16 _size_byte,u8* pbuf);
83 ReadEFuseByte(struct net_device* dev,u16 _offset,u8 *pbuf);
84 #endif // #if (EFUSE_FOR_92SU == 1)
87 EFUSE_ShadowRead(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 *Value);
89 EFUSE_ShadowWrite(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 Value);
91 EFUSE_ShadowUpdate(struct net_device* dev);
93 EFUSE_ShadowMapUpdate(struct net_device* dev);
96 EFUSE_ProgramMap(struct net_device* dev,char* pFileName, u8 TableType); // 0=Shadow 1=Real Efuse
97 /*--------------------------Exported Function prototype---------------------*/
101 #endif //__INC_EFUSE_H