Skip to content

Commit

Permalink
brcm80211: smac: use bcma core access functions in nicpci.c
Browse files Browse the repository at this point in the history
Code in nicpci.c now uses the PCI(E) core as provided by the BCMA
bus driver to configure that core.

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>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Dec 13, 2011
1 parent a8779e4 commit b0327ff
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 111 deletions.
11 changes: 3 additions & 8 deletions drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,7 @@ ai_buscore_setup(struct si_info *sii, u32 savewin, uint *origidx)

/* fixup necessary chip/core configurations */
if (!sii->pch) {
sii->pch = pcicore_init(&sii->pub, sii->pcibus,
sii->curmap + PCI_16KB0_PCIREGS_OFFSET);
sii->pch = pcicore_init(&sii->pub, sii->icbus->drv_pci.core);
if (sii->pch == NULL)
return false;
}
Expand Down Expand Up @@ -1385,7 +1384,7 @@ void ai_pci_setup(struct si_pub *sih, uint coremask)
}

if (PCI(sih)) {
pcicore_pci_setup(sii->pch, regs);
pcicore_pci_setup(sii->pch);

/* switch back to previous core */
ai_setcoreidx(sih, idx);
Expand All @@ -1408,11 +1407,7 @@ int ai_pci_fixcfg(struct si_pub *sih)

/* check 'pi' is correct and fix it if not */
regs = ai_setcore(&sii->pub, ai_get_buscoretype(sih), 0);
if (ai_get_buscoretype(sih) == PCIE_CORE_ID)
pcicore_fixcfg_pcie(sii->pch,
(struct sbpcieregs __iomem *)regs);
else if (ai_get_buscoretype(sih) == PCI_CORE_ID)
pcicore_fixcfg_pci(sii->pch, (struct sbpciregs __iomem *)regs);
pcicore_fixcfg(sii->pch);

/* restore the original index */
ai_setcoreidx(&sii->pub, origidx);
Expand Down
Loading

0 comments on commit b0327ff

Please sign in to comment.