mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
bcma: add method to power up and down the PCIe core by wifi driver
The wifi driver should tell the PCIe core that it is now in operation so that some workarounds can be applied and the power state is changed. This should replace the call to bcma_core_pci_extend_L1timer by the brcmsmac driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
f4a83e578e
commit
cfe51ec1ae
@ -275,3 +275,29 @@ void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend)
|
|||||||
bcma_pcie_read(pc, BCMA_CORE_PCI_DLLP_PMTHRESHREG);
|
bcma_pcie_read(pc, BCMA_CORE_PCI_DLLP_PMTHRESHREG);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(bcma_core_pci_extend_L1timer);
|
EXPORT_SYMBOL_GPL(bcma_core_pci_extend_L1timer);
|
||||||
|
|
||||||
|
void bcma_core_pci_up(struct bcma_bus *bus)
|
||||||
|
{
|
||||||
|
struct bcma_drv_pci *pc;
|
||||||
|
|
||||||
|
if (bus->hosttype != BCMA_HOSTTYPE_PCI)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pc = &bus->drv_pci[0];
|
||||||
|
|
||||||
|
bcma_core_pci_extend_L1timer(pc, true);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(bcma_core_pci_up);
|
||||||
|
|
||||||
|
void bcma_core_pci_down(struct bcma_bus *bus)
|
||||||
|
{
|
||||||
|
struct bcma_drv_pci *pc;
|
||||||
|
|
||||||
|
if (bus->hosttype != BCMA_HOSTTYPE_PCI)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pc = &bus->drv_pci[0];
|
||||||
|
|
||||||
|
bcma_core_pci_extend_L1timer(pc, false);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(bcma_core_pci_down);
|
||||||
|
@ -185,6 +185,7 @@ struct pci_dev;
|
|||||||
#define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001
|
#define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001
|
||||||
|
|
||||||
struct bcma_drv_pci;
|
struct bcma_drv_pci;
|
||||||
|
struct bcma_bus;
|
||||||
|
|
||||||
#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
|
#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
|
||||||
struct bcma_drv_pci_host {
|
struct bcma_drv_pci_host {
|
||||||
@ -220,6 +221,8 @@ extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
|
|||||||
extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
|
extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
|
||||||
struct bcma_device *core, bool enable);
|
struct bcma_device *core, bool enable);
|
||||||
extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend);
|
extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend);
|
||||||
|
extern void bcma_core_pci_up(struct bcma_bus *bus);
|
||||||
|
extern void bcma_core_pci_down(struct bcma_bus *bus);
|
||||||
|
|
||||||
extern int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev);
|
extern int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev);
|
||||||
extern int bcma_core_pci_plat_dev_init(struct pci_dev *dev);
|
extern int bcma_core_pci_plat_dev_init(struct pci_dev *dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user