Commit 2eb55852 authored by Franky Lin's avatar Franky Lin Committed by Greg Kroah-Hartman

staging: brcm80211: remove wrapper functions in bcmsdh_sdmmc.c

Use brcmf_sdioh_request_byte directly instead of calling
brcmf_sdioh_cfg_read and brcmf_sdioh_cfg_write in brcmfmac
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 72b1f6c3
...@@ -130,8 +130,8 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_dev *sdiodev, const char *name, ...@@ -130,8 +130,8 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_dev *sdiodev, const char *name,
(struct brcmf_sdreg *) params; (struct brcmf_sdreg *) params;
u8 data = 0; u8 data = 0;
if (brcmf_sdioh_cfg_read if (brcmf_sdioh_request_byte(sdiodev, SDIOH_READ,
(sdiodev, sd_ptr->func, sd_ptr->offset, &data)) { sd_ptr->func, sd_ptr->offset, &data)) {
bcmerror = -EIO; bcmerror = -EIO;
break; break;
} }
...@@ -147,8 +147,8 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_dev *sdiodev, const char *name, ...@@ -147,8 +147,8 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_dev *sdiodev, const char *name,
(struct brcmf_sdreg *) params; (struct brcmf_sdreg *) params;
u8 data = (u8) sd_ptr->value; u8 data = (u8) sd_ptr->value;
if (brcmf_sdioh_cfg_write if (brcmf_sdioh_request_byte(sdiodev, SDIOH_WRITE,
(sdiodev, sd_ptr->func, sd_ptr->offset, &data)) { sd_ptr->func, sd_ptr->offset, &data)) {
bcmerror = -EIO; bcmerror = -EIO;
break; break;
} }
...@@ -209,9 +209,8 @@ u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr, ...@@ -209,9 +209,8 @@ u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr,
do { do {
if (retry) /* wait for 1 ms till bus get settled down */ if (retry) /* wait for 1 ms till bus get settled down */
udelay(1000); udelay(1000);
status = status = brcmf_sdioh_request_byte(sdiodev, SDIOH_READ, fnc_num,
brcmf_sdioh_cfg_read(sdiodev, fnc_num, addr, addr, (u8 *) &data);
(u8 *) &data);
} while (status != 0 } while (status != 0
&& (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT)); && (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT));
if (err) if (err)
...@@ -233,9 +232,8 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr, ...@@ -233,9 +232,8 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr,
do { do {
if (retry) /* wait for 1 ms till bus get settled down */ if (retry) /* wait for 1 ms till bus get settled down */
udelay(1000); udelay(1000);
status = status = brcmf_sdioh_request_byte(sdiodev, SDIOH_WRITE, fnc_num,
brcmf_sdioh_cfg_write(sdiodev, fnc_num, addr, addr, (u8 *) &data);
(u8 *) &data);
} while (status != 0 } while (status != 0
&& (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT)); && (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT));
if (err) if (err)
......
...@@ -190,28 +190,6 @@ void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev) ...@@ -190,28 +190,6 @@ void brcmf_sdioh_detach(struct brcmf_sdio_dev *sdiodev)
} }
extern int
brcmf_sdioh_cfg_read(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr,
u8 *data)
{
int status;
/* No lock needed since brcmf_sdioh_request_byte does locking */
status = brcmf_sdioh_request_byte(sdiodev, SDIOH_READ, fnc_num,
addr, data);
return status;
}
extern int
brcmf_sdioh_cfg_write(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr,
u8 *data)
{
/* No lock needed since brcmf_sdioh_request_byte does locking */
int status;
status = brcmf_sdioh_request_byte(sdiodev, SDIOH_WRITE, fnc_num,
addr, data);
return status;
}
static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr) static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr)
{ {
/* read 24 bits and return valid 17 bit addr */ /* read 24 bits and return valid 17 bit addr */
......
...@@ -268,11 +268,6 @@ brcmf_sdioh_request_buffer(struct brcmf_sdio_dev *sdiodev, uint pio_dma, ...@@ -268,11 +268,6 @@ brcmf_sdioh_request_buffer(struct brcmf_sdio_dev *sdiodev, uint pio_dma,
extern int brcmf_sdioh_cis_read(struct brcmf_sdio_dev *sdiodev, uint fuc, extern int brcmf_sdioh_cis_read(struct brcmf_sdio_dev *sdiodev, uint fuc,
u8 *cis, u32 length); u8 *cis, u32 length);
extern int brcmf_sdioh_cfg_read(struct brcmf_sdio_dev *sdiodev, uint fuc,
u32 addr, u8 *data);
extern int brcmf_sdioh_cfg_write(struct brcmf_sdio_dev *sdiodev, uint fuc,
u32 addr, u8 *data);
/* Watchdog timer interface for pm ops */ /* Watchdog timer interface for pm ops */
extern void brcmf_sdio_wdtmr_enable(struct brcmf_sdio_dev *sdiodev, extern void brcmf_sdio_wdtmr_enable(struct brcmf_sdio_dev *sdiodev,
bool enable); bool enable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment