summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-12-08 15:06:49 -0800
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 15:32:19 -0500
commit28a5344261753fadb1731b82c5eeecca708a877c (patch)
tree5f1b249ebe0bd2124889dfbced9f41aa1cf82de8 /drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
parentcbc80db2922112cf3c77a6121827ad662ea78c2d (diff)
downloadblackbird-op-linux-28a5344261753fadb1731b82c5eeecca708a877c.tar.gz
blackbird-op-linux-28a5344261753fadb1731b82c5eeecca708a877c.zip
brcm80211: smac: change ai_attach interface taking a bcma_bus object
The ai_attach now takes a bcma_bus object as its parameter to obtain all required information needed for chip control. 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/aiutils.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/aiutils.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
index 5c7311934f63..c1e4f35f2955 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
@@ -1022,22 +1022,25 @@ static __used void ai_nvram_process(struct si_info *sii)
}
static struct si_info *ai_doattach(struct si_info *sii,
- void __iomem *regs, struct pci_dev *pbus)
+ struct bcma_bus *pbus)
{
+ void __iomem *regs = pbus->mmio;
struct si_pub *sih = &sii->pub;
u32 w, savewin;
struct chipcregs __iomem *cc;
uint socitype;
uint origidx;
+ /* assume the window is looking at chipcommon */
+ WARN_ON(pbus->mapped_core->id.id != BCMA_CORE_CHIPCOMMON);
memset((unsigned char *) sii, 0, sizeof(struct si_info));
savewin = 0;
+ sii->icbus = pbus;
sii->buscoreidx = BADIDX;
-
sii->curmap = regs;
- sii->pcibus = pbus;
+ sii->pcibus = pbus->host_pci;
/* find Chipcommon address */
pci_read_config_dword(sii->pcibus, PCI_BAR0_WIN, &savewin);
@@ -1160,13 +1163,10 @@ static struct si_info *ai_doattach(struct si_info *sii,
}
/*
- * Allocate a si handle.
- * devid - pci device id (used to determine chip#)
- * osh - opaque OS handle
- * regs - virtual address of initial core registers
+ * Allocate a si handle and do the attach.
*/
struct si_pub *
-ai_attach(void __iomem *regs, struct pci_dev *sdh)
+ai_attach(struct bcma_bus *pbus)
{
struct si_info *sii;
@@ -1175,7 +1175,7 @@ ai_attach(void __iomem *regs, struct pci_dev *sdh)
if (sii == NULL)
return NULL;
- if (ai_doattach(sii, regs, sdh) == NULL) {
+ if (ai_doattach(sii, pbus) == NULL) {
kfree(sii);
return NULL;
}
OpenPOWER on IntegriCloud