diff options
author | Franky Lin <frankyl@broadcom.com> | 2012-05-04 18:27:32 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-15 17:27:56 -0400 |
commit | 45db339cd2b138fba993013b5d73049fd3384e44 (patch) | |
tree | 47f6dd68d0bf66d61dc00fb5ae023b670fab57df /drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | |
parent | e9b8d91d5555e64d30c3b972795579e6d8619908 (diff) | |
download | linux-45db339cd2b138fba993013b5d73049fd3384e44.tar.gz linux-45db339cd2b138fba993013b5d73049fd3384e44.tar.bz2 linux-45db339cd2b138fba993013b5d73049fd3384e44.zip |
brcmfmac: replace brcmf_sdcard_cfg_read with brcmf_sdio_regrb
Use the newly introduced brcmf_sdio_regrb to replace
brcmf_sdcard_cfg_read 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 | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c index 5e719d872d59..fc5c628e76a5 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c @@ -85,8 +85,7 @@ int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev) sdiodev->irq_wake = true; /* must configure SDIO_CCCR_IENx to enable irq */ - data = brcmf_sdcard_cfg_read(sdiodev, SDIO_FUNC_0, - SDIO_CCCR_IENx, &ret); + data = brcmf_sdio_regrb(sdiodev, SDIO_CCCR_IENx, &ret); data |= 1 << SDIO_FUNC_1 | 1 << SDIO_FUNC_2 | 1; brcmf_sdcard_cfg_write(sdiodev, SDIO_FUNC_0, SDIO_CCCR_IENx, data, &ret); @@ -158,29 +157,6 @@ int brcmf_sdio_intr_unregister(struct brcmf_sdio_dev *sdiodev) } #endif /* CONFIG_BRCMFMAC_SDIO_OOB */ -u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr, - int *err) -{ - int status; - s32 retry = 0; - u8 data = 0; - - do { - if (retry) /* wait for 1 ms till bus get settled down */ - udelay(1000); - status = brcmf_sdioh_request_byte(sdiodev, SDIOH_READ, fnc_num, - addr, (u8 *) &data); - } while (status != 0 - && (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT)); - if (err) - *err = status; - - brcmf_dbg(INFO, "fun = %d, addr = 0x%x, u8data = 0x%x\n", - fnc_num, addr, data); - - return data; -} - void brcmf_sdcard_cfg_write(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr, u8 data, int *err) |