1 --- a/drivers/bcma/bcma_private.h
2 +++ b/drivers/bcma/bcma_private.h
3 @@ -26,6 +26,7 @@ bool bcma_wait_value(struct bcma_device
5 void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core);
6 void bcma_init_bus(struct bcma_bus *bus);
7 +void bcma_unregister_cores(struct bcma_bus *bus);
8 int bcma_bus_register(struct bcma_bus *bus);
9 void bcma_bus_unregister(struct bcma_bus *bus);
10 int __init bcma_bus_early_register(struct bcma_bus *bus);
11 @@ -42,6 +43,9 @@ int bcma_bus_scan(struct bcma_bus *bus);
12 int bcma_sprom_get(struct bcma_bus *bus);
14 /* driver_chipcommon.c */
15 +void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
16 +void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
17 +void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
18 #ifdef CONFIG_BCMA_DRIVER_MIPS
19 void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
20 extern struct platform_device bcma_pflash_dev;
21 @@ -52,6 +56,8 @@ int bcma_core_chipcommon_b_init(struct b
22 void bcma_core_chipcommon_b_free(struct bcma_drv_cc_b *ccb);
24 /* driver_chipcommon_pmu.c */
25 +void bcma_pmu_early_init(struct bcma_drv_cc *cc);
26 +void bcma_pmu_init(struct bcma_drv_cc *cc);
27 u32 bcma_pmu_get_alp_clock(struct bcma_drv_cc *cc);
28 u32 bcma_pmu_get_cpu_clock(struct bcma_drv_cc *cc);
30 @@ -101,6 +107,14 @@ static inline void __exit bcma_host_soc_
33 u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
34 +void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
35 +void bcma_core_pci_init(struct bcma_drv_pci *pc);
36 +void bcma_core_pci_up(struct bcma_drv_pci *pc);
37 +void bcma_core_pci_down(struct bcma_drv_pci *pc);
40 +void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
41 +void bcma_core_pcie2_up(struct bcma_drv_pcie2 *pcie2);
43 extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
45 @@ -117,6 +131,39 @@ static inline void bcma_core_pci_hostmod
47 #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
49 +/**************************************************
51 + **************************************************/
53 +#ifdef CONFIG_BCMA_DRIVER_MIPS
54 +unsigned int bcma_core_mips_irq(struct bcma_device *dev);
55 +void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
56 +void bcma_core_mips_init(struct bcma_drv_mips *mcore);
58 +static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
62 +static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
65 +static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore)
70 +/**************************************************
72 + **************************************************/
74 +#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
75 +void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
77 +static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc)
82 #ifdef CONFIG_BCMA_DRIVER_GPIO
84 int bcma_gpio_init(struct bcma_drv_cc *cc);
85 --- a/drivers/bcma/driver_gpio.c
86 +++ b/drivers/bcma/driver_gpio.c
89 #include "bcma_private.h"
91 +#define BCMA_GPIO_MAX_PINS 32
93 static inline struct bcma_drv_cc *bcma_gpio_get_cc(struct gpio_chip *chip)
95 return container_of(chip, struct bcma_drv_cc, gpio);
96 @@ -76,7 +78,7 @@ static void bcma_gpio_free(struct gpio_c
97 bcma_chipco_gpio_pullup(cc, 1 << gpio, 0);
100 -#if IS_BUILTIN(CONFIG_BCM47XX)
101 +#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
102 static int bcma_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
104 struct bcma_drv_cc *cc = bcma_gpio_get_cc(chip);
105 @@ -204,6 +206,7 @@ static void bcma_gpio_irq_domain_exit(st
107 int bcma_gpio_init(struct bcma_drv_cc *cc)
109 + struct bcma_bus *bus = cc->core->bus;
110 struct gpio_chip *chip = &cc->gpio;
113 @@ -215,14 +218,14 @@ int bcma_gpio_init(struct bcma_drv_cc *c
114 chip->set = bcma_gpio_set_value;
115 chip->direction_input = bcma_gpio_direction_input;
116 chip->direction_output = bcma_gpio_direction_output;
117 -#if IS_BUILTIN(CONFIG_BCM47XX)
118 +#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
119 chip->to_irq = bcma_gpio_to_irq;
121 #if IS_BUILTIN(CONFIG_OF)
122 if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
123 chip->of_node = cc->core->dev.of_node;
125 - switch (cc->core->bus->chipinfo.id) {
126 + switch (bus->chipinfo.id) {
127 case BCMA_CHIP_ID_BCM5357:
128 case BCMA_CHIP_ID_BCM53572:
130 @@ -231,13 +234,17 @@ int bcma_gpio_init(struct bcma_drv_cc *c
134 - /* There is just one SoC in one device and its GPIO addresses should be
135 - * deterministic to address them more easily. The other buses could get
136 - * a random base number. */
137 - if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
142 + * On MIPS we register GPIO devices (LEDs, buttons) using absolute GPIO
143 + * pin numbers. We don't have Device Tree there and we can't really use
144 + * relative (per chip) numbers.
145 + * So let's use predictable base for BCM47XX and "random" for all other.
147 +#if IS_BUILTIN(CONFIG_BCM47XX)
148 + chip->base = bus->num * BCMA_GPIO_MAX_PINS;
153 err = bcma_gpio_irq_domain_init(cc);
155 --- a/drivers/bcma/driver_pci.c
156 +++ b/drivers/bcma/driver_pci.c
157 @@ -282,39 +282,6 @@ void bcma_core_pci_power_save(struct bcm
159 EXPORT_SYMBOL_GPL(bcma_core_pci_power_save);
161 -int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
164 - struct pci_dev *pdev;
168 - if (!pc || core->bus->hosttype != BCMA_HOSTTYPE_PCI) {
169 - /* This bcma device is not on a PCI host-bus. So the IRQs are
170 - * not routed through the PCI core.
171 - * So we must not enable routing through the PCI core. */
175 - pdev = pc->core->bus->host_pci;
177 - err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
181 - coremask = BIT(core->core_index) << 8;
187 - err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
192 -EXPORT_SYMBOL_GPL(bcma_core_pci_irq_ctl);
194 static void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend)
197 @@ -328,28 +295,12 @@ static void bcma_core_pci_extend_L1timer
198 bcma_pcie_read(pc, BCMA_CORE_PCI_DLLP_PMTHRESHREG);
201 -void bcma_core_pci_up(struct bcma_bus *bus)
202 +void bcma_core_pci_up(struct bcma_drv_pci *pc)
204 - struct bcma_drv_pci *pc;
206 - if (bus->hosttype != BCMA_HOSTTYPE_PCI)
209 - pc = &bus->drv_pci[0];
211 bcma_core_pci_extend_L1timer(pc, true);
213 -EXPORT_SYMBOL_GPL(bcma_core_pci_up);
215 -void bcma_core_pci_down(struct bcma_bus *bus)
216 +void bcma_core_pci_down(struct bcma_drv_pci *pc)
218 - struct bcma_drv_pci *pc;
220 - if (bus->hosttype != BCMA_HOSTTYPE_PCI)
223 - pc = &bus->drv_pci[0];
225 bcma_core_pci_extend_L1timer(pc, false);
227 -EXPORT_SYMBOL_GPL(bcma_core_pci_down);
228 --- a/drivers/bcma/driver_pci_host.c
229 +++ b/drivers/bcma/driver_pci_host.c
232 #include "bcma_private.h"
233 #include <linux/pci.h>
234 +#include <linux/slab.h>
235 #include <linux/export.h>
236 #include <linux/bcma/bcma.h>
237 #include <asm/paccess.h>
238 --- a/drivers/bcma/driver_pcie2.c
239 +++ b/drivers/bcma/driver_pcie2.c
242 #include "bcma_private.h"
243 #include <linux/bcma/bcma.h>
244 +#include <linux/pci.h>
246 /**************************************************
248 @@ -156,14 +157,23 @@ static void pciedev_reg_pm_clk_period(st
250 void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2)
252 - struct bcma_chipinfo *ci = &pcie2->core->bus->chipinfo;
253 + struct bcma_bus *bus = pcie2->core->bus;
254 + struct bcma_chipinfo *ci = &bus->chipinfo;
257 tmp = pcie2_read32(pcie2, BCMA_CORE_PCIE2_SPROM(54));
258 if ((tmp & 0xe) >> 1 == 2)
259 bcma_core_pcie2_cfg_write(pcie2, 0x4e0, 0x17);
261 - /* TODO: Do we need pcie_reqsize? */
262 + switch (bus->chipinfo.id) {
263 + case BCMA_CHIP_ID_BCM4360:
264 + case BCMA_CHIP_ID_BCM4352:
265 + pcie2->reqsize = 1024;
268 + pcie2->reqsize = 128;
272 if (ci->id == BCMA_CHIP_ID_BCM4360 && ci->rev > 3)
273 bcma_core_pcie2_war_delay_perst_enab(pcie2, true);
274 @@ -173,3 +183,18 @@ void bcma_core_pcie2_init(struct bcma_dr
275 pciedev_crwlpciegen2_180(pcie2);
276 pciedev_crwlpciegen2_182(pcie2);
279 +/**************************************************
281 + **************************************************/
283 +void bcma_core_pcie2_up(struct bcma_drv_pcie2 *pcie2)
285 + struct bcma_bus *bus = pcie2->core->bus;
286 + struct pci_dev *dev = bus->host_pci;
289 + err = pcie_set_readrq(dev, pcie2->reqsize);
291 + bcma_err(bus, "Error setting PCI_EXP_DEVCTL_READRQ: %d\n", err);
293 --- a/drivers/bcma/host_pci.c
294 +++ b/drivers/bcma/host_pci.c
295 @@ -213,16 +213,26 @@ static int bcma_host_pci_probe(struct pc
296 /* Initialize struct, detect chip */
299 + /* Scan bus to find out generation of PCIe core */
300 + err = bcma_bus_scan(bus);
302 + goto err_pci_unmap_mmio;
304 + if (bcma_find_core(bus, BCMA_CORE_PCIE2))
305 + bus->host_is_pcie2 = true;
308 err = bcma_bus_register(bus);
310 - goto err_pci_unmap_mmio;
311 + goto err_unregister_cores;
313 pci_set_drvdata(dev, bus);
318 +err_unregister_cores:
319 + bcma_unregister_cores(bus);
321 pci_iounmap(dev, bus->mmio);
322 err_pci_release_regions:
323 @@ -283,9 +293,12 @@ static const struct pci_device_id bcma_p
324 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4357) },
325 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4358) },
326 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
327 + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4360) },
328 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4365) },
329 + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a0) },
330 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a9) },
331 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43aa) },
332 + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43b1) },
333 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
334 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 43227) }, /* 0xa8db, BCM43217 (sic!) */
335 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 43228) }, /* 0xa8dc */
336 @@ -310,3 +323,65 @@ void __exit bcma_host_pci_exit(void)
338 pci_unregister_driver(&bcma_pci_bridge_driver);
341 +/**************************************************
342 + * Runtime ops for drivers.
343 + **************************************************/
345 +/* See also pcicore_up */
346 +void bcma_host_pci_up(struct bcma_bus *bus)
348 + if (bus->hosttype != BCMA_HOSTTYPE_PCI)
351 + if (bus->host_is_pcie2)
352 + bcma_core_pcie2_up(&bus->drv_pcie2);
354 + bcma_core_pci_up(&bus->drv_pci[0]);
356 +EXPORT_SYMBOL_GPL(bcma_host_pci_up);
358 +/* See also pcicore_down */
359 +void bcma_host_pci_down(struct bcma_bus *bus)
361 + if (bus->hosttype != BCMA_HOSTTYPE_PCI)
364 + if (!bus->host_is_pcie2)
365 + bcma_core_pci_down(&bus->drv_pci[0]);
367 +EXPORT_SYMBOL_GPL(bcma_host_pci_down);
369 +/* See also si_pci_setup */
370 +int bcma_host_pci_irq_ctl(struct bcma_bus *bus, struct bcma_device *core,
373 + struct pci_dev *pdev;
377 + if (bus->hosttype != BCMA_HOSTTYPE_PCI) {
378 + /* This bcma device is not on a PCI host-bus. So the IRQs are
379 + * not routed through the PCI core.
380 + * So we must not enable routing through the PCI core. */
384 + pdev = bus->host_pci;
386 + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
390 + coremask = BIT(core->core_index) << 8;
396 + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
401 +EXPORT_SYMBOL_GPL(bcma_host_pci_irq_ctl);
402 --- a/drivers/bcma/main.c
403 +++ b/drivers/bcma/main.c
404 @@ -363,7 +363,7 @@ static int bcma_register_devices(struct
408 -static void bcma_unregister_cores(struct bcma_bus *bus)
409 +void bcma_unregister_cores(struct bcma_bus *bus)
411 struct bcma_device *core, *tmp;
413 --- a/drivers/net/wireless/b43/main.c
414 +++ b/drivers/net/wireless/b43/main.c
415 @@ -4770,7 +4770,7 @@ static void b43_wireless_core_exit(struc
416 switch (dev->dev->bus_type) {
417 #ifdef CONFIG_B43_BCMA
419 - bcma_core_pci_down(dev->dev->bdev->bus);
420 + bcma_host_pci_down(dev->dev->bdev->bus);
423 #ifdef CONFIG_B43_SSB
424 @@ -4817,9 +4817,9 @@ static int b43_wireless_core_init(struct
425 switch (dev->dev->bus_type) {
426 #ifdef CONFIG_B43_BCMA
428 - bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci[0],
429 + bcma_host_pci_irq_ctl(dev->dev->bdev->bus,
430 dev->dev->bdev, true);
431 - bcma_core_pci_up(dev->dev->bdev->bus);
432 + bcma_host_pci_up(dev->dev->bdev->bus);
435 #ifdef CONFIG_B43_SSB
436 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
437 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
438 @@ -4669,7 +4669,7 @@ static int brcms_b_attach(struct brcms_c
439 brcms_c_coredisable(wlc_hw);
441 /* Match driver "down" state */
442 - bcma_core_pci_down(wlc_hw->d11core->bus);
443 + bcma_host_pci_down(wlc_hw->d11core->bus);
445 /* turn off pll and xtal to match driver "down" state */
446 brcms_b_xtal(wlc_hw, OFF);
447 @@ -4960,7 +4960,7 @@ static int brcms_b_up_prep(struct brcms_
448 * Configure pci/pcmcia here instead of in brcms_c_attach()
449 * to allow mfg hotswap: down, hotswap (chip power cycle), up.
451 - bcma_core_pci_irq_ctl(&wlc_hw->d11core->bus->drv_pci[0], wlc_hw->d11core,
452 + bcma_host_pci_irq_ctl(wlc_hw->d11core->bus, wlc_hw->d11core,
456 @@ -4970,12 +4970,12 @@ static int brcms_b_up_prep(struct brcms_
458 if (brcms_b_radio_read_hwdisabled(wlc_hw)) {
459 /* put SB PCI in down state again */
460 - bcma_core_pci_down(wlc_hw->d11core->bus);
461 + bcma_host_pci_down(wlc_hw->d11core->bus);
462 brcms_b_xtal(wlc_hw, OFF);
466 - bcma_core_pci_up(wlc_hw->d11core->bus);
467 + bcma_host_pci_up(wlc_hw->d11core->bus);
469 /* reset the d11 core */
470 brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
471 @@ -5172,7 +5172,7 @@ static int brcms_b_down_finish(struct br
473 /* turn off primary xtal and pll */
474 if (!wlc_hw->noreset) {
475 - bcma_core_pci_down(wlc_hw->d11core->bus);
476 + bcma_host_pci_down(wlc_hw->d11core->bus);
477 brcms_b_xtal(wlc_hw, OFF);
480 --- a/include/linux/bcma/bcma.h
481 +++ b/include/linux/bcma/bcma.h
482 @@ -434,6 +434,27 @@ static inline struct bcma_device *bcma_f
483 return bcma_find_core_unit(bus, coreid, 0);
486 +#ifdef CONFIG_BCMA_HOST_PCI
487 +extern void bcma_host_pci_up(struct bcma_bus *bus);
488 +extern void bcma_host_pci_down(struct bcma_bus *bus);
489 +extern int bcma_host_pci_irq_ctl(struct bcma_bus *bus,
490 + struct bcma_device *core, bool enable);
492 +static inline void bcma_host_pci_up(struct bcma_bus *bus)
495 +static inline void bcma_host_pci_down(struct bcma_bus *bus)
498 +static inline int bcma_host_pci_irq_ctl(struct bcma_bus *bus,
499 + struct bcma_device *core, bool enable)
501 + if (bus->hosttype == BCMA_HOSTTYPE_PCI)
507 extern bool bcma_core_is_enabled(struct bcma_device *core);
508 extern void bcma_core_disable(struct bcma_device *core, u32 flags);
509 extern int bcma_core_enable(struct bcma_device *core, u32 flags);
510 --- a/include/linux/bcma/bcma_driver_pci.h
511 +++ b/include/linux/bcma/bcma_driver_pci.h
512 @@ -238,12 +238,6 @@ struct bcma_drv_pci {
513 #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val)
514 #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val)
516 -extern void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
517 -extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
518 -extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
519 - struct bcma_device *core, bool enable);
520 -extern void bcma_core_pci_up(struct bcma_bus *bus);
521 -extern void bcma_core_pci_down(struct bcma_bus *bus);
522 extern void bcma_core_pci_power_save(struct bcma_bus *bus, bool up);
524 extern int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev);
525 --- a/include/linux/bcma/bcma_driver_pcie2.h
526 +++ b/include/linux/bcma/bcma_driver_pcie2.h
529 struct bcma_drv_pcie2 {
530 struct bcma_device *core;
535 #define pcie2_read16(pcie2, offset) bcma_read16((pcie2)->core, offset)
536 @@ -153,6 +155,4 @@ struct bcma_drv_pcie2 {
537 #define pcie2_set32(pcie2, offset, set) bcma_set32((pcie2)->core, offset, set)
538 #define pcie2_mask32(pcie2, offset, mask) bcma_mask32((pcie2)->core, offset, mask)
540 -void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
542 #endif /* LINUX_BCMA_DRIVER_PCIE2_H_ */
543 --- a/drivers/bcma/Kconfig
544 +++ b/drivers/bcma/Kconfig
548 - depends on HAS_IOMEM && HAS_DMA
549 + depends on HAS_IOMEM && HAS_DMA && PCI
552 menu "Broadcom specific AMBA"
553 @@ -26,6 +26,7 @@ config BCMA_HOST_PCI_POSSIBLE
555 bool "Support for BCMA on PCI-host bus"
556 depends on BCMA_HOST_PCI_POSSIBLE
557 + select BCMA_DRIVER_PCI
560 config BCMA_DRIVER_PCI_HOSTMODE
561 @@ -44,6 +45,22 @@ config BCMA_HOST_SOC
565 +# TODO: make it depend on PCI when ready
566 +config BCMA_DRIVER_PCI
570 + BCMA bus may have many versions of PCIe core. This driver
572 + 1) PCIe core working in clientmode
573 + 2) PCIe Gen 2 clientmode core
575 + In general PCIe (Gen 2) clientmode core is required on PCIe
576 + hosted buses. It's responsible for initialization and basic
577 + hardware management.
578 + This driver is also prerequisite for a hostmode PCIe core
581 config BCMA_DRIVER_MIPS
582 bool "BCMA Broadcom MIPS core driver"
583 depends on BCMA && MIPS
584 --- a/drivers/bcma/Makefile
585 +++ b/drivers/bcma/Makefile
586 @@ -3,8 +3,8 @@ bcma-y += driver_chipcommon.o driver
587 bcma-y += driver_chipcommon_b.o
588 bcma-$(CONFIG_BCMA_SFLASH) += driver_chipcommon_sflash.o
589 bcma-$(CONFIG_BCMA_NFLASH) += driver_chipcommon_nflash.o
590 -bcma-y += driver_pci.o
591 -bcma-y += driver_pcie2.o
592 +bcma-$(CONFIG_BCMA_DRIVER_PCI) += driver_pci.o
593 +bcma-$(CONFIG_BCMA_DRIVER_PCI) += driver_pcie2.o
594 bcma-$(CONFIG_BCMA_DRIVER_PCI_HOSTMODE) += driver_pci_host.o
595 bcma-$(CONFIG_BCMA_DRIVER_MIPS) += driver_mips.o
596 bcma-$(CONFIG_BCMA_DRIVER_GMAC_CMN) += driver_gmac_cmn.o
597 --- a/include/linux/bcma/bcma_driver_chipcommon.h
598 +++ b/include/linux/bcma/bcma_driver_chipcommon.h
599 @@ -663,14 +663,6 @@ struct bcma_drv_cc_b {
600 #define bcma_cc_maskset32(cc, offset, mask, set) \
601 bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set))
603 -extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
604 -extern void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
606 -extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);
607 -extern void bcma_chipco_resume(struct bcma_drv_cc *cc);
609 -void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
611 extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
613 extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc);
614 @@ -690,9 +682,6 @@ u32 bcma_chipco_gpio_pullup(struct bcma_
615 u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value);
618 -extern void bcma_pmu_init(struct bcma_drv_cc *cc);
619 -extern void bcma_pmu_early_init(struct bcma_drv_cc *cc);
621 extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset,
623 extern void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset,
624 --- a/include/linux/bcma/bcma_driver_gmac_cmn.h
625 +++ b/include/linux/bcma/bcma_driver_gmac_cmn.h
626 @@ -91,10 +91,4 @@ struct bcma_drv_gmac_cmn {
627 #define gmac_cmn_write16(gc, offset, val) bcma_write16((gc)->core, offset, val)
628 #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val)
630 -#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
631 -extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
633 -static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { }
636 #endif /* LINUX_BCMA_DRIVER_GMAC_CMN_H_ */
637 --- a/include/linux/bcma/bcma_driver_mips.h
638 +++ b/include/linux/bcma/bcma_driver_mips.h
639 @@ -39,21 +39,6 @@ struct bcma_drv_mips {
640 u8 early_setup_done:1;
643 -#ifdef CONFIG_BCMA_DRIVER_MIPS
644 -extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
645 -extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
647 -extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
649 -static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
650 -static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
652 -static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
658 extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
660 #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */