rtl8xxxu: Use REG_EFUSE_TEST register only on multifunctional devices
rtl8192cu driver doesn't read/write the REG_EFUSE_TEST register. Neither does the rtl8188eu driver. Do it only for multifunc devices RTL8723AU/RTL8723BU. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
committed by
Kalle Valo
parent
e5c447ccf8
commit
38451998fb
@@ -1704,6 +1704,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
|
||||
priv->has_bluetooth = 1;
|
||||
if (val32 & MULTI_GPS_FUNC_EN)
|
||||
priv->has_gps = 1;
|
||||
priv->is_multi_func = 1;
|
||||
} else if (val32 & SYS_CFG_TYPE_ID) {
|
||||
bonding = rtl8xxxu_read32(priv, REG_HPON_FSM);
|
||||
bonding &= HPON_FSM_BONDING_MASK;
|
||||
@@ -1938,9 +1939,11 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv)
|
||||
if (val16 & EEPROM_BOOT)
|
||||
priv->boot_eeprom = 1;
|
||||
|
||||
val32 = rtl8xxxu_read32(priv, REG_EFUSE_TEST);
|
||||
val32 = (val32 & ~EFUSE_SELECT_MASK) | EFUSE_WIFI_SELECT;
|
||||
rtl8xxxu_write32(priv, REG_EFUSE_TEST, val32);
|
||||
if (priv->is_multi_func) {
|
||||
val32 = rtl8xxxu_read32(priv, REG_EFUSE_TEST);
|
||||
val32 = (val32 & ~EFUSE_SELECT_MASK) | EFUSE_WIFI_SELECT;
|
||||
rtl8xxxu_write32(priv, REG_EFUSE_TEST, val32);
|
||||
}
|
||||
|
||||
dev_dbg(dev, "Booting from %s\n",
|
||||
priv->boot_eeprom ? "EEPROM" : "EFUSE");
|
||||
|
||||
@@ -597,6 +597,7 @@ struct rtl8xxxu_priv {
|
||||
struct rtl8723au_idx ht20_max_power_offset[3];
|
||||
u32 chip_cut:4;
|
||||
u32 rom_rev:4;
|
||||
u32 is_multi_func:1;
|
||||
u32 has_wifi:1;
|
||||
u32 has_bluetooth:1;
|
||||
u32 enable_bluetooth:1;
|
||||
|
||||
Reference in New Issue
Block a user