diff options
author | Franky Lin <frankyl@broadcom.com> | 2012-05-04 21:27:35 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-15 17:27:57 -0400 |
commit | e13ce26bd53296fdf2c78836ce7b880df75c6e6e (patch) | |
tree | bb28f47a69a80f6be8abd3ff1beaa59474b9b51d /drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | |
parent | 79ae39570f82f96e2d899c100e32409129c6d62f (diff) |
brcmfmac: replace brcmf_sdcard_reg_write with brcmf_sdio_regwl
Use the newly introduced brcmf_sdio_regwl to replace
brcmf_sdcard_reg_write as part of the SDIO WiFi dongle register
access interface clean up.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c index 54a935b27023..cd5f7d798d16 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | |||
@@ -298,38 +298,6 @@ void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr, | |||
298 | *ret = retval; | 298 | *ret = retval; |
299 | } | 299 | } |
300 | 300 | ||
301 | u32 brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, u32 data) | ||
302 | { | ||
303 | int status; | ||
304 | uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK; | ||
305 | int err = 0; | ||
306 | |||
307 | brcmf_dbg(INFO, "fun = 1, addr = 0x%x, uint32data = 0x%x\n", | ||
308 | addr, data); | ||
309 | |||
310 | if (bar0 != sdiodev->sbwad) { | ||
311 | err = brcmf_sdcard_set_sbaddr_window(sdiodev, bar0); | ||
312 | if (err) | ||
313 | return err; | ||
314 | |||
315 | sdiodev->sbwad = bar0; | ||
316 | } | ||
317 | |||
318 | addr &= SBSDIO_SB_OFT_ADDR_MASK; | ||
319 | addr |= SBSDIO_SB_ACCESS_2_4B_FLAG; | ||
320 | status = | ||
321 | brcmf_sdioh_request_word(sdiodev, SDIOH_WRITE, SDIO_FUNC_1, | ||
322 | addr, &data, 4); | ||
323 | sdiodev->regfail = (status != 0); | ||
324 | |||
325 | if (status == 0) | ||
326 | return 0; | ||
327 | |||
328 | brcmf_dbg(ERROR, "error writing 0x%08x to addr 0x%04x\n", | ||
329 | data, addr); | ||
330 | return 0xFFFFFFFF; | ||
331 | } | ||
332 | |||
333 | bool brcmf_sdcard_regfail(struct brcmf_sdio_dev *sdiodev) | 301 | bool brcmf_sdcard_regfail(struct brcmf_sdio_dev *sdiodev) |
334 | { | 302 | { |
335 | return sdiodev->regfail; | 303 | return sdiodev->regfail; |