Skip to content

Commit 9f1dcad

Browse files
mistraubegregkh
authored andcommitted
staging: rtl8723bs: remove efuse_OneByteWrite
The function efuse_OneByteWrite is not used. Remove it and remove related dead code, namely the function Efuse_Write1ByteToFakeContent. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-15-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ca6e514 commit 9f1dcad

2 files changed

Lines changed: 0 additions & 49 deletions

File tree

drivers/staging/rtl8723bs/core/rtw_efuse.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
2929
#define REG_EFUSE_CTRL 0x0030
3030
#define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */
3131

32-
static bool
33-
Efuse_Write1ByteToFakeContent(u16 Offset, u8 Value)
34-
{
35-
if (Offset >= EFUSE_MAX_HW_SIZE)
36-
return false;
37-
if (fakeEfuseBank == 0)
38-
fakeEfuseContent[Offset] = Value;
39-
else
40-
fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value;
41-
return true;
42-
}
43-
4432
/*-----------------------------------------------------------------------------
4533
* Function: Efuse_PowerSwitch
4634
*
@@ -183,42 +171,6 @@ u8 *data)
183171
return bResult;
184172
}
185173

186-
/* 11/16/2008 MH Write one byte to reald Efuse. */
187-
u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoTest)
188-
{
189-
u8 tmpidx = 0;
190-
u8 bResult = false;
191-
192-
if (bPseudoTest)
193-
return Efuse_Write1ByteToFakeContent(addr, data);
194-
195-
/* -----------------e-fuse reg ctrl --------------------------------- */
196-
/* address */
197-
198-
/* <20130227, Kordan> 8192E MP chip A-cut had better not set 0x34[11] until B-Cut. */
199-
200-
/* <20130121, Kordan> For SMIC EFUSE specificatoin. */
201-
/* 0x34[11]: SW force PGMEN input of efuse to high. (for the bank selected by 0x34[9:8]) */
202-
/* PHY_SetMacReg(padapter, 0x34, BIT11, 1); */
203-
rtw_write16(padapter, 0x34, rtw_read16(padapter, 0x34) | (BIT11));
204-
rtw_write32(padapter, EFUSE_CTRL, 0x90600000 | ((addr << 8 | data)));
205-
206-
while ((0x80 & rtw_read8(padapter, EFUSE_CTRL + 3)) && (tmpidx < 100)) {
207-
mdelay(1);
208-
tmpidx++;
209-
}
210-
211-
if (tmpidx < 100)
212-
bResult = true;
213-
else
214-
bResult = false;
215-
216-
/* disable Efuse program enable */
217-
PHY_SetMacReg(padapter, EFUSE_TEST, BIT(11), 0);
218-
219-
return bResult;
220-
}
221-
222174
/*-----------------------------------------------------------------------------
223175
* Function: Efuse_ReadAllMap
224176
*

drivers/staging/rtl8723bs/include/rtw_efuse.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ extern u8 fakeBTEfuseModifiedMap[];
9292

9393
u8 Efuse_CalculateWordCnts(u8 word_en);
9494
u8 efuse_OneByteRead(struct adapter *padapter, u16 addr, u8 *data);
95-
u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoTest);
9695

9796
void Efuse_PowerSwitch(struct adapter *padapter, u8 bWrite, u8 PwrState);
9897

0 commit comments

Comments
 (0)