Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228219
b: refs/heads/master
c: fa7a1db
h: refs/heads/master
i:
  228217: a9f2ed8
  228215: 39dec66
v: v3
  • Loading branch information
Brett Rudley authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent c913486 commit 90b3deb
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 73 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c95e66e1fae810110410b59f411110ca671ffb28
refs/heads/master: fa7a1db200ecb7a5912722a563646935700765a8
1 change: 0 additions & 1 deletion trunk/drivers/staging/brcm80211/include/bcmdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define SPI_BUS 6 /* gSPI target */
#define RPC_BUS 7 /* RPC target */

#define BUSTYPE(bus) (bus)
#define CHIPTYPE(bus) (bus)
#define CHIPID(chip) (chip)
#define CHIPREV(rev) (rev)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/include/nicpci.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ extern bool pcicore_pmecap_fast(struct osl_info *osh);
extern void pcicore_pmeen(void *pch);
extern void pcicore_pmeclr(void *pch);
extern bool pcicore_pmestat(void *pch);
#endif /* defined(BCMSDIO) || (defined(BCMBUSTYPE) && (BCMBUSTYPE == SI_BUS)) */
#endif /* defined(BCMSDIO)||(defined(BCMBUSTYPE) && (BCMBUSTYPE==SI_BUS)) */

#endif /* _NICPCI_H */
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/include/siutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ typedef struct si_info {
#define ILP_DIV_5MHZ 0 /* ILP = 5 MHz */
#define ILP_DIV_1MHZ 4 /* ILP = 1 MHz */

#define PCI(si) ((BUSTYPE((si)->pub.bustype) == PCI_BUS) && \
#define PCI(si) (((si)->pub.bustype == PCI_BUS) && \
((si)->pub.buscoretype == PCI_CORE_ID))
#define PCIE(si) ((BUSTYPE((si)->pub.bustype) == PCI_BUS) && \
#define PCIE(si) (((si)->pub.bustype == PCI_BUS) && \
((si)->pub.buscoretype == PCIE_CORE_ID))
#define PCI_FORCEHT(si) \
(PCIE(si) && (si->pub.chip == BCM4716_CHIP_ID))
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/phy/wlc_phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void write_radio_reg(phy_info_t *pi, u16 addr, u16 val)
W_REG(osh, &pi->regs->phy4wdatalo, val);
}

if (BUSTYPE(pi->sh->bustype) == PCI_BUS) {
if (pi->sh->bustype == PCI_BUS) {
if (++pi->phy_wreg >= pi->phy_wreg_limit) {
(void)R_REG(osh, &pi->regs->maccontrol);
pi->phy_wreg = 0;
Expand Down Expand Up @@ -445,7 +445,7 @@ void write_phy_reg(phy_info_t *pi, u16 addr, u16 val)
#else
W_REG(osh, (volatile u32 *)(&regs->phyregaddr),
addr | (val << 16));
if (BUSTYPE(pi->sh->bustype) == PCI_BUS) {
if (pi->sh->bustype == PCI_BUS) {
if (++pi->phy_wreg >= pi->phy_wreg_limit) {
pi->phy_wreg = 0;
(void)R_REG(osh, &regs->phyversion);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/phy/wlc_phy_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ extern void wlc_phy_table_write_nphy(phy_info_t *pi, u32, u32, u32,
(pi->ipa5g_on && CHSPEC_IS5G(pi->radio_chanspec)))

#define WLC_PHY_WAR_PR51571(pi) \
if ((BUSTYPE((pi)->sh->bustype) == PCI_BUS) && NREV_LT((pi)->pubpi.phy_rev, 3)) \
if (((pi)->sh->bustype == PCI_BUS) && NREV_LT((pi)->pubpi.phy_rev, 3)) \
(void)R_REG((pi)->sh->osh, &(pi)->regs->maccontrol)

extern void wlc_phy_cal_perical_nphy_run(phy_info_t *pi, u8 caltype);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/sys/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,8 +1305,8 @@ void wl_free(wl_info_t *wl)
* unregister_netdev() calls get_stats() which may read chip registers
* so we cannot unmap the chip registers until after calling unregister_netdev() .
*/
if (wl->regsva && BUSTYPE(wl->bcm_bustype) != SDIO_BUS &&
BUSTYPE(wl->bcm_bustype) != JTAG_BUS) {
if (wl->regsva && wl->bcm_bustype != SDIO_BUS &&
wl->bcm_bustype != JTAG_BUS) {
iounmap((void *)wl->regsva);
}
wl->regsva = NULL;
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/staging/brcm80211/sys/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit,
|| (wlc_hw->boardflags & BFL_NOPLLDOWN))
wlc_bmac_pllreq(wlc_hw, true, WLC_PLLREQ_SHARED);

if ((BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if ((wlc_hw->sih->bustype == PCI_BUS)
&& (si_pci_war16165(wlc_hw->sih)))
wlc->war16165 = true;

Expand Down Expand Up @@ -992,7 +992,7 @@ int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit,
wlc_coredisable(wlc_hw);

/* Match driver "down" state */
if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if (wlc_hw->sih->bustype == PCI_BUS)
si_pci_down(wlc_hw->sih);

/* register sb interrupt callback functions */
Expand Down Expand Up @@ -1081,7 +1081,7 @@ int wlc_bmac_detach(wlc_info_t *wlc)
*/
si_deregister_intr_callback(wlc_hw->sih);

if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if (wlc_hw->sih->bustype == PCI_BUS)
si_pci_sleep(wlc_hw->sih);
}

Expand Down Expand Up @@ -1207,7 +1207,7 @@ int wlc_bmac_up_prep(wlc_hw_info_t *wlc_hw)
*/
coremask = (1 << wlc_hw->wlc->core->coreidx);

if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if (wlc_hw->sih->bustype == PCI_BUS)
si_pci_setup(wlc_hw->sih, coremask);

ASSERT(si_coreid(wlc_hw->sih) == D11_CORE_ID);
Expand All @@ -1218,13 +1218,13 @@ int wlc_bmac_up_prep(wlc_hw_info_t *wlc_hw)
*/
if (wlc_bmac_radio_read_hwdisabled(wlc_hw)) {
/* put SB PCI in down state again */
if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if (wlc_hw->sih->bustype == PCI_BUS)
si_pci_down(wlc_hw->sih);
wlc_bmac_xtal(wlc_hw, OFF);
return BCME_RADIOOFF;
}

if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if (wlc_hw->sih->bustype == PCI_BUS)
si_pci_up(wlc_hw->sih);

/* reset the d11 core */
Expand Down Expand Up @@ -1310,7 +1310,7 @@ int wlc_bmac_down_finish(wlc_hw_info_t *wlc_hw)

/* turn off primary xtal and pll */
if (!wlc_hw->noreset) {
if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS)
if (wlc_hw->sih->bustype == PCI_BUS)
si_pci_down(wlc_hw->sih);
wlc_bmac_xtal(wlc_hw, OFF);
}
Expand Down Expand Up @@ -2263,7 +2263,7 @@ void wlc_bmac_hw_up(wlc_hw_info_t *wlc_hw)
si_clkctl_init(wlc_hw->sih);
wlc_clkctl_clk(wlc_hw, CLK_FAST);

if (BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS) {
if (wlc_hw->sih->bustype == PCI_BUS) {
si_pci_fixcfg(wlc_hw->sih);

/* AI chip doesn't restore bar0win2 on hibernation/resume, need sw fixup */
Expand Down Expand Up @@ -4123,8 +4123,8 @@ void wlc_gpio_fast_deinit(wlc_hw_info_t *wlc_hw)
/* Only chips with internal bus or PCIE cores or certain PCI cores
* are able to switch cores w/o disabling interrupts
*/
if (!((BUSTYPE(wlc_hw->sih->bustype) == SI_BUS) ||
((BUSTYPE(wlc_hw->sih->bustype) == PCI_BUS) &&
if (!((wlc_hw->sih->bustype == SI_BUS) ||
((wlc_hw->sih->bustype == PCI_BUS) &&
((wlc_hw->sih->buscoretype == PCIE_CORE_ID) ||
(wlc_hw->sih->buscorerev >= 13)))))
return;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/sys/wlc_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
/* To inform the ucode of the last mcast frame posted so that it can clear moredata bit */
#define BCMCFID(wlc, fid) wlc_bmac_write_shm((wlc)->hw, M_BCMC_FID, (fid))

#define WLC_WAR16165(wlc) (BUSTYPE(wlc->pub->sih->bustype) == PCI_BUS && \
#define WLC_WAR16165(wlc) (wlc->pub->sih->bustype == PCI_BUS && \
(!AP_ENAB(wlc->pub)) && (wlc->war16165))

/* debug/trace */
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/util/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void ai_scan(si_t *sih, void *regs, uint devid)

erombase = R_REG(sii->osh, &cc->eromptr);

switch (BUSTYPE(sih->bustype)) {
switch (sih->bustype) {
case SI_BUS:
eromptr = (u32 *) REG_MAP(erombase, SI_CORE_SIZE);
break;
Expand Down Expand Up @@ -334,7 +334,7 @@ void *ai_setcoreidx(si_t *sih, uint coreidx)
ASSERT((sii->intrsenabled_fn == NULL)
|| !(*(sii)->intrsenabled_fn) ((sii)->intr_arg));

switch (BUSTYPE(sih->bustype)) {
switch (sih->bustype) {
case SI_BUS:
/* map new one */
if (!sii->regs[coreidx]) {
Expand Down Expand Up @@ -508,7 +508,7 @@ uint ai_corereg(si_t *sih, uint coreidx, uint regoff, uint mask, uint val)
if (coreidx >= SI_MAXCORES)
return 0;

if (BUSTYPE(sih->bustype) == SI_BUS) {
if (sih->bustype == SI_BUS) {
/* If internal bus, we can always get at everything */
fast = true;
/* map if does not exist */
Expand All @@ -518,7 +518,7 @@ uint ai_corereg(si_t *sih, uint coreidx, uint regoff, uint mask, uint val)
ASSERT(GOODREGS(sii->regs[coreidx]));
}
r = (u32 *) ((unsigned char *) sii->regs[coreidx] + regoff);
} else if (BUSTYPE(sih->bustype) == PCI_BUS) {
} else if (sih->bustype == PCI_BUS) {
/* If pci/pcie, we can get at pci/pcie regs and on newer cores to chipc */

if ((sii->coreid[coreidx] == CC_CORE_ID) && SI_FAST(sii)) {
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/brcm80211/util/bcmsrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ int srom_var_init(si_t *sih, uint bustype, void *curmap, struct osl_info *osh,

len = 0;

ASSERT(bustype == BUSTYPE(bustype));
ASSERT(bustype == bustype);
if (vars == NULL || count == NULL)
return 0;

*vars = NULL;
*count = 0;

switch (BUSTYPE(bustype)) {
switch (bustype) {
case SI_BUS:
case JTAG_BUS:
return initvars_srom_si(sih, osh, curmap, vars, count);
Expand Down Expand Up @@ -204,7 +204,7 @@ srom_read(si_t *sih, uint bustype, void *curmap, struct osl_info *osh,
uint i;
#endif /* BCMSDIO */

ASSERT(bustype == BUSTYPE(bustype));
ASSERT(bustype == bustype);

/* check input - 16-bit access only */
if (byteoff & 1 || nbytes & 1 || (byteoff + nbytes) > SROM_MAX)
Expand All @@ -213,7 +213,7 @@ srom_read(si_t *sih, uint bustype, void *curmap, struct osl_info *osh,
off = byteoff / 2;
nw = nbytes / 2;

if (BUSTYPE(bustype) == PCI_BUS) {
if (bustype == PCI_BUS) {
if (!curmap)
return 1;

Expand All @@ -235,7 +235,7 @@ srom_read(si_t *sih, uint bustype, void *curmap, struct osl_info *osh,
}
#endif
#ifdef BCMSDIO
} else if (BUSTYPE(bustype) == SDIO_BUS) {
} else if (bustype == SDIO_BUS) {
off = byteoff / 2;
nw = nbytes / 2;
for (i = 0; i < nw; i++) {
Expand All @@ -244,7 +244,7 @@ srom_read(si_t *sih, uint bustype, void *curmap, struct osl_info *osh,
return 1;
}
#endif /* BCMSDIO */
} else if (BUSTYPE(bustype) == SI_BUS) {
} else if (bustype == SI_BUS) {
return 1;
} else {
return 1;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/util/hnddma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2666,8 +2666,8 @@ uint dma_addrwidth(si_t *sih, void *dmaregs)
/* backplane are 64-bit capable */
if (si_backplane64(sih))
/* If bus is System Backplane or PCIE then we can access 64-bits */
if ((BUSTYPE(sih->bustype) == SI_BUS) ||
((BUSTYPE(sih->bustype) == PCI_BUS) &&
if ((sih->bustype == SI_BUS) ||
((sih->bustype == PCI_BUS) &&
(sih->buscoretype == PCIE_CORE_ID)))
return DMADDRWIDTH_64;

Expand All @@ -2681,8 +2681,8 @@ uint dma_addrwidth(si_t *sih, void *dmaregs)
dma32regs = (dma32regs_t *) dmaregs;

/* For System Backplane, PCIE bus or addrext feature, 32-bits ok */
if ((BUSTYPE(sih->bustype) == SI_BUS) ||
((BUSTYPE(sih->bustype) == PCI_BUS)
if ((sih->bustype == SI_BUS) ||
((sih->bustype == PCI_BUS)
&& sih->buscoretype == PCIE_CORE_ID)
|| (_dma32_addrext(osh, dma32regs)))
return DMADDRWIDTH_32;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/staging/brcm80211/util/nicpci.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ typedef struct {

/* debug/trace */
#define PCI_ERROR(args)
#define PCIE_PUB(sih) ((BUSTYPE((sih)->bustype) == PCI_BUS) && ((sih)->buscoretype == PCIE_CORE_ID))
#define PCIE_PUB(sih) \
(((sih)->bustype == PCI_BUS) && ((sih)->buscoretype == PCIE_CORE_ID))

/* routines to access mdio slave device registers */
static bool pcie_mdiosetblock(pcicore_info_t *pi, uint blk);
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/util/sbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static u32 _sb_coresba(si_info_t *sii)
{
u32 sbaddr = 0;

switch (BUSTYPE(sii->pub.bustype)) {
switch (sii->pub.bustype) {
case SPI_BUS:
case SDIO_BUS:
sbaddr = (u32)(unsigned long)sii->curmap;
Expand Down Expand Up @@ -347,7 +347,7 @@ static void *_sb_setcoreidx(si_info_t *sii, uint coreidx)
u32 sbaddr = sii->coresba[coreidx];
void *regs;

switch (BUSTYPE(sii->pub.bustype)) {
switch (sii->pub.bustype) {
#ifdef BCMSDIO
case SPI_BUS:
case SDIO_BUS:
Expand Down Expand Up @@ -412,8 +412,8 @@ bool sb_taclear(si_t *sih, bool details)

sii = SI_INFO(sih);

if ((BUSTYPE(sii->pub.bustype) == SDIO_BUS) ||
(BUSTYPE(sii->pub.bustype) == SPI_BUS)) {
if ((sii->pub.bustype == SDIO_BUS) ||
(sii->pub.bustype == SPI_BUS)) {

INTR_OFF(sii, intr_val);
origidx = si_coreidx(sih);
Expand Down
Loading

0 comments on commit 90b3deb

Please sign in to comment.