mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 01:32:46 +07:00
rtl8xxxu: Handle XTAL_K value in efuse specific location
Retrieve the XTAL_K value in the parse_efuse() functions as it's location various on a per device basis. For parts that do not provide an XTAL_K value, skip setting it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
8baf670b89
commit
4ef22eb933
@ -2314,6 +2314,10 @@ static int rtl8723au_parse_efuse(struct rtl8xxxu_priv *priv)
|
||||
efuse->ht20_max_power_offset,
|
||||
sizeof(priv->ht20_max_power_offset));
|
||||
|
||||
if (priv->efuse_wifi.efuse8723.version >= 0x01) {
|
||||
priv->has_xtalk = 1;
|
||||
priv->xtalk = priv->efuse_wifi.efuse8723.xtal_k & 0x3f;
|
||||
}
|
||||
dev_info(&priv->udev->dev, "Vendor: %.7s\n",
|
||||
efuse->vendor_name);
|
||||
dev_info(&priv->udev->dev, "Product: %.41s\n",
|
||||
@ -2340,6 +2344,9 @@ static int rtl8723bu_parse_efuse(struct rtl8xxxu_priv *priv)
|
||||
memcpy(priv->ht40_1s_tx_power_index_B, efuse->ht40_1s_tx_power_index_B,
|
||||
sizeof(priv->ht40_1s_tx_power_index_B));
|
||||
|
||||
priv->has_xtalk = 1;
|
||||
priv->xtalk = priv->efuse_wifi.efuse8723bu.xtal_k & 0x3f;
|
||||
|
||||
dev_info(&priv->udev->dev, "Vendor: %.7s\n", efuse->vendor_name);
|
||||
dev_info(&priv->udev->dev, "Product: %.41s\n", efuse->device_name);
|
||||
|
||||
@ -2444,6 +2451,9 @@ static int rtl8192eu_parse_efuse(struct rtl8xxxu_priv *priv)
|
||||
|
||||
ether_addr_copy(priv->mac_addr, efuse->mac_addr);
|
||||
|
||||
priv->has_xtalk = 1;
|
||||
priv->xtalk = priv->efuse_wifi.efuse8192eu.xtal_k & 0x3f;
|
||||
|
||||
dev_info(&priv->udev->dev, "Vendor: %.7s\n", efuse->vendor_name);
|
||||
dev_info(&priv->udev->dev, "Product: %.11s\n", efuse->device_name);
|
||||
dev_info(&priv->udev->dev, "Serial: %.11s\n", efuse->serial);
|
||||
@ -3122,11 +3132,10 @@ static int rtl8xxxu_init_phy_bb(struct rtl8xxxu_priv *priv)
|
||||
else
|
||||
rtl8xxxu_init_phy_regs(priv, rtl8xxx_agc_standard_table);
|
||||
|
||||
if ((priv->rtlchip == 0x8723a || priv->rtlchip == 0x8723b) &&
|
||||
priv->efuse_wifi.efuse8723.version >= 0x01) {
|
||||
if (priv->has_xtalk) {
|
||||
val32 = rtl8xxxu_read32(priv, REG_MAC_PHY_CTRL);
|
||||
|
||||
val8 = priv->efuse_wifi.efuse8723.xtal_k & 0x3f;
|
||||
val8 = priv->xtalk;
|
||||
val32 &= 0xff000fff;
|
||||
val32 |= ((val8 | (val8 << 6)) << 12);
|
||||
|
||||
|
@ -1063,6 +1063,8 @@ struct rtl8xxxu_priv {
|
||||
u32 ep_tx_high_queue:1;
|
||||
u32 ep_tx_normal_queue:1;
|
||||
u32 ep_tx_low_queue:1;
|
||||
u32 has_xtalk:1;
|
||||
u8 xtalk;
|
||||
unsigned int pipe_interrupt;
|
||||
unsigned int pipe_in;
|
||||
unsigned int pipe_out[TXDESC_QUEUE_MAX];
|
||||
|
Loading…
Reference in New Issue
Block a user