On 12/09/2011 12:06 AM, Franky Lin wrote: > From: Arend van Spriel <arend@xxxxxxxxxxxx> > > This adds the use of bcma functions to access the registers within > the phy source code. > > Reviewed-by: Pieter-Paul Giesberts <pieterpg@xxxxxxxxxxxx> > Reviewed-by: Alwin Beukers <alwin@xxxxxxxxxxxx> > Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx> > Signed-off-by: Franky Lin <frankyl@xxxxxxxxxxxx> > --- > drivers/net/wireless/brcm80211/brcmsmac/main.c | 2 +- > .../net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c | 183 +++++++++----------- > .../net/wireless/brcm80211/brcmsmac/phy/phy_hal.h | 2 +- > .../net/wireless/brcm80211/brcmsmac/phy/phy_int.h | 4 +- > .../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 69 ++++---- > .../net/wireless/brcm80211/brcmsmac/phy/phy_n.c | 75 ++++---- > drivers/net/wireless/brcm80211/brcmsmac/types.h | 3 + > 7 files changed, 162 insertions(+), 176 deletions(-) > > diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c > index 43172b3..5db2bdc 100644 > --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c > +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c .... > > void write_phy_reg(struct brcms_phy *pi, u16 addr, u16 val) > { > - struct d11regs __iomem *regs; > - > - regs = pi->regs; > - > #ifdef CONFIG_BCM47XX > - W_REG_FLUSH(®s->phyregaddr, addr); > - W_REG(®s->phyregdata, val); > + bcma_wflush16(pi->d11core, D11REGOFFS(phyregaddr), addr); > + bcma_write16(pi->d11core, D11REGOFFS(phyregdata), val); > if (addr == 0x72) > - (void)R_REG(®s->phyregdata); > + (void)bcma_read16(pi->d11core, D11REGOFFS(phyregdata), val); ^^^ This does not compile with CONFIG_BCM47XX set. > #else > - W_REG((u32 __iomem *)(®s->phyregaddr), addr | (val << 16)); > + bcma_write32(pi->d11core, D11REGOFFS(phyregaddr), addr | (val << 16)); > if (++pi->phy_wreg >= pi->phy_wreg_limit) { > pi->phy_wreg = 0; > - (void)R_REG(®s->phyversion); > + (void)bcma_read16(pi->d11core, D11REGOFFS(phyversion)); > } > #endif > } > ... Hauke -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html