1/****************************************************************************** 2 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved. 3 * 4 * Based on the r8180 driver, which is: 5 * Copyright 2004-2005 Andrea Merello <andreamrl@tiscali.it>, et al. 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of version 2 of the GNU General Public License as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 * 15 * You should have received a copy of the GNU General Public License along with 16 * this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 18 * 19 * The full GNU General Public License is included in this distribution in the 20 * file called LICENSE. 21 * 22 * Contact Information: 23 * wlanfae <wlanfae@realtek.com> 24******************************************************************************/ 25 26#ifndef __INC_EFUSE_H 27#define __INC_EFUSE_H 28 29#define EFUSE_FOR_92SU 1 30 31#define EFUSE_MAC_LEN 0x200 32#define EFUSE_REAL_CONTENT_LEN 512 33#define EFUSE_MAP_LEN 128 34#define EFUSE_MAX_SECTION 16 35#define EFUSE_MAX_WORD_UNIT 4 36 37#define EFUSE_INIT_MAP 0 38#define EFUSE_MODIFY_MAP 1 39 40#define EFUSE_CLK_CTRL EFUSE_CTRL 41#define EFUSE_BIT(x) (1 << (x)) 42 43#define PG_STATE_HEADER 0x01 44#define PG_STATE_WORD_0 0x02 45#define PG_STATE_WORD_1 0x04 46#define PG_STATE_WORD_2 0x08 47#define PG_STATE_WORD_3 0x10 48#define PG_STATE_DATA 0x20 49 50#define PG_SWBYTE_H 0x01 51#define PG_SWBYTE_L 0x02 52 53extern void 54EFUSE_Initialize(struct net_device* dev); 55extern u8 56EFUSE_Read1Byte(struct net_device* dev,u16 Address); 57extern void 58EFUSE_Write1Byte(struct net_device* dev,u16 Address,u8 Value); 59 60#ifdef EFUSE_FOR_92SU 61extern void 62ReadEFuse(struct net_device* dev,u16 _offset,u16 _size_byte,u8* pbuf); 63extern void 64ReadEFuseByte(struct net_device* dev,u16 _offset,u8 *pbuf); 65#endif 66 67extern void 68EFUSE_ShadowRead(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 *Value); 69extern void 70EFUSE_ShadowWrite(struct net_device* dev,unsigned char Type,unsigned short Offset,u32 Value); 71extern bool 72EFUSE_ShadowUpdate(struct net_device* dev); 73extern void 74EFUSE_ShadowMapUpdate(struct net_device* dev); 75 76extern bool 77EFUSE_ProgramMap(struct net_device* dev,char* pFileName, u8 TableType); // 0=Shadow 1=Real Efuse 78 79#endif 80