/*
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/cordic.h>
#include <brcm_hw_ids.h>
#include <aiutils.h>
#include <chipcommon.h>
#include <pmu.h>
#include <d11.h>
#include <phy_shim.h>
#include "phy_int.h"
#include "phy_hal.h"
#include "phy_radio.h"
#include "phyreg_n.h"
#include "phytbl_n.h"
#include "soc.h"
#define READ_RADIO_REG2(pi, radio_type, jspace, core, reg_name) \
read_radio_reg(pi, radio_type##_##jspace##_##reg_name | \
((core == PHY_CORE_0) ? \
radio_type##_##jspace##0 : \
radio_type##_##jspace##1))
#define WRITE_RADIO_REG2(pi, radio_type, jspace, core, reg_name, value) \
write_radio_reg(pi, radio_type##_##jspace##_##reg_name | \
((core == PHY_CORE_0) ? \
radio_type##_##jspace##0 : \
radio_type##_##jspace##1), value)
#define WRITE_RADIO_SYN(pi, radio_type, reg_name, value) \
write_radio_reg(pi, radio_type##_##SYN##_##reg_name, value)
#define READ_RADIO_REG3(pi, radio_type, jspace, core, reg_name) \
read_radio_reg(pi, ((core == PHY_CORE_0) ? \
radio_type##_##jspace##0##_##reg_name : \
radio_type##_##jspace##1##_##reg_name))
#define WRITE_RADIO_REG3(pi, radio_type, jspace, core, reg_name, value) \
write_radio_reg(pi, ((core == PHY_CORE_0) ? \
radio_type##_##jspace##0##_##reg_name : \
radio_type##_##jspace##1##_##reg_name), \
value)
#define READ_RADIO_REG4(pi, radio_type, jspace, core, reg_name) \
read_radio_reg(pi, ((core == PHY_CORE_0) ? \
radio_type##_##reg_name##_##jspace##0 : \
radio_type##_##reg_name##_##jspace##1))
#define WRITE_RADIO_REG4(pi, radio_type, jspace, core, reg_name, value) \
write_radio_reg(pi, ((core == PHY_CORE_0) ? \
radio_type##_##reg_name##_##jspace##0 : \
radio_type##_##reg_name##_##jspace##1), \
value)
#define NPHY_ACI_MAX_UNDETECT_WINDOW_SZ 40
#define NPHY_ACI_CHANNEL_DELTA 5
#define NPHY_ACI_CHANNEL_SKIP 4
#define NPHY_ACI_40MHZ_CHANNEL_DELTA 6
#define NPHY_ACI_40MHZ_CHANNEL_SKIP 5
#define NPHY_ACI_40MHZ_CHANNEL_DELTA_GE_REV3 6
#define NPHY_ACI_40MHZ_CHANNEL_SKIP_GE_REV3 5
#define NPHY_ACI_CHANNEL_DELTA_GE_REV3 4
#define NPHY_ACI_CHANNEL_SKIP_GE_REV3 3
#define NPHY_NOISE_NOASSOC_GLITCH_TH_UP 2
#define NPHY_NOISE_NOASSOC_GLITCH_TH_DN 8
#define NPHY_NOISE_ASSOC_GLITCH_TH_UP 2
#define NPHY_NOISE_ASSOC_GLITCH_TH_DN 8
#define NPHY_NOISE_ASSOC_ACI_GLITCH_TH_UP 2
#define NPHY_NOISE_ASSOC_ACI_GLITCH_TH_DN 8
#define NPHY_NOISE_NOASSOC_ENTER_TH 400
#define NPHY_NOISE_ASSOC_ENTER_TH 400
#define NPHY_NOISE_ASSOC_RX_GLITCH_BADPLCP_ENTER_TH 400
#define NPHY_NOISE_CRSMINPWR_ARRAY_MAX_INDEX 44
#define NPHY_NOISE_CRSMINPWR_ARRAY_MAX_INDEX_REV_7 56
#define NPHY_NOISE_NOASSOC_CRSIDX_INCR 16
#define NPHY_NOISE_ASSOC_CRSIDX_INCR 8
#define NPHY_IS_SROM_REINTERPRET NREV_GE(pi->pubpi.phy_rev, 5)
#define NPHY_RSSICAL_MAXREAD 31
#define NPHY_RSSICAL_NPOLL 8
#define NPHY_RSSICAL_MAXD (1<<20)
#define NPHY_MIN_RXIQ_PWR 2
#define NPHY_RSSICAL_W1_TARGET 25
#define NPHY_RSSICAL_W2_TARGET NPHY_RSSICAL_W1_TARGET
#define NPHY_RSSICAL_NB_TARGET 0
#define NPHY_RSSICAL_W1_TARGET_REV3 29
#define NPHY_RSSICAL_W2_TARGET_REV3 NPHY_RSSICAL_W1_TARGET_REV3
#define NPHY_CALSANITY_RSSI_NB_MAX_POS 9
#define NPHY_CALSANITY_RSSI_NB_MAX_NEG -9
#define NPHY_CALSANITY_RSSI_W1_MAX_POS 12
#define NPHY_CALSANITY_RSSI_W1_MAX_NEG (NPHY_RSSICAL_W1_TARGET - \
NPHY_RSSICAL_MAXREAD)
#define NPHY_CALSANITY_RSSI_W2_MAX_POS NPHY_CALSANITY_RSSI_W1_MAX_POS
#define NPHY_CALSANITY_RSSI_W2_MAX_NEG (NPHY_RSSICAL_W2_TARGET - \
NPHY_RSSICAL_MAXREAD)
#define NPHY_RSSI_SXT(x) ((s8) (-((x) & 0x20) + ((x) & 0x1f)))
#define NPHY_RSSI_NB_VIOL(x) (((x) > NPHY_CALSANITY_RSSI_NB_MAX_POS) || \
((x) < NPHY_CALSANITY_RSSI_NB_MAX_NEG))
#define NPHY_RSSI_W1_VIOL(x) (((x) > NPHY_CALSANITY_RSSI_W1_MAX_POS) || \
((x) < NPHY_CALSANITY_RSSI_W1_MAX_NEG))
#define NPHY_RSSI_W2_VIOL(x) (((x) > NPHY_CALSANITY_RSSI_W2_MAX_POS) || \
((x) < NPHY_CALSANITY_RSSI_W2_MAX_NEG))
#define NPHY_IQCAL_NUMGAINS 9
#define NPHY_N_GCTL 0x66
#define NPHY_PAPD_EPS_TBL_SIZE 64
#define NPHY_PAPD_SCL_TBL_SIZE 64
#define NPHY_NUM_DIG_FILT_COEFFS 15
#define NPHY_PAPD_COMP_OFF 0
#define NPHY_PAPD_COMP_ON 1
#define NPHY_SROM_TEMPSHIFT 32
#define NPHY_SROM_MAXTEMPOFFSET 16
#define NPHY_SROM_MINTEMPOFFSET -16
#define NPHY_CAL_MAXTEMPDELTA 64
#define NPHY_NOISEVAR_TBLLEN40 256
#define NPHY_NOISEVAR_TBLLEN20 128
#define NPHY_ANARXLPFBW_REDUCTIONFACT 7
#define NPHY_ADJUSTED_MINCRSPOWER 0x1e
/* 5357 Chip specific ChipControl register bits */
#define CCTRL5357_EXTPA (1<<14) /* extPA in ChipControl 1, bit 14 */
#define CCTRL5357_ANT_MUX_2o3 (1<<15) /* 2o3 in ChipControl 1, bit 15 */
#define NPHY_CAL_TSSISAMPS 64
#define NPHY_TEST_TONE_FREQ_40MHz 4000
#define NPHY_TEST_TONE_FREQ_20MHz 2500
#define MAX_205x_RCAL_WAITLOOPS 10000
#define NPHY_RXCAL_TONEAMP 181
#define NPHY_RXCAL_TONEFREQ_40MHz 4000
#define NPHY_RXCAL_TONEFREQ_20MHz 2000
#define TXFILT_SHAPING_OFDM20 0
#define TXFILT_SHAPING_OFDM40 1
#define TXFILT_SHAPING_CCK 2
#define TXFILT_DEFAULT_OFDM20 3
#define TXFILT_DEFAULT_OFDM40 4
struct nphy_iqcal_params {
u16 txlpf;
u16 txgm;
u16 pga;
u16 pad;
u16 ipa;
u16 cal_gain;
u16 ncorr[5];
};
struct nphy_txiqcal_ladder {
u8 percent;
u8 g_env;
};
struct nphy_ipa_txcalgains {
struct nphy_txgains gains;
bool useindex;
u8 index;
};
struct nphy_papd_restore_state {
u16 fbmix[2];
u16 vga_master[2];
u16 intpa_master[2];
u16 afectrl[2];
u16 afeoverride[2];
u16 pwrup[2];
u16 atten[2];
u16 mm;
};
struct nphy_ipa_txrxgain {
u16 hpvga;
u16 lpf_biq1;
u16 lpf_biq0;
u16 lna2;
u16 lna1;
s8 txpwrindex;
};
#define NPHY_IPA_RXCAL_MAXGAININDEX (6 - 1)
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_5GHz[] = {
{0, 0, 0, 0, 0, 100},
{0, 0, 0, 0, 0, 50},
{0, 0, 0, 0, 0, -1},
{0, 0, 0, 3, 0, -1},
{0, 0, 3, 3, 0, -1},
{0, 2, 3, 3, 0, -1}
};
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_2GHz[] = {
{0, 0, 0, 0, 0, 128},
{0, 0, 0, 0, 0, 70},
{0, 0, 0, 0, 0, 20},
{0, 0, 0, 3, 0, 20},
{0, 0, 3, 3, 0, 20},
{0, 2, 3, 3, 0, 20}
};
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_5GHz_rev7[] = {
{0, 0, 0, 0, 0, 100},
{0, 0, 0, 0, 0, 50},
{0, 0, 0, 0, 0, -1},
{0, 0, 0, 3, 0, -1},
{0, 0, 3, 3, 0, -1},
{0, 0, 5, 3, 0, -1}
};
static const struct nphy_ipa_txrxgain nphy_ipa_rxcal_gaintbl_2GHz_rev7[] = {
{0, 0, 0, 0, 0, 10},
{0, 0, 0, 1, 0, 10},
{0, 0, 1, 2, 0, 10},
{0, 0, 1, 3, 0, 10},
{0, 0, 4, 3, 0, 10},
{0, 0, 6, 3, 0, 10}
};
enum {
NPHY_RXCAL_GAIN_INIT = 0,
NPHY_RXCAL_GAIN_UP,
NPHY_RXCAL_GAIN_DOWN
};
#define wlc_phy_get_papd_nphy(pi) \
(read_phy_reg((pi), 0x1e7) & \
((0x1 << 15) | \
(0x1 << 14) | \
(0x1 << 13)))
static const u16 NPHY_IPA_REV4_txdigi_filtcoeffs[][NPHY_NUM_DIG_FILT_COEFFS] = {
{-377, 137, -407, 208, -1527, 956, 93, 186, 93,
230, -44, 230, 201, -191, 201},
{-77, 20, -98, 49, -93, 60, 56, 111, 56, 26, -5,
26, 34, -32, 34},
{-360, 164, -376, 164, -1533, 576, 308, -314, 308,
121, -73, 121, 91, 124, 91},
{-295, 200, -363, 142, -1391, 826, 151, 301, 151,
151, 301,
没有合适的资源?快使用搜索试试~ 我知道了~
linux内核版本4.9.37
5星 · 超过95%的资源 需积分: 49 185 下载量 8 浏览量
2018-06-13
17:20:43
上传
评论 3
收藏 135.13MB GZ 举报
温馨提示
linux内核版本, 海思3559A指定版本 59A使用该内核的方式 打补丁 1)将下载的 linux-4.9.37.tar.gz 存放到 osdrv的opensource/kernel目录中 2)在linux服务器中进入 osdrv 的根目录,执行如下命令: cd opensource/kernel tar -zxf linux-4.9.37.tar.gz mv linux-4.9.37 linux-4.9.y cd linux-4.9.y patch -p1 < ../linux-4.9.37.patch cd ../ tar -czf linux-4.9.y.tgz linux-4.9.y cd ../../ 或 1)将下载的 linux-4.9.37.tar.gz 存放到 osdrv的opensource/kernel目录中 2)在linux服务器中进入 osdrv 的根目录,执行如下命令: make atf
资源推荐
资源详情
资源评论
收起资源包目录
linux内核版本4.9.37 (2000个子文件)
phy_n.c 916KB
nls_cp949.c 855KB
nls_cp936.c 682KB
nls_cp950.c 580KB
lpfc_sli.c 526KB
radio_2056.c 509KB
intel_display.c 483KB
nls_cp932.c 480KB
tg3.c 466KB
message.c 435KB
chip.c 435KB
bnx2x_main.c 419KB
bnx2x_link.c 411KB
nl80211.c 383KB
drxj.c 351KB
advansys.c 346KB
lpfc_init.c 337KB
init301.c 334KB
ipw2200.c 324KB
vmx.c 321KB
i40e_main.c 318KB
extent-tree.c 305KB
nm256_coef.c 301KB
ipr.c 300KB
aic79xx_core.c 293KB
lpfc_els.c 289KB
inode.c 283KB
ql4_os.c 283KB
cik.c 281KB
hpsa.c 280KB
ixgbe_main.c 277KB
wmi.c 269KB
qib_iba7322.c 265KB
mpt3sas_scsih.c 264KB
wiretest.c 262KB
DAC960.c 260KB
core.c 257KB
zc3xx.c 253KB
si_dpm.c 253KB
nfs4proc.c 251KB
thinkpad_acpi.c 247KB
rt2800lib.c 246KB
s2io.c 239KB
fair.c 237KB
mptbase.c 237KB
t4_hw.c 234KB
md.c 233KB
ips.c 232KB
si_dpm.c 230KB
intel_pm.c 229KB
synclink.c 229KB
niu.c 229KB
gfx_v8_0.c 229KB
raid5.c 225KB
ipw2100.c 225KB
si.c 223KB
igb_main.c 222KB
ppc-opc.c 221KB
socket.c 219KB
x86.c 219KB
airo.c 218KB
core.c 217KB
bnx2.c 217KB
patch_realtek.c 216KB
main.c 214KB
netdev.c 213KB
aic7xxx_core.c 211KB
cx25840-core.c 211KB
ncr53c8xx.c 211KB
dev.c 210KB
clk-exynos5433.c 209KB
r8169.c 209KB
saa7134-cards.c 208KB
page_alloc.c 203KB
mac.c 202KB
qed_debug.c 200KB
phy_n.c 199KB
pinctrl-atlas7.c 198KB
sm_statefuns.c 197KB
nfs4xdr.c 197KB
megaraid_sas_base.c 196KB
ci_dpm.c 196KB
xattr.c 193KB
FlashPoint.c 193KB
topro.c 192KB
cifssmb.c 192KB
pfc-r8a7791.c 192KB
alloc.c 190KB
xfs_bmap.c 190KB
forcedeth.c 189KB
cfg80211.c 189KB
lpfc_hbadisc.c 188KB
volumes.c 188KB
qla_target.c 187KB
trace.c 186KB
mgmt.c 186KB
4965-mac.c 185KB
hdspm.c 185KB
libata-core.c 185KB
evergreen.c 184KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- 潇湘寒雨2019-08-28还可以吧 不错
- just__be__yourself2018-10-31不错错,挺好的
small0224
- 粉丝: 1
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功