Merge branch 'timers-for-linus-hpet' of git://git.kernel.org/pub/scm/linux/kernel...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / rtl8192su / r8192S_Efuse.h
CommitLineData
5f53d8ca
JC
1/******************************************************************************
2 *
3 * (c) Copyright 2008, RealTEK Technologies Inc. All Rights Reserved.
4 *
5 * Module: Efuse.h ( Header File)
6 *
7 * Note:
8 *
9 * Function:
10 *
11 * Export:
12 *
13 * Abbrev:
14 *
15 * History:
16 * Data Who Remark
17 *
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.
24 *
25 *
26******************************************************************************/
27/* Check to see if the file has been included already. */
28
29#ifndef __INC_EFUSE_H
30#define __INC_EFUSE_H
31
32// Roger porting for 8192SU
33#define EFUSE_FOR_92SU 1
34
35/*--------------------------Define Parameters-------------------------------*/
36#define EFUSE_MAC_LEN 0x200
37
38#define EFUSE_INIT_MAP 0
39#define EFUSE_MODIFY_MAP 1
40
41#define EFUSE_CLK_CTRL EFUSE_CTRL
42#define EFUSE_BIT(x) (1 << (x))
43
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
51
52#define PG_SWBYTE_H 0x01
53#define PG_SWBYTE_L 0x02
54
55/*--------------------------Define Parameters-------------------------------*/
56
57
58/*------------------------------Define structure----------------------------*/
59
60/*------------------------------Define structure----------------------------*/
61
62
63/*------------------------Export global variable----------------------------*/
64/*------------------------Export global variable----------------------------*/
65
66/*------------------------Export Marco Definition---------------------------*/
67
68/*------------------------Export Marco Definition---------------------------*/
69
70
71/*--------------------------Exported Function prototype---------------------*/
72extern void
73EFUSE_Initialize(struct net_device* dev);
74extern u8
75EFUSE_Read1Byte(struct net_device* dev,u16 Address);
76extern void
77EFUSE_Write1Byte(struct net_device* dev,u16 Address,u8 Value);
78
79#ifdef EFUSE_FOR_92SU
80extern void
81ReadEFuse(struct net_device* dev,u16 _offset,u16 _size_byte,u8* pbuf);
82extern void
83ReadEFuseByte(struct net_device* dev,u16 _offset,u8 *pbuf);
84#endif // #if (EFUSE_FOR_92SU == 1)
85
86extern void
87EFUSE_ShadowRead(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 *Value);
88extern void
89EFUSE_ShadowWrite(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 Value);
90extern void
91EFUSE_ShadowUpdate(struct net_device* dev);
92extern void
93EFUSE_ShadowMapUpdate(struct net_device* dev);
94
95extern bool
96EFUSE_ProgramMap(struct net_device* dev,char* pFileName, u8 TableType); // 0=Shadow 1=Real Efuse
97/*--------------------------Exported Function prototype---------------------*/
98
99/* End of Efuse.h */
100
101#endif //__INC_EFUSE_H