summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac/main.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-12-08 15:06:53 -0800
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 15:32:56 -0500
commite81da6501b433f757baa981a4e02fd9956cd3147 (patch)
treee600de3068b436f853218fd871fdc4682fd77a90 /drivers/net/wireless/brcm80211/brcmsmac/main.c
parent2e81b9b19f20286425fed3b54df9b81189444cee (diff)
downloadtalos-obmc-linux-e81da6501b433f757baa981a4e02fd9956cd3147.tar.gz
talos-obmc-linux-e81da6501b433f757baa981a4e02fd9956cd3147.zip
brcm80211: smac: use bcma function for register access in dma.c
The dma.c source file now uses the register access functions provided by bcma. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-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/brcmsmac/main.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index f2491bdb1898..43172b3b8297 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -1065,14 +1065,12 @@ brcms_c_mhfdef(struct brcms_c_info *wlc, u16 *mhfs, u16 mhf2_init)
}
}
-static struct dma64regs __iomem *
-dmareg(struct brcms_hardware *hw, uint direction, uint fifonum)
+static uint
+dmareg(uint direction, uint fifonum)
{
- struct d11regs __iomem *regs = hw->d11core->bus->mmio;
-
if (direction == DMA_TX)
- return &(regs->fifo64regs[fifonum].dmaxmt);
- return &(regs->fifo64regs[fifonum].dmarcv);
+ return offsetof(struct d11regs, fifo64regs[fifonum].dmaxmt);
+ return offsetof(struct d11regs, fifo64regs[fifonum].dmarcv);
}
static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
@@ -1099,8 +1097,8 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
* RX: RX_FIFO (RX data packets)
*/
wlc_hw->di[0] = dma_attach(name, wlc_hw->sih, wlc_hw->d11core,
- (wme ? dmareg(wlc_hw, DMA_TX, 0) :
- NULL), dmareg(wlc_hw, DMA_RX, 0),
+ (wme ? dmareg(DMA_TX, 0) : 0),
+ dmareg(DMA_RX, 0),
(wme ? NTXD : 0), NRXD,
RXBUFSZ, -1, NRXBUFPOST,
BRCMS_HWRXOFF, &brcm_msg_level);
@@ -1113,7 +1111,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
* RX: UNUSED
*/
wlc_hw->di[1] = dma_attach(name, wlc_hw->sih, wlc_hw->d11core,
- dmareg(wlc_hw, DMA_TX, 1), NULL,
+ dmareg(DMA_TX, 1), 0,
NTXD, 0, 0, -1, 0, 0,
&brcm_msg_level);
dma_attach_err |= (NULL == wlc_hw->di[1]);
@@ -1124,7 +1122,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
* RX: UNUSED
*/
wlc_hw->di[2] = dma_attach(name, wlc_hw->sih, wlc_hw->d11core,
- dmareg(wlc_hw, DMA_TX, 2), NULL,
+ dmareg(DMA_TX, 2), 0,
NTXD, 0, 0, -1, 0, 0,
&brcm_msg_level);
dma_attach_err |= (NULL == wlc_hw->di[2]);
@@ -1134,8 +1132,8 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
* (legacy) TX_CTL_FIFO (TX control & mgmt packets)
*/
wlc_hw->di[3] = dma_attach(name, wlc_hw->sih, wlc_hw->d11core,
- dmareg(wlc_hw, DMA_TX, 3),
- NULL, NTXD, 0, 0, -1,
+ dmareg(DMA_TX, 3),
+ 0, NTXD, 0, 0, -1,
0, 0, &brcm_msg_level);
dma_attach_err |= (NULL == wlc_hw->di[3]);
/* Cleaner to leave this as if with AP defined */
OpenPOWER on IntegriCloud