First Support on Ginger and OMAP TI
[linux-ginger.git] / drivers / staging / rtl8192su / r8192S_Efuse.h
blob1e50153ba02ceea5bfb27f50c035e51d1d1fc8cd
1 /******************************************************************************
3 * (c) Copyright 2008, RealTEK Technologies Inc. All Rights Reserved.
5 * Module: Efuse.h ( Header File)
7 * Note:
9 * Function:
11 * Export:
13 * Abbrev:
15 * History:
16 * Data Who Remark
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
21 * style.
22 * 2. THe API we export to other module, we must redefine
23 * for 8192S series.
26 ******************************************************************************/
27 /* Check to see if the file has been included already. */
29 #ifndef __INC_EFUSE_H
30 #define __INC_EFUSE_H
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))
44 // From 8712!!!!!!!!
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---------------------*/
72 extern void
73 EFUSE_Initialize(struct net_device* dev);
74 extern u8
75 EFUSE_Read1Byte(struct net_device* dev,u16 Address);
76 extern void
77 EFUSE_Write1Byte(struct net_device* dev,u16 Address,u8 Value);
79 #ifdef EFUSE_FOR_92SU
80 extern void
81 ReadEFuse(struct net_device* dev,u16 _offset,u16 _size_byte,u8* pbuf);
82 extern void
83 ReadEFuseByte(struct net_device* dev,u16 _offset,u8 *pbuf);
84 #endif // #if (EFUSE_FOR_92SU == 1)
86 extern void
87 EFUSE_ShadowRead(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 *Value);
88 extern void
89 EFUSE_ShadowWrite(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 Value);
90 extern void
91 EFUSE_ShadowUpdate(struct net_device* dev);
92 extern void
93 EFUSE_ShadowMapUpdate(struct net_device* dev);
95 extern bool
96 EFUSE_ProgramMap(struct net_device* dev,char* pFileName, u8 TableType); // 0=Shadow 1=Real Efuse
97 /*--------------------------Exported Function prototype---------------------*/
99 /* End of Efuse.h */
101 #endif //__INC_EFUSE_H