Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rtl871x_eeprom.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #ifndef __RTL871X_EEPROM_H__
21 #define __RTL871X_EEPROM_H__
22 
23 #include "osdep_service.h"
24 
25 #define RTL8712_EEPROM_ID 0x8712
26 #define EEPROM_MAX_SIZE 256
27 #define CLOCK_RATE 50 /*100us*/
28 
29 /*- EEPROM opcodes*/
30 #define EEPROM_READ_OPCODE 06
31 #define EEPROM_WRITE_OPCODE 05
32 #define EEPROM_ERASE_OPCODE 07
33 #define EEPROM_EWEN_OPCODE 19 /* Erase/write enable*/
34 #define EEPROM_EWDS_OPCODE 16 /* Erase/write disable*/
35 
36 #define EEPROM_CID_DEFAULT 0x0
37 #define EEPROM_CID_ALPHA 0x1
38 #define EEPROM_CID_Senao 0x3
39 #define EEPROM_CID_NetCore 0x5
40 #define EEPROM_CID_CAMEO 0X8
41 #define EEPROM_CID_SITECOM 0x9
42 #define EEPROM_CID_COREGA 0xB
43 #define EEPROM_CID_EDIMAX_BELKIN 0xC
44 #define EEPROM_CID_SERCOMM_BELKIN 0xE
45 #define EEPROM_CID_CAMEO1 0xF
46 #define EEPROM_CID_WNC_COREGA 0x12
47 #define EEPROM_CID_CLEVO 0x13
48 #define EEPROM_CID_WHQL 0xFE
49 
68  RT_CID_CCX = 17,
80 };
81 
82 struct eeprom_priv {
92  u8 tx_power_a[201];
95 };
96 
97 void r8712_eeprom_write16(struct _adapter *padapter, u16 reg, u16 data);
98 u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg);
99 
100 #endif /*__RTL871X_EEPROM_H__*/
101