Commit 38451998 authored by Jakub Sitnicki's avatar Jakub Sitnicki Committed by Kalle Valo

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: default avatarJakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e5c447cc
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment