diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-03 08:34:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-03 08:34:00 -0700 |
commit | 5142c33ed86acbcef5c63a63d2b7384b9210d39f (patch) | |
tree | 6a0a36207ab436e1ef03bfefa7dac8f3a0cdfae5 /drivers/staging/rtl8192ee/efuse.h | |
parent | 5da77761e6fd51f633b4f31051c4f839e01c29c0 (diff) | |
parent | 7eb843aa5050a395bc922db1b41b7237f238d2ba (diff) |
Merge tag 'staging-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging into next
Pull staging driver updates from Greg KH:
"Here is the big staging driver pull request for 3.16-rc1.
Lots of stuff here, tons of cleanup patches, a few new drivers, and
some removed as well, but I think we are still adding a few thousand
more lines than we remove, due to the new drivers being bigger than
the ones deleted.
One notible bit of work did stand out, Jes Sorensen has gone on a
tear, fixing up a wireless driver to be "more sane" than it originally
was from the vendor, with over 500 patches merged here. Good stuff,
and a number of users laptops are better off for it.
All of this has been in linux-next for a while"
* tag 'staging-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1703 commits)
staging: skein: fix sparse warning for static declarations
staging/mt29f_spinand: coding style fixes
staging: silicom: fix sparse warning for static variable
staging: lustre: Fix coding style
staging: android: binder.c: Use more appropriate functions for euid retrieval
staging: lustre: fix integer as NULL pointer warnings
Revert "staging: dgap: remove unneeded kfree() in dgap_tty_register_ports()"
Staging: rtl8192u: r8192U_wx.c Fixed a misplaced brace
staging: ion: shrink highmem pages on kswapd
staging: ion: use compound pages on high order pages for system heap
staging: ion: remove struct ion_page_pool_item
staging: ion: simplify ion_page_pool_total()
staging: ion: tidy up a bit
staging: rtl8723au: Remove redundant casting in usb_ops_linux.c
staging: rtl8723au: Remove redundant casting in rtl8723a_hal_init.c
staging: rtl8723au: Remove redundant casting in rtw_xmit.c
staging: rtl8723au: Remove redundant casting in rtw_wlan_util.c
staging: rtl8723au: Remove redundant casting in rtw_sta_mgt.c
staging: rtl8723au: Remove redundant casting in rtw_recv.c
staging: rtl8723au: Remove redundant casting in rtw_mlme.c
...
Diffstat (limited to 'drivers/staging/rtl8192ee/efuse.h')
-rw-r--r-- | drivers/staging/rtl8192ee/efuse.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192ee/efuse.h b/drivers/staging/rtl8192ee/efuse.h new file mode 100644 index 000000000000..cc3e1116b3e4 --- /dev/null +++ b/drivers/staging/rtl8192ee/efuse.h @@ -0,0 +1,127 @@ +/****************************************************************************** + * + * Copyright(c) 2009-2010 Realtek Corporation. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * The full GNU General Public License is included in this distribution in the + * file called LICENSE. + * + * Contact Information: + * wlanfae <wlanfae@realtek.com> + * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, + * Hsinchu 300, Taiwan. + * + * Larry Finger <Larry.Finger@lwfinger.net> + * + *****************************************************************************/ + +#ifndef __RTL_EFUSE_H_ +#define __RTL_EFUSE_H_ + +#define EFUSE_IC_ID_OFFSET 506 + +/* +#define EFUSE_REAL_CONTENT_LEN 512 +#define EFUSE_MAP_LEN 128 +#define EFUSE_MAX_SECTION 16 +#define EFUSE_MAX_WORD_UNIT 4 +#define EFUSE_IC_ID_OFFSET 506 +*/ + +#define EFUSE_MAX_WORD_UNIT 4 + +#define EFUSE_INIT_MAP 0 +#define EFUSE_MODIFY_MAP 1 + +#define PG_STATE_HEADER 0x01 +#define PG_STATE_WORD_0 0x02 +#define PG_STATE_WORD_1 0x04 +#define PG_STATE_WORD_2 0x08 +#define PG_STATE_WORD_3 0x10 +#define PG_STATE_DATA 0x20 + +#define PG_SWBYTE_H 0x01 +#define PG_SWBYTE_L 0x02 + +#define _POWERON_DELAY_ +#define _PRE_EXECUTE_READ_CMD_ + +#define EFUSE_REPEAT_THRESHOLD_ 3 +#define EFUSE_ERROE_HANDLE 1 + +struct efuse_map { + u8 offset; + u8 word_start; + u8 byte_start; + u8 byte_cnts; +}; + +struct pgpkt_struct { + u8 offset; + u8 word_en; + u8 data[8]; +}; + +enum efuse_data_item { + EFUSE_CHIP_ID = 0, + EFUSE_LDO_SETTING, + EFUSE_CLK_SETTING, + EFUSE_SDIO_SETTING, + EFUSE_CCCR, + EFUSE_SDIO_MODE, + EFUSE_OCR, + EFUSE_F0CIS, + EFUSE_F1CIS, + EFUSE_MAC_ADDR, + EFUSE_EEPROM_VER, + EFUSE_CHAN_PLAN, + EFUSE_TXPW_TAB +}; + +enum { + VOLTAGE_V25 = 0x03, + LDOE25_SHIFT = 28, +}; + +struct efuse_priv { + u8 id[2]; + u8 ldo_setting[2]; + u8 clk_setting[2]; + u8 cccr; + u8 sdio_mode; + u8 ocr[3]; + u8 cis0[17]; + u8 cis1[48]; + u8 mac_addr[6]; + u8 eeprom_verno; + u8 channel_plan; + u8 tx_power_b[14]; + u8 tx_power_g[14]; +}; + +void read92e_efuse_byte(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf); +void efuse92e_initialize(struct ieee80211_hw *hw); +u8 stg_efuse_read_1byte(struct ieee80211_hw *hw, u16 address); +int stg_efuse_one_byte_read(struct ieee80211_hw *hw, u16 addr, u8 *data); +void efuse92e_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value); +void read92e_efuse(struct ieee80211_hw *hw, u16 _offset, + u16 _size_byte, u8 *pbuf); +void efuse92e_shadow_read(struct ieee80211_hw *hw, u8 type, + u16 offset, u32 *value); +void efuse92e_shadow_write(struct ieee80211_hw *hw, u8 type, + u16 offset, u32 value); +bool efuse92e_shadow_update(struct ieee80211_hw *hw); +bool efuse92e_shadow_update_chk(struct ieee80211_hw *hw); +void stg_rtl_efuse92e_shadow_map_update(struct ieee80211_hw *hw); +void efuse92e_force_write_vendor_Id(struct ieee80211_hw *hw); +void efuse92e_re_pg_section(struct ieee80211_hw *hw, u8 section_idx); + +#endif |