summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/bcma_private.h
diff options
context:
space:
mode:
authorRafał Miłecki2015-03-05 18:25:11 +0100
committerKalle Valo2015-03-13 15:25:50 +0100
commit982a40f5c0bb03368989a6b1ae833b474854e931 (patch)
treeac48e5179974d2c93d5e8317ec571bcf7fdf0ded /drivers/bcma/bcma_private.h
parentbcma: move PCI IRQ control function to host specific code (diff)
downloadkernel-qcow2-linux-982a40f5c0bb03368989a6b1ae833b474854e931.tar.gz
kernel-qcow2-linux-982a40f5c0bb03368989a6b1ae833b474854e931.tar.xz
kernel-qcow2-linux-982a40f5c0bb03368989a6b1ae833b474854e931.zip
bcma: allow disabling (not building) PCI driver
It isn't required for bcma bus on SoCs, so provide some empty functions and allow disabling it. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/bcma/bcma_private.h')
-rw-r--r--drivers/bcma/bcma_private.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 5a1d22489afc..15f2b2e242ea 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -106,15 +106,35 @@ static inline void __exit bcma_host_soc_unregister_driver(void)
#endif /* CONFIG_BCMA_HOST_SOC && CONFIG_OF */
/* driver_pci.c */
+#ifdef CONFIG_BCMA_DRIVER_PCI
u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
void bcma_core_pci_init(struct bcma_drv_pci *pc);
void bcma_core_pci_up(struct bcma_drv_pci *pc);
void bcma_core_pci_down(struct bcma_drv_pci *pc);
+#else
+static inline void bcma_core_pci_early_init(struct bcma_drv_pci *pc)
+{
+ WARN_ON(pc->core->bus->hosttype == BCMA_HOSTTYPE_PCI);
+}
+static inline void bcma_core_pci_init(struct bcma_drv_pci *pc)
+{
+ /* Initialization is required for PCI hosted bus */
+ WARN_ON(pc->core->bus->hosttype == BCMA_HOSTTYPE_PCI);
+}
+#endif
/* driver_pcie2.c */
+#ifdef CONFIG_BCMA_DRIVER_PCI
void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
void bcma_core_pcie2_up(struct bcma_drv_pcie2 *pcie2);
+#else
+static inline void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2)
+{
+ /* Initialization is required for PCI hosted bus */
+ WARN_ON(pcie2->core->bus->hosttype == BCMA_HOSTTYPE_PCI);
+}
+#endif
extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);