mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
staging: rtl8723bs: remove bWrite from Hal_EfusePowerSwitch
The function Hal_EfusePowerSwitch is always called with bWrite set to false. Remove the pWrite parameter and reomve resulting dead code to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Trendbook Next 14 Link: https://lore.kernel.org/r/20250824095830.79233-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
009798ff04
commit
236faa3b92
|
|
@ -164,13 +164,13 @@ static void Efuse_ReadAllMap(struct adapter *padapter, u8 efuseType, u8 *Efuse)
|
|||
{
|
||||
u16 mapLen = 0;
|
||||
|
||||
Hal_EfusePowerSwitch(padapter, false, true);
|
||||
Hal_EfusePowerSwitch(padapter, true);
|
||||
|
||||
Hal_GetEfuseDefinition(padapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
|
||||
|
||||
Hal_ReadEFuse(padapter, efuseType, 0, mapLen, Efuse);
|
||||
|
||||
Hal_EfusePowerSwitch(padapter, false, false);
|
||||
Hal_EfusePowerSwitch(padapter, false);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -568,8 +568,6 @@ void Hal_GetEfuseDefinition(
|
|||
}
|
||||
}
|
||||
|
||||
#define VOLTAGE_V25 0x03
|
||||
|
||||
/* */
|
||||
/* The following is for compile ok */
|
||||
/* That should be merged with the original in the future */
|
||||
|
|
@ -578,7 +576,7 @@ void Hal_GetEfuseDefinition(
|
|||
#define REG_EFUSE_ACCESS_8723 0x00CF /* Efuse access protection for RTL8723 */
|
||||
|
||||
void Hal_EfusePowerSwitch(
|
||||
struct adapter *padapter, u8 bWrite, u8 PwrState
|
||||
struct adapter *padapter, u8 PwrState
|
||||
)
|
||||
{
|
||||
u8 tempval;
|
||||
|
|
@ -626,25 +624,8 @@ void Hal_EfusePowerSwitch(
|
|||
tmpV16 |= (LOADER_CLK_EN | ANA8M);
|
||||
rtw_write16(padapter, REG_SYS_CLKR, tmpV16);
|
||||
}
|
||||
|
||||
if (bWrite) {
|
||||
/* Enable LDO 2.5V before read/write action */
|
||||
tempval = rtw_read8(padapter, EFUSE_TEST+3);
|
||||
tempval &= 0x0F;
|
||||
tempval |= (VOLTAGE_V25 << 4);
|
||||
rtw_write8(padapter, EFUSE_TEST+3, (tempval | 0x80));
|
||||
|
||||
/* rtw_write8(padapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON); */
|
||||
}
|
||||
} else {
|
||||
rtw_write8(padapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
|
||||
|
||||
if (bWrite) {
|
||||
/* Disable LDO 2.5V after read/write action */
|
||||
tempval = rtw_read8(padapter, EFUSE_TEST+3);
|
||||
rtw_write8(padapter, EFUSE_TEST+3, (tempval & 0x7F));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1474,9 +1455,9 @@ void Hal_EfuseParsePackageType_8723B(
|
|||
u8 package;
|
||||
u8 efuseContent;
|
||||
|
||||
Hal_EfusePowerSwitch(padapter, false, true);
|
||||
Hal_EfusePowerSwitch(padapter, true);
|
||||
efuse_OneByteRead(padapter, 0x1FB, &efuseContent);
|
||||
Hal_EfusePowerSwitch(padapter, false, false);
|
||||
Hal_EfusePowerSwitch(padapter, false);
|
||||
|
||||
package = efuseContent & 0x7;
|
||||
switch (package) {
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ u8 GetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariabl
|
|||
u8 SetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue);
|
||||
void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level);
|
||||
void rtl8723b_SetBeaconRelatedRegisters(struct adapter *padapter);
|
||||
void Hal_EfusePowerSwitch(struct adapter *padapter, u8 bWrite, u8 PwrState);
|
||||
void Hal_EfusePowerSwitch(struct adapter *padapter, u8 PwrState);
|
||||
void Hal_ReadEFuse(struct adapter *padapter, u8 efuseType, u16 _offset,
|
||||
u16 _size_byte, u8 *pbuf);
|
||||
void Hal_GetEfuseDefinition(struct adapter *padapter, u8 efuseType, u8 type,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user