From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 11/15] staging: r8188eu: efuse_OneByteRead is unused
Date: Sat, 13 Nov 2021 19:55:14 +0100 [thread overview]
Message-ID: <20211113185518.23941-12-martin@kaiser.cx> (raw)
In-Reply-To: <20211113185518.23941-1-martin@kaiser.cx>
Remove the efuse_OneByteRead function, which is no longer used.
Remove resulting dead code as well.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 41 ---------------------
drivers/staging/r8188eu/include/rtw_efuse.h | 1 -
2 files changed, 42 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 1a999d41483b..7829a422d225 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -29,17 +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_Read1ByteFromFakeContent(u16 Offset, u8 *Value)
-{
- if (Offset >= EFUSE_MAX_HW_SIZE)
- return false;
- if (fakeEfuseBank == 0)
- *Value = fakeEfuseContent[Offset];
- else
- *Value = fakeBTEfuseContent[fakeEfuseBank - 1][Offset];
- return true;
-}
-
static bool
Efuse_Write1ByteToFakeContent(u16 Offset, u8 Value)
{
@@ -117,36 +106,6 @@ ReadEFuseByte(
*pbuf = (u8)(value32 & 0xff);
}
-/* 11/16/2008 MH Read one byte from real Efuse. */
-u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data, bool pseudo)
-{
- u8 tmpidx = 0;
- u8 result;
-
- if (pseudo) {
- result = Efuse_Read1ByteFromFakeContent(addr, data);
- return result;
- }
- /* -----------------e-fuse reg ctrl --------------------------------- */
- /* address */
- rtw_write8(pAdapter, EFUSE_CTRL + 1, (u8)(addr & 0xff));
- rtw_write8(pAdapter, EFUSE_CTRL + 2, ((u8)((addr >> 8) & 0x03)) |
- (rtw_read8(pAdapter, EFUSE_CTRL + 2) & 0xFC));
-
- rtw_write8(pAdapter, EFUSE_CTRL + 3, 0x72);/* read cmd */
-
- while (!(0x80 & rtw_read8(pAdapter, EFUSE_CTRL + 3)) && (tmpidx < 100))
- tmpidx++;
- if (tmpidx < 100) {
- *data = rtw_read8(pAdapter, EFUSE_CTRL);
- result = true;
- } else {
- *data = 0xff;
- result = false;
- }
- return result;
-}
-
/* 11/16/2008 MH Write one byte to reald Efuse. */
u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)
{
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 825f880a71da..f21d08d1be90 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -70,7 +70,6 @@ extern u8 fakeBTEfuseModifiedMap[];
u8 Efuse_CalculateWordCnts(u8 word_en);
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf);
-u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
--
2.20.1
next prev parent reply other threads:[~2021-11-13 18:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-13 18:55 [PATCH 00/15] staging: r8188eu: more efuse cleanup Martin Kaiser
2021-11-13 18:55 ` [PATCH 01/15] staging: r8188eu: remove efuse type from definition functions Martin Kaiser
2021-11-13 18:55 ` [PATCH 02/15] staging: r8188eu: remove efuse type from read functions Martin Kaiser
2021-11-13 18:55 ` [PATCH 03/15] staging: r8188eu: remove test code for efuse shadow map Martin Kaiser
2021-11-15 11:27 ` Dan Carpenter
2021-11-15 13:50 ` Martin Kaiser
2021-11-15 15:43 ` Dan Carpenter
2021-11-13 18:55 ` [PATCH 04/15] staging: r8188eu: merge small adapter info helpers Martin Kaiser
2021-11-13 18:55 ` [PATCH 05/15] staging: r8188eu: rtl8188e_EfuseGetCurrentSize is now unused Martin Kaiser
2021-11-13 18:55 ` [PATCH 06/15] staging: r8188eu: rtl8188e_Efuse_PgPacketRead " Martin Kaiser
2021-11-13 18:55 ` [PATCH 07/15] staging: r8188eu: merge Efuse_ReadAllMap into EFUSE_ShadowMapUpdate Martin Kaiser
2021-11-13 18:55 ` [PATCH 08/15] staging: r8188eu: use efuse map length define directly Martin Kaiser
2021-11-13 18:55 ` [PATCH 09/15] staging: r8188eu: rtl8188e_EFUSE_GetEfuseDefinition is unused Martin Kaiser
2021-11-13 18:55 ` [PATCH 10/15] staging: r8188eu: remove defines for efuse type Martin Kaiser
2021-11-13 18:55 ` Martin Kaiser [this message]
2021-11-13 18:55 ` [PATCH 12/15] staging: r8188eu: efuse_OneByteWrite is unused Martin Kaiser
2021-11-13 18:55 ` [PATCH 13/15] staging: r8188eu: remove bt efuse definitions Martin Kaiser
2021-11-13 18:55 ` [PATCH 14/15] staging: r8188eu: remove fake efuse variables Martin Kaiser
2021-11-13 18:55 ` [PATCH 15/15] staging: r8188eu: remove the efuse_hal structure Martin Kaiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211113185518.23941-12-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox