summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/host_pci.c
diff options
context:
space:
mode:
authorRafał Miłecki2015-02-08 17:11:47 +0100
committerKalle Valo2015-03-02 15:59:45 +0100
commit4186721d02b71ae943e60bbf50d3488fd5fd6adb (patch)
tree7623f94d3baa042f5090780bb285f5be1e6ff847 /drivers/bcma/host_pci.c
parentbrcmfmac: respect reason when deleting (deauthenticating) STA (diff)
downloadkernel-qcow2-linux-4186721d02b71ae943e60bbf50d3488fd5fd6adb.tar.gz
kernel-qcow2-linux-4186721d02b71ae943e60bbf50d3488fd5fd6adb.tar.xz
kernel-qcow2-linux-4186721d02b71ae943e60bbf50d3488fd5fd6adb.zip
bcma: add helpers bringing PCIe hosted bus up / down
Bringing PCIe hosted bus up requires operating on host-related core. Since we plan to support PCIe Gen 2 devices we should provide a helper picking the correct one (PCIE or PCIE2). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/bcma/host_pci.c')
-rw-r--r--drivers/bcma/host_pci.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 53c6a8a58859..8dd37dc94cae 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -310,3 +310,31 @@ void __exit bcma_host_pci_exit(void)
{
pci_unregister_driver(&bcma_pci_bridge_driver);
}
+
+/**************************************************
+ * Runtime ops for drivers.
+ **************************************************/
+
+/* See also pcicore_up */
+void bcma_host_pci_up(struct bcma_bus *bus)
+{
+ if (bus->hosttype != BCMA_HOSTTYPE_PCI)
+ return;
+
+ if (bus->host_is_pcie2)
+ pr_warn("Bringing up bus with PCIe Gen 2 host is unsupported yet\n");
+ else
+ bcma_core_pci_up(&bus->drv_pci[0]);
+}
+EXPORT_SYMBOL_GPL(bcma_host_pci_up);
+
+/* See also pcicore_down */
+void bcma_host_pci_down(struct bcma_bus *bus)
+{
+ if (bus->hosttype != BCMA_HOSTTYPE_PCI)
+ return;
+
+ if (!bus->host_is_pcie2)
+ bcma_core_pci_down(&bus->drv_pci[0]);
+}
+EXPORT_SYMBOL_GPL(bcma_host_pci_down);