summaryrefslogtreecommitdiff
path: root/drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-07 13:31:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-07 13:31:29 -0700
commite0dccbdf5ac7ccb9da5612100dedba302f3ebcfe (patch)
tree0bdabbf13844ae18da61bc060348850a8038f0ba /drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c
parentcf482a49af564a3044de3178ea28f10ad5921b38 (diff)
parente2a5be107f52cefb9010ccae6f569c3ddaa954cc (diff)
Merge tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging / IIO driver updates from Greg KH: "Here is the big staging and iio driver update for 5.2-rc1. Lots of tiny fixes all over the staging and IIO driver trees here, along with some new IIO drivers. The "counter" subsystem was added in here as well, as it is needed by the IIO drivers and subsystem. Also we ended up deleting two drivers, making this pull request remove a few hundred thousand lines of code, always a nice thing to see. Both of the drivers removed have been replaced with "real" drivers in their various subsystem directories, and they will be coming to you from those locations during this merge window. There are some core vt/selection changes in here, that was due to some cleanups needed for the speakup fixes. Those have all been acked by the various subsystem maintainers (i.e. me), so those are ok. We also added a few new drivers, for some odd hardware, giving new developers plenty to work on with basic coding style cleanups to come in the near future. Other than that, nothing unusual here. All of these have been in linux-next for a while with no reported issues, other than an odd gcc warning for one of the new drivers that should be fixed up soon" [ I fixed up the warning myself - Linus ] * tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (663 commits) staging: kpc2000: kpc_spi: Fix build error for {read,write}q Staging: rtl8192e: Remove extra space before break statement Staging: rtl8192u: ieee80211: Fix if-else indentation warning Staging: rtl8192u: ieee80211: Fix indentation errors by removing extra spaces staging: most: cdev: fix chrdev_region leak in mod_exit staging: wlan-ng: Fix improper SPDX comment style staging: rtl8192u: ieee80211: Resolve ERROR reported by checkpatch staging: vc04_services: bcm2835-camera: Compress two lines into one line staging: rtl8723bs: core: Use !x in place of NULL comparison. staging: rtl8723bs: core: Prefer using the BIT Macro. staging: fieldbus: anybus-s: fix wait_for_completion_timeout return handling staging: kpc2000: fix up build problems with readq() staging: rtlwifi: move remaining phydm .h files staging: rtlwifi: strip down phydm .h files staging: rtlwifi: delete the staging driver staging: fieldbus: anybus-s: rename bus id field to avoid confusion staging: fieldbus: anybus-s: keep device bus id in bus endianness Staging: sm750fb: Change *array into *const array staging: rtl8192u: ieee80211: Fix spelling mistake staging: rtl8192u: ieee80211: Replace bit shifting with BIT macro ...
Diffstat (limited to 'drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c')
-rw-r--r--drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c157
1 files changed, 0 insertions, 157 deletions
diff --git a/drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c b/drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c
deleted file mode 100644
index 8f96c77974cc..000000000000
--- a/drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c
+++ /dev/null
@@ -1,157 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2016 Realtek Corporation.
- *
- * 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>
- *
- *****************************************************************************/
-
-#include "../mp_precomp.h"
-#include "../phydm_precomp.h"
-
-void odm_config_rf_reg_8822b(struct phy_dm_struct *dm, u32 addr, u32 data,
- enum odm_rf_radio_path RF_PATH, u32 reg_addr)
-{
- if (addr == 0xffe) {
- ODM_sleep_ms(50);
- } else if (addr == 0xfe) {
- ODM_delay_us(100);
- } else {
- odm_set_rf_reg(dm, RF_PATH, reg_addr, RFREGOFFSETMASK, data);
-
- /* Add 1us delay between BB/RF register setting. */
- ODM_delay_us(1);
- }
-}
-
-void odm_config_rf_radio_a_8822b(struct phy_dm_struct *dm, u32 addr, u32 data)
-{
- u32 content = 0x1000; /* RF_Content: radioa_txt */
- u32 maskfor_phy_set = (u32)(content & 0xE000);
-
- odm_config_rf_reg_8822b(dm, addr, data, ODM_RF_PATH_A,
- addr | maskfor_phy_set);
-
- ODM_RT_TRACE(
- dm, ODM_COMP_INIT,
- "===> odm_config_rf_with_header_file: [RadioA] %08X %08X\n",
- addr, data);
-}
-
-void odm_config_rf_radio_b_8822b(struct phy_dm_struct *dm, u32 addr, u32 data)
-{
- u32 content = 0x1001; /* RF_Content: radiob_txt */
- u32 maskfor_phy_set = (u32)(content & 0xE000);
-
- odm_config_rf_reg_8822b(dm, addr, data, ODM_RF_PATH_B,
- addr | maskfor_phy_set);
-
- ODM_RT_TRACE(
- dm, ODM_COMP_INIT,
- "===> odm_config_rf_with_header_file: [RadioB] %08X %08X\n",
- addr, data);
-}
-
-void odm_config_mac_8822b(struct phy_dm_struct *dm, u32 addr, u8 data)
-{
- odm_write_1byte(dm, addr, data);
- ODM_RT_TRACE(
- dm, ODM_COMP_INIT,
- "===> odm_config_mac_with_header_file: [MAC_REG] %08X %08X\n",
- addr, data);
-}
-
-void odm_update_agc_big_jump_lmt_8822b(struct phy_dm_struct *dm, u32 addr,
- u32 data)
-{
- struct dig_thres *dig_tab = &dm->dm_dig_table;
- u8 rf_gain_idx = (u8)((data & 0xFF000000) >> 24);
- u8 bb_gain_idx = (u8)((data & 0x00ff0000) >> 16);
- u8 agc_table_idx = (u8)((data & 0x00000f00) >> 8);
- static bool is_limit;
-
- if (addr != 0x81c)
- return;
-
- if (bb_gain_idx > 0x3c) {
- if ((rf_gain_idx == dig_tab->rf_gain_idx) && !is_limit) {
- is_limit = true;
- dig_tab->big_jump_lmt[agc_table_idx] = bb_gain_idx - 2;
- ODM_RT_TRACE(
- dm, ODM_COMP_DIG,
- "===> [AGC_TAB] big_jump_lmt [%d] = 0x%x\n",
- agc_table_idx,
- dig_tab->big_jump_lmt[agc_table_idx]);
- }
- } else {
- is_limit = false;
- }
-
- dig_tab->rf_gain_idx = rf_gain_idx;
-}
-
-void odm_config_bb_agc_8822b(struct phy_dm_struct *dm, u32 addr, u32 bitmask,
- u32 data)
-{
- odm_update_agc_big_jump_lmt_8822b(dm, addr, data);
-
- odm_set_bb_reg(dm, addr, bitmask, data);
-
- /* Add 1us delay between BB/RF register setting. */
- ODM_delay_us(1);
-
- ODM_RT_TRACE(dm, ODM_COMP_INIT, "===> %s: [AGC_TAB] %08X %08X\n",
- __func__, addr, data);
-}
-
-void odm_config_bb_phy_reg_pg_8822b(struct phy_dm_struct *dm, u32 band,
- u32 rf_path, u32 tx_num, u32 addr,
- u32 bitmask, u32 data)
-{
- if (addr == 0xfe || addr == 0xffe) {
- ODM_sleep_ms(50);
- } else {
- phy_store_tx_power_by_rate(dm->adapter, band, rf_path, tx_num,
- addr, bitmask, data);
- }
- ODM_RT_TRACE(dm, ODM_COMP_INIT, "===> %s: [PHY_REG] %08X %08X %08X\n",
- __func__, addr, bitmask, data);
-}
-
-void odm_config_bb_phy_8822b(struct phy_dm_struct *dm, u32 addr, u32 bitmask,
- u32 data)
-{
- if (addr == 0xfe)
- ODM_sleep_ms(50);
- else if (addr == 0xfd)
- ODM_delay_ms(5);
- else if (addr == 0xfc)
- ODM_delay_ms(1);
- else if (addr == 0xfb)
- ODM_delay_us(50);
- else if (addr == 0xfa)
- ODM_delay_us(5);
- else if (addr == 0xf9)
- ODM_delay_us(1);
- else
- odm_set_bb_reg(dm, addr, bitmask, data);
-
- /* Add 1us delay between BB/RF register setting. */
- ODM_delay_us(1);
- ODM_RT_TRACE(dm, ODM_COMP_INIT, "===> %s: [PHY_REG] %08X %08X\n",
- __func__, addr, data);
-}
-
-void odm_config_bb_txpwr_lmt_8822b(struct phy_dm_struct *dm, u8 *regulation,
- u8 *band, u8 *bandwidth, u8 *rate_section,
- u8 *rf_path, u8 *channel, u8 *power_limit)
-{
- phy_set_tx_power_limit(dm, regulation, band, bandwidth, rate_section,
- rf_path, channel, power_limit);
-}