]> www.infradead.org Git - users/hch/misc.git/commitdiff
staging: rtl8723bs: remove efuse_OneByteWrite
authorMichael Straube <straube.linux@gmail.com>
Sat, 23 Aug 2025 12:43:21 +0000 (14:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:54:58 +0000 (15:54 +0200)
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>
drivers/staging/rtl8723bs/core/rtw_efuse.c
drivers/staging/rtl8723bs/include/rtw_efuse.h

index c4542e00c730bb0aedbb53cbcd265880c1814cb7..e39032b45c3502c3d33497125f457e804cc53074 100644 (file)
@@ -29,18 +29,6 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
 #define REG_EFUSE_CTRL         0x0030
 #define EFUSE_CTRL                     REG_EFUSE_CTRL          /*  E-Fuse Control. */
 
-static bool
-Efuse_Write1ByteToFakeContent(u16 Offset, u8 Value)
-{
-       if (Offset >= EFUSE_MAX_HW_SIZE)
-               return false;
-       if (fakeEfuseBank == 0)
-               fakeEfuseContent[Offset] = Value;
-       else
-               fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value;
-       return true;
-}
-
 /*-----------------------------------------------------------------------------
  * Function:   Efuse_PowerSwitch
  *
@@ -183,42 +171,6 @@ u8 *data)
        return bResult;
 }
 
-/*  11/16/2008 MH Write one byte to reald Efuse. */
-u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoTest)
-{
-       u8 tmpidx = 0;
-       u8 bResult = false;
-
-       if (bPseudoTest)
-               return Efuse_Write1ByteToFakeContent(addr, data);
-
-       /*  -----------------e-fuse reg ctrl --------------------------------- */
-       /* address */
-
-       /*  <20130227, Kordan> 8192E MP chip A-cut had better not set 0x34[11] until B-Cut. */
-
-       /*  <20130121, Kordan> For SMIC EFUSE specificatoin. */
-       /* 0x34[11]: SW force PGMEN input of efuse to high. (for the bank selected by 0x34[9:8]) */
-       /* PHY_SetMacReg(padapter, 0x34, BIT11, 1); */
-       rtw_write16(padapter, 0x34, rtw_read16(padapter, 0x34) | (BIT11));
-       rtw_write32(padapter, EFUSE_CTRL, 0x90600000 | ((addr << 8 | data)));
-
-       while ((0x80 &  rtw_read8(padapter, EFUSE_CTRL + 3)) && (tmpidx < 100)) {
-               mdelay(1);
-               tmpidx++;
-       }
-
-       if (tmpidx < 100)
-               bResult = true;
-       else
-               bResult = false;
-
-       /*  disable Efuse program enable */
-       PHY_SetMacReg(padapter, EFUSE_TEST, BIT(11), 0);
-
-       return bResult;
-}
-
 /*-----------------------------------------------------------------------------
  * Function:   Efuse_ReadAllMap
  *
index 1cee7a8eedf2b5cb0f96483d362f317b0eaaa70e..5251ecc855d78b0b73e28288278710a62b1218a6 100644 (file)
@@ -92,7 +92,6 @@ extern u8 fakeBTEfuseModifiedMap[];
 
 u8 Efuse_CalculateWordCnts(u8 word_en);
 u8 efuse_OneByteRead(struct adapter *padapter, u16 addr, u8 *data);
-u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool         bPseudoTest);
 
 void Efuse_PowerSwitch(struct adapter *padapter, u8 bWrite, u8  PwrState);