2019-07-25 05:52:09

by Tony Chuang

[permalink] [raw]
Subject: [PATCH v2 1/5] rtw88: switch specified efuse bank

From: Yan-Hsuan Chuang <[email protected]>

Allows to switch different type of efuse bank by passing
the bank type to swtich to.

Signed-off-by: Yan-Hsuan Chuang <[email protected]>
---
v1 -> v2
no change

drivers/net/wireless/realtek/rtw88/efuse.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/efuse.c b/drivers/net/wireless/realtek/rtw88/efuse.c
index 212c837..66e56f3 100644
--- a/drivers/net/wireless/realtek/rtw88/efuse.c
+++ b/drivers/net/wireless/realtek/rtw88/efuse.c
@@ -9,10 +9,10 @@

#define RTW_EFUSE_BANK_WIFI 0x0

-static void switch_efuse_bank(struct rtw_dev *rtwdev)
+static void switch_efuse_bank(struct rtw_dev *rtwdev, u8 efuse_bank)
{
rtw_write32_mask(rtwdev, REG_LDO_EFUSE_CTRL, BIT_MASK_EFUSE_BANK_SEL,
- RTW_EFUSE_BANK_WIFI);
+ efuse_bank);
}

#define invalid_efuse_header(hdr1, hdr2) \
@@ -90,7 +90,7 @@ static int rtw_dump_physical_efuse_map(struct rtw_dev *rtwdev, u8 *map)
u32 addr;
u32 cnt;

- switch_efuse_bank(rtwdev);
+ switch_efuse_bank(rtwdev, RTW_EFUSE_BANK_WIFI);

/* disable 2.5V LDO */
chip->ops->cfg_ldo25(rtwdev, false);
--
2.7.4