+@@ -153,6 +155,4 @@ struct bcma_drv_pcie2 {
+ #define pcie2_set32(pcie2, offset, set) bcma_set32((pcie2)->core, offset, set)
+ #define pcie2_mask32(pcie2, offset, mask) bcma_mask32((pcie2)->core, offset, mask)
+
+-void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
+-
+ #endif /* LINUX_BCMA_DRIVER_PCIE2_H_ */
+--- a/drivers/bcma/Kconfig
++++ b/drivers/bcma/Kconfig
+@@ -1,6 +1,6 @@
+ config BCMA_POSSIBLE
+ bool
+- depends on HAS_IOMEM && HAS_DMA
++ depends on HAS_IOMEM && HAS_DMA && PCI
+ default y
+
+ menu "Broadcom specific AMBA"
+@@ -26,6 +26,7 @@ config BCMA_HOST_PCI_POSSIBLE
+ config BCMA_HOST_PCI
+ bool "Support for BCMA on PCI-host bus"
+ depends on BCMA_HOST_PCI_POSSIBLE
++ select BCMA_DRIVER_PCI
+ default y
+
+ config BCMA_DRIVER_PCI_HOSTMODE
+@@ -44,6 +45,22 @@ config BCMA_HOST_SOC
+
+ If unsure, say N
+
++# TODO: make it depend on PCI when ready
++config BCMA_DRIVER_PCI
++ bool
++ default y
++ help
++ BCMA bus may have many versions of PCIe core. This driver
++ supports:
++ 1) PCIe core working in clientmode
++ 2) PCIe Gen 2 clientmode core
++
++ In general PCIe (Gen 2) clientmode core is required on PCIe
++ hosted buses. It's responsible for initialization and basic
++ hardware management.
++ This driver is also prerequisite for a hostmode PCIe core
++ support.
++
+ config BCMA_DRIVER_MIPS
+ bool "BCMA Broadcom MIPS core driver"
+ depends on BCMA && MIPS
+--- a/drivers/bcma/Makefile
++++ b/drivers/bcma/Makefile
+@@ -3,8 +3,8 @@ bcma-y += driver_chipcommon.o driver
+ bcma-y += driver_chipcommon_b.o
+ bcma-$(CONFIG_BCMA_SFLASH) += driver_chipcommon_sflash.o
+ bcma-$(CONFIG_BCMA_NFLASH) += driver_chipcommon_nflash.o
+-bcma-y += driver_pci.o
+-bcma-y += driver_pcie2.o
++bcma-$(CONFIG_BCMA_DRIVER_PCI) += driver_pci.o
++bcma-$(CONFIG_BCMA_DRIVER_PCI) += driver_pcie2.o
+ bcma-$(CONFIG_BCMA_DRIVER_PCI_HOSTMODE) += driver_pci_host.o
+ bcma-$(CONFIG_BCMA_DRIVER_MIPS) += driver_mips.o
+ bcma-$(CONFIG_BCMA_DRIVER_GMAC_CMN) += driver_gmac_cmn.o
+--- a/include/linux/bcma/bcma_driver_chipcommon.h
++++ b/include/linux/bcma/bcma_driver_chipcommon.h
+@@ -663,14 +663,6 @@ struct bcma_drv_cc_b {
+ #define bcma_cc_maskset32(cc, offset, mask, set) \
+ bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set))
+
+-extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
+-extern void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
+-
+-extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);
+-extern void bcma_chipco_resume(struct bcma_drv_cc *cc);
+-
+-void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
+-
+ extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
+
+ extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc);
+@@ -690,9 +682,6 @@ u32 bcma_chipco_gpio_pullup(struct bcma_
+ u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value);
+
+ /* PMU support */
+-extern void bcma_pmu_init(struct bcma_drv_cc *cc);
+-extern void bcma_pmu_early_init(struct bcma_drv_cc *cc);
+-
+ extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset,
+ u32 value);
+ extern void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset,
+--- a/include/linux/bcma/bcma_driver_gmac_cmn.h
++++ b/include/linux/bcma/bcma_driver_gmac_cmn.h
+@@ -91,10 +91,4 @@ struct bcma_drv_gmac_cmn {
+ #define gmac_cmn_write16(gc, offset, val) bcma_write16((gc)->core, offset, val)
+ #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val)
+
+-#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
+-extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
+-#else
+-static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { }
+-#endif
+-
+ #endif /* LINUX_BCMA_DRIVER_GMAC_CMN_H_ */
+--- a/include/linux/bcma/bcma_driver_mips.h
++++ b/include/linux/bcma/bcma_driver_mips.h
+@@ -39,21 +39,6 @@ struct bcma_drv_mips {
+ u8 early_setup_done:1;
+ };
+
+-#ifdef CONFIG_BCMA_DRIVER_MIPS
+-extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
+-extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
+-
+-extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
+-#else
+-static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
+-static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
+-
+-static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
+-{
+- return 0;
+-}
+-#endif
+-
+ extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
+
+ #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */