From: Hauke Mehrtens <hauke@hauke-m.de>
To: Franky Lin <frankyl@broadcom.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 18/23] brcm80211: smac: use bcma functions for register access in phy code
Date: Sat, 10 Dec 2011 22:04:43 +0100 [thread overview]
Message-ID: <4EE3C96B.4070102@hauke-m.de> (raw)
In-Reply-To: <1323385619-7454-19-git-send-email-frankyl@broadcom.com>
On 12/09/2011 12:06 AM, Franky Lin wrote:
> From: Arend van Spriel <arend@broadcom.com>
>
> This adds the use of bcma functions to access the registers within
> the phy source code.
>
> 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>
> ---
> 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
next prev parent reply other threads:[~2011-12-10 21:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 23:06 [PATCH 00/23] brcm80211: fullmac 4430 support and softmac switch to bcma Franky Lin
2011-12-08 23:06 ` [PATCH 01/23] brcm80211: fmac: save bus interface structure in function 2 device Franky Lin
2011-12-08 23:06 ` [PATCH 02/23] brcm80211: fmac: fix firmware shared structures version Franky Lin
2011-12-08 23:06 ` [PATCH 03/23] brcm80211: fmac: add bcm4330 support Franky Lin
2011-12-08 23:06 ` [PATCH 04/23] brcm80211: fmac: remove drive strength code for unsupported chips Franky Lin
2011-12-08 23:06 ` [PATCH 05/23] bcma: add set/mask macros for 16-bit register access Franky Lin
2011-12-10 11:45 ` Rafał Miłecki
2011-12-10 20:18 ` Arend van Spriel
2011-12-11 22:50 ` Rafał Miłecki
2011-12-11 19:51 ` Kalle Valo
2011-12-08 23:06 ` [PATCH 06/23] bcma: use static keyword for inline function declaration in bcma.h Franky Lin
2011-12-08 23:06 ` [PATCH 07/23] brcm80211: smac: remove unused fields from struct si_pub definition Franky Lin
2011-12-08 23:06 ` [PATCH 08/23] brcm80211: smac: move fields from struct si_pub to struct si_info Franky Lin
2011-12-08 23:06 ` [PATCH 09/23] brcm80211: smac: use inline access functions for struct si_pub fields Franky Lin
2011-12-08 23:06 ` [PATCH 10/23] brcm80211: smac: change from pci device driver to bcma device driver Franky Lin
2011-12-08 23:06 ` [PATCH 11/23] brcm80211: smac: change attach interfaces in main.c for bcma support Franky Lin
2011-12-08 23:06 ` [PATCH 12/23] brcm80211: smac: rename struct si_info field pbus to pcibus Franky Lin
2011-12-08 23:06 ` [PATCH 13/23] brcm80211: smac: change ai_attach interface taking a bcma_bus object Franky Lin
2011-12-08 23:06 ` [PATCH 14/23] brcm80211: smac: remove enumeration rom parsing function Franky Lin
2011-12-08 23:06 ` [PATCH 15/23] brcm80211: smac: use bcma core register access functions for 802.11 core Franky Lin
2011-12-08 23:06 ` [PATCH 16/23] brcm80211: smac: use DMA-API calls for descriptor allocations Franky Lin
2011-12-08 23:06 ` [PATCH 17/23] brcm80211: smac: use bcma function for register access in dma.c Franky Lin
2011-12-08 23:06 ` [PATCH 18/23] brcm80211: smac: use bcma functions for register access in phy code Franky Lin
2011-12-10 21:04 ` Hauke Mehrtens [this message]
2011-12-08 23:06 ` [PATCH 19/23] brcm80211: smac: remove SI_FAST() macro usage Franky Lin
2011-12-08 23:06 ` [PATCH 20/23] brcm80211: smac: replace ai_corereg() function with ai_cc_reg() Franky Lin
2011-12-08 23:06 ` [PATCH 21/23] brcm80211: smac: remove unused functions and/or prototypes Franky Lin
2011-12-08 23:06 ` [PATCH 22/23] brcm80211: smac: use bcma core control functions Franky Lin
2011-12-08 23:06 ` [PATCH 23/23] brcm80211: smac: use bcma core access functions in nicpci.c Franky Lin
2011-12-10 22:12 ` [PATCH 00/23] brcm80211: fullmac 4430 support and softmac switch to bcma Hauke Mehrtens
2011-12-11 19:54 ` Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE3C96B.4070102@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=frankyl@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).