summaryrefslogtreecommitdiff
path: root/drivers/staging/brcm80211
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-07-05 22:06:13 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-05 19:41:42 -0700
commit57f845d288e412d7241eaffb1b47b14256feec57 (patch)
tree92458d066ebb413ede4f47b24b6cc8792f101ded /drivers/staging/brcm80211
parentbd5213eb188cfb8c11bc168bc68fde44c0831a24 (diff)
staging: brcm80211: W_REG macro cleanup in fullmac SDIO
Code cleanup. W_REG was defined the same for both big and little endian systems. Replaced W_REG on two spots with its expansion. Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211')
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_sdio.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index cdc57f9c914c..ba5748195cbe 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -51,22 +51,13 @@
})
#endif /* __mips__ */
-#define W_REG(r, v, typ) do { \
- brcmf_sdcard_reg_write(NULL, (r), sizeof(typ), (v)); \
- } while (0)
#else /* __BIG_ENDIAN */
#define R_REG(r, typ) \
brcmf_sdcard_reg_read(NULL, (r), sizeof(typ))
-#define W_REG(r, v, typ) do { \
- brcmf_sdcard_reg_write(NULL, (r), sizeof(typ), (v)); \
- } while (0)
#endif /* __BIG_ENDIAN */
-#define AND_REG(r, v, typ) W_REG((r), R_REG(r, typ) & (v), typ)
-#define OR_REG(r, v, typ) W_REG((r), R_REG(r, typ) | (v), typ)
-
-#define SET_REG(r, mask, val, typ) \
- W_REG((r), ((R_REG(r) & ~(mask)) | (val)), typ)
+#define OR_REG(r, v, typ) \
+ brcmf_sdcard_reg_write(NULL, (r), sizeof(typ), R_REG(r, typ) | (v))
#ifdef BCMDBG
@@ -609,7 +600,7 @@ struct brcmf_bus {
uint console_addr; /* Console address from shared struct */
#endif /* BCMDBG */
- uint regfails; /* Count of R_REG/W_REG failures */
+ uint regfails; /* Count of R_REG failures */
uint clkstate; /* State of sd and backplane clock(s) */
bool activity; /* Activity flag for clock down */
@@ -850,7 +841,8 @@ w_sdreg32(struct brcmf_bus *bus, u32 regval, u32 reg_offset, u32 *retryvar)
{
*retryvar = 0;
do {
- W_REG(bus->ci->buscorebase + reg_offset, regval, u32);
+ brcmf_sdcard_reg_write(NULL, bus->ci->buscorebase + reg_offset,
+ sizeof(u32), regval);
} while (brcmf_sdcard_regfail(bus->card) &&
(++(*retryvar) <= retry_limit));
if (*retryvar) {