From: Arend van Spriel <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 04/18] brcmfmac: remove unused struct brcmf_sdio_dev::func_cis_ptr attribute
Date: Thu, 12 Dec 2013 11:58:52 +0100 [thread overview]
Message-ID: <1386845946-9859-5-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1386845946-9859-1-git-send-email-arend@broadcom.com>
During the SDIO probe the func_cis_ptr attribute in struct brcmf_sdio_dev
is being determined, but it is never used after that. Removing it also
obsoletes two functions in bcmsdh.c.
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 61 ++------------------
.../net/wireless/brcm80211/brcmfmac/sdio_host.h | 1 -
2 files changed, 6 insertions(+), 56 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index f22c798..1975054 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -920,60 +920,6 @@ int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn)
return 0;
}
-static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr)
-{
- /* read 24 bits and return valid 17 bit addr */
- int i, ret;
- u32 scratch, regdata;
- __le32 scratch_le;
- u8 *ptr = (u8 *)&scratch_le;
-
- for (i = 0; i < 3; i++) {
- regdata = brcmf_sdio_regrl(sdiodev, regaddr, &ret);
- if (ret != 0)
- brcmf_err("Can't read!\n");
-
- *ptr++ = (u8) regdata;
- regaddr++;
- }
-
- /* Only the lower 17-bits are valid */
- scratch = le32_to_cpu(scratch_le);
- scratch &= 0x0001FFFF;
- return scratch;
-}
-
-static int brcmf_sdioh_enablefuncs(struct brcmf_sdio_dev *sdiodev)
-{
- int err_ret;
- u32 fbraddr;
- u8 func;
-
- brcmf_dbg(SDIO, "\n");
-
- /* Get the Card's common CIS address */
- sdiodev->func_cis_ptr[0] = brcmf_sdioh_get_cisaddr(sdiodev,
- SDIO_CCCR_CIS);
- brcmf_dbg(SDIO, "Card's Common CIS Ptr = 0x%x\n",
- sdiodev->func_cis_ptr[0]);
-
- /* Get the Card's function CIS (for each function) */
- for (fbraddr = SDIO_FBR_BASE(1), func = 1;
- func <= sdiodev->num_funcs; func++, fbraddr += SDIOD_FBR_SIZE) {
- sdiodev->func_cis_ptr[func] =
- brcmf_sdioh_get_cisaddr(sdiodev, SDIO_FBR_CIS + fbraddr);
- brcmf_dbg(SDIO, "Function %d CIS Ptr = 0x%x\n",
- func, sdiodev->func_cis_ptr[func]);
- }
-
- /* Enable Function 1 */
- err_ret = sdio_enable_func(sdiodev->func[1]);
- if (err_ret)
- brcmf_err("Failed to enable F1 Err: 0x%08x\n", err_ret);
-
- return false;
-}
-
static int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev)
{
int err_ret = 0;
@@ -999,7 +945,12 @@ static int brcmf_sdioh_attach(struct brcmf_sdio_dev *sdiodev)
goto out;
}
- brcmf_sdioh_enablefuncs(sdiodev);
+ /* Enable Function 1 */
+ err_ret = sdio_enable_func(sdiodev->func[1]);
+ if (err_ret) {
+ brcmf_err("Failed to enable F1 Err: 0x%08x\n", err_ret);
+ goto out;
+ }
/*
* determine host related variables after brcmf_sdio_probe()
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h b/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
index c1dfa97..8b8f2a9 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
@@ -164,7 +164,6 @@ struct brcmf_sdio;
struct brcmf_sdio_dev {
struct sdio_func *func[SDIO_MAX_FUNCS];
u8 num_funcs; /* Supported funcs on client */
- u32 func_cis_ptr[SDIOD_MAX_IOFUNCS];
u32 sbwad; /* Save backplane window address */
void *bus;
atomic_t suspend; /* suspend flag */
--
1.7.10.4
next prev parent reply other threads:[~2013-12-12 10:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 10:58 [PATCH 00/18] brcmfmac: sdio rework and msgbuf protocol changes Arend van Spriel
2013-12-12 10:58 ` [PATCH 01/18] brcmfmac: add missing curly braces in brcmf_fws_txstatus_suppressed() Arend van Spriel
2013-12-12 10:58 ` [PATCH 02/18] brcmfmac: combine bcmsdh source files into one Arend van Spriel
2013-12-12 10:58 ` [PATCH 03/18] brcmfmac: remove unnecessary function prototypes Arend van Spriel
2013-12-12 10:58 ` Arend van Spriel [this message]
2013-12-12 10:58 ` [PATCH 05/18] brcmfmac: use sdio functions to enable/disable F2 Arend van Spriel
2013-12-12 10:58 ` [PATCH 06/18] brcmfmac: remove brcmf_sdio_regrw_helper() from header file Arend van Spriel
2013-12-12 10:58 ` [PATCH 07/18] brcmfmac: remove regs parameter from sdio probe functions Arend van Spriel
2013-12-12 10:58 ` [PATCH 08/18] brcmfmac: get rid of some void pointer parameters Arend van Spriel
2013-12-12 10:58 ` [PATCH 09/18] brcmfmac: remove brcmf_sdio_wdtimer_enable() function Arend van Spriel
2013-12-12 10:58 ` [PATCH 10/18] brcmfmac: use consistent function names in bcmsdh.c Arend van Spriel
2013-12-12 10:58 ` [PATCH 11/18] brcmfmac: reduce function parameters in sdio send/receive calls Arend van Spriel
2013-12-12 10:59 ` [PATCH 12/18] brcmfmac: Move common BCDC code in single function Arend van Spriel
2013-12-12 10:59 ` [PATCH 13/18] brcmfmac: Fix hex dump for FWIL Arend van Spriel
2013-12-12 10:59 ` [PATCH 14/18] brcmfmac: Add definition of new protocol layer msgbuf Arend van Spriel
2013-12-12 10:59 ` [PATCH 15/18] brcmfmac: Combine protocol push hdr and bus txdata Arend van Spriel
2013-12-12 10:59 ` [PATCH 16/18] brcmfmac: use consistent function names in dhd_sdio.c Arend van Spriel
2013-12-12 10:59 ` [PATCH 17/18] brcmfmac: remove brcmf_sdio_disconnect() function Arend van Spriel
2013-12-12 10:59 ` [PATCH 18/18] brcmfmac: clarify struct brcmf_sdio_dev::func[0] reference Arend van Spriel
2013-12-13 9:02 ` [PATCH 00/18] brcmfmac: sdio rework and msgbuf protocol changes Arend van Spriel
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=1386845946-9859-5-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).