Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340896
b: refs/heads/master
c: dfae714
h: refs/heads/master
v: v3
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed Oct 19, 2012
1 parent a97d30e commit 28ed3f6
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 9 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: 017c4c3bdeb4e6c38094eb2330a57370f68f4853
refs/heads/master: dfae714361ba75323914da19eb411aaae53d6af0
4 changes: 4 additions & 0 deletions trunk/drivers/bcma/driver_pci_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,17 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
pc_host->mem_resource.start = BCMA_SOC_PCI_MEM;
pc_host->mem_resource.end = BCMA_SOC_PCI_MEM +
BCMA_SOC_PCI_MEM_SZ - 1;
pc_host->io_resource.start = 0x100;
pc_host->io_resource.end = 0x47F;
pci_membase_1G = BCMA_SOC_PCIE_DMA_H32;
pcicore_write32(pc, BCMA_CORE_PCI_SBTOPCI0,
tmp | BCMA_SOC_PCI_MEM);
} else if (pc->core->core_unit == 1) {
pc_host->mem_resource.start = BCMA_SOC_PCI1_MEM;
pc_host->mem_resource.end = BCMA_SOC_PCI1_MEM +
BCMA_SOC_PCI_MEM_SZ - 1;
pc_host->io_resource.start = 0x480;
pc_host->io_resource.end = 0x7FF;
pci_membase_1G = BCMA_SOC_PCIE1_DMA_H32;
pc_host->host_cfg_addr = BCMA_SOC_PCI1_CFG;
pcicore_write32(pc, BCMA_CORE_PCI_SBTOPCI0,
Expand Down
25 changes: 22 additions & 3 deletions trunk/drivers/bcma/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid)
}
EXPORT_SYMBOL_GPL(bcma_find_core);

static struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
u8 unit)
{
struct bcma_device *core;

list_for_each_entry(core, &bus->cores, list) {
if (core->id.id == coreid && core->core_unit == unit)
return core;
}
return NULL;
}

static void bcma_release_core_dev(struct device *dev)
{
struct bcma_device *core = container_of(dev, struct bcma_device, dev);
Expand Down Expand Up @@ -211,10 +223,17 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
}

/* Init PCIE core */
core = bcma_find_core(bus, BCMA_CORE_PCIE);
core = bcma_find_core_unit(bus, BCMA_CORE_PCIE, 0);
if (core) {
bus->drv_pci[0].core = core;
bcma_core_pci_init(&bus->drv_pci[0]);
}

/* Init PCIE core */
core = bcma_find_core_unit(bus, BCMA_CORE_PCIE, 1);
if (core) {
bus->drv_pci.core = core;
bcma_core_pci_init(&bus->drv_pci);
bus->drv_pci[1].core = core;
bcma_core_pci_init(&bus->drv_pci[1]);
}

/* Init GBIT MAC COMMON core */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4652,7 +4652,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
switch (dev->dev->bus_type) {
#ifdef CONFIG_B43_BCMA
case B43_BUS_BCMA:
bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci,
bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci[0],
dev->dev->bdev, true);
break;
#endif
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void ai_pci_up(struct si_pub *sih)
sii = container_of(sih, struct si_info, pub);

if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, true);
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], true);
}

/* Unconfigure and/or apply various WARs when going down */
Expand All @@ -703,7 +703,7 @@ void ai_pci_down(struct si_pub *sih)
sii = container_of(sih, struct si_info, pub);

if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, false);
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], false);
}

/* Enable BT-COEX & Ex-PA for 4313 */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5077,7 +5077,7 @@ static int brcms_b_up_prep(struct brcms_hardware *wlc_hw)
* Configure pci/pcmcia here instead of in brcms_c_attach()
* to allow mfg hotswap: down, hotswap (chip power cycle), up.
*/
bcma_core_pci_irq_ctl(&wlc_hw->d11core->bus->drv_pci, wlc_hw->d11core,
bcma_core_pci_irq_ctl(&wlc_hw->d11core->bus->drv_pci[0], wlc_hw->d11core,
true);

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/bcma/bcma.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ struct bcma_bus {
u8 num;

struct bcma_drv_cc drv_cc;
struct bcma_drv_pci drv_pci;
struct bcma_drv_pci drv_pci[2];
struct bcma_drv_mips drv_mips;
struct bcma_drv_gmac_cmn drv_gmac_cmn;

Expand Down

0 comments on commit 28ed3f6

Please sign in to comment.