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 @@ -100,7 +106,35 @@ static inline void __exit bcma_host_soc_
31 #endif /* CONFIG_BCMA_HOST_SOC && CONFIG_OF */
34 +#ifdef CONFIG_BCMA_DRIVER_PCI
35 u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
36 +void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
37 +void bcma_core_pci_init(struct bcma_drv_pci *pc);
38 +void bcma_core_pci_up(struct bcma_drv_pci *pc);
39 +void bcma_core_pci_down(struct bcma_drv_pci *pc);
41 +static inline void bcma_core_pci_early_init(struct bcma_drv_pci *pc)
43 + WARN_ON(pc->core->bus->hosttype == BCMA_HOSTTYPE_PCI);
45 +static inline void bcma_core_pci_init(struct bcma_drv_pci *pc)
47 + /* Initialization is required for PCI hosted bus */
48 + WARN_ON(pc->core->bus->hosttype == BCMA_HOSTTYPE_PCI);
53 +#ifdef CONFIG_BCMA_DRIVER_PCI
54 +void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
55 +void bcma_core_pcie2_up(struct bcma_drv_pcie2 *pcie2);
57 +static inline void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2)
59 + /* Initialization is required for PCI hosted bus */
60 + WARN_ON(pcie2->core->bus->hosttype == BCMA_HOSTTYPE_PCI);
64 extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
66 @@ -117,6 +151,39 @@ static inline void bcma_core_pci_hostmod
68 #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
70 +/**************************************************
72 + **************************************************/
74 +#ifdef CONFIG_BCMA_DRIVER_MIPS
75 +unsigned int bcma_core_mips_irq(struct bcma_device *dev);
76 +void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
77 +void bcma_core_mips_init(struct bcma_drv_mips *mcore);
79 +static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
83 +static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
86 +static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore)
91 +/**************************************************
93 + **************************************************/
95 +#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
96 +void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
98 +static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc)
103 #ifdef CONFIG_BCMA_DRIVER_GPIO
105 int bcma_gpio_init(struct bcma_drv_cc *cc);
106 --- a/drivers/bcma/driver_gpio.c
107 +++ b/drivers/bcma/driver_gpio.c
110 #include "bcma_private.h"
112 +#define BCMA_GPIO_MAX_PINS 32
114 static inline struct bcma_drv_cc *bcma_gpio_get_cc(struct gpio_chip *chip)
116 return container_of(chip, struct bcma_drv_cc, gpio);
117 @@ -76,7 +78,7 @@ static void bcma_gpio_free(struct gpio_c
118 bcma_chipco_gpio_pullup(cc, 1 << gpio, 0);
121 -#if IS_BUILTIN(CONFIG_BCM47XX)
122 +#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
123 static int bcma_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
125 struct bcma_drv_cc *cc = bcma_gpio_get_cc(chip);
126 @@ -204,6 +206,7 @@ static void bcma_gpio_irq_domain_exit(st
128 int bcma_gpio_init(struct bcma_drv_cc *cc)
130 + struct bcma_bus *bus = cc->core->bus;
131 struct gpio_chip *chip = &cc->gpio;
134 @@ -215,14 +218,14 @@ int bcma_gpio_init(struct bcma_drv_cc *c
135 chip->set = bcma_gpio_set_value;
136 chip->direction_input = bcma_gpio_direction_input;
137 chip->direction_output = bcma_gpio_direction_output;
138 -#if IS_BUILTIN(CONFIG_BCM47XX)
139 +#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
140 chip->to_irq = bcma_gpio_to_irq;
142 #if IS_BUILTIN(CONFIG_OF)
143 if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
144 chip->of_node = cc->core->dev.of_node;
146 - switch (cc->core->bus->chipinfo.id) {
147 + switch (bus->chipinfo.id) {
148 case BCMA_CHIP_ID_BCM5357:
149 case BCMA_CHIP_ID_BCM53572:
151 @@ -231,13 +234,17 @@ int bcma_gpio_init(struct bcma_drv_cc *c
155 - /* There is just one SoC in one device and its GPIO addresses should be
156 - * deterministic to address them more easily. The other buses could get
157 - * a random base number. */
158 - if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
163 + * On MIPS we register GPIO devices (LEDs, buttons) using absolute GPIO
164 + * pin numbers. We don't have Device Tree there and we can't really use
165 + * relative (per chip) numbers.
166 + * So let's use predictable base for BCM47XX and "random" for all other.
168 +#if IS_BUILTIN(CONFIG_BCM47XX)
169 + chip->base = bus->num * BCMA_GPIO_MAX_PINS;
174 err = bcma_gpio_irq_domain_init(cc);
176 --- a/drivers/bcma/driver_pci.c
177 +++ b/drivers/bcma/driver_pci.c
178 @@ -282,39 +282,6 @@ void bcma_core_pci_power_save(struct bcm
180 EXPORT_SYMBOL_GPL(bcma_core_pci_power_save);
182 -int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
185 - struct pci_dev *pdev;
189 - if (!pc || core->bus->hosttype != BCMA_HOSTTYPE_PCI) {
190 - /* This bcma device is not on a PCI host-bus. So the IRQs are
191 - * not routed through the PCI core.
192 - * So we must not enable routing through the PCI core. */
196 - pdev = pc->core->bus->host_pci;
198 - err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
202 - coremask = BIT(core->core_index) << 8;
208 - err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
213 -EXPORT_SYMBOL_GPL(bcma_core_pci_irq_ctl);
215 static void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend)
218 @@ -328,28 +295,12 @@ static void bcma_core_pci_extend_L1timer
219 bcma_pcie_read(pc, BCMA_CORE_PCI_DLLP_PMTHRESHREG);
222 -void bcma_core_pci_up(struct bcma_bus *bus)
223 +void bcma_core_pci_up(struct bcma_drv_pci *pc)
225 - struct bcma_drv_pci *pc;
227 - if (bus->hosttype != BCMA_HOSTTYPE_PCI)
230 - pc = &bus->drv_pci[0];
232 bcma_core_pci_extend_L1timer(pc, true);
234 -EXPORT_SYMBOL_GPL(bcma_core_pci_up);
236 -void bcma_core_pci_down(struct bcma_bus *bus)
237 +void bcma_core_pci_down(struct bcma_drv_pci *pc)
239 - struct bcma_drv_pci *pc;
241 - if (bus->hosttype != BCMA_HOSTTYPE_PCI)
244 - pc = &bus->drv_pci[0];
246 bcma_core_pci_extend_L1timer(pc, false);
248 -EXPORT_SYMBOL_GPL(bcma_core_pci_down);
249 --- a/drivers/bcma/driver_pci_host.c
250 +++ b/drivers/bcma/driver_pci_host.c
253 #include "bcma_private.h"
254 #include <linux/pci.h>
255 +#include <linux/slab.h>
256 #include <linux/export.h>
257 #include <linux/bcma/bcma.h>
258 #include <asm/paccess.h>
259 --- a/drivers/bcma/driver_pcie2.c
260 +++ b/drivers/bcma/driver_pcie2.c
263 #include "bcma_private.h"
264 #include <linux/bcma/bcma.h>
265 +#include <linux/pci.h>
267 /**************************************************
269 @@ -156,14 +157,23 @@ static void pciedev_reg_pm_clk_period(st
271 void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2)
273 - struct bcma_chipinfo *ci = &pcie2->core->bus->chipinfo;
274 + struct bcma_bus *bus = pcie2->core->bus;
275 + struct bcma_chipinfo *ci = &bus->chipinfo;
278 tmp = pcie2_read32(pcie2, BCMA_CORE_PCIE2_SPROM(54));
279 if ((tmp & 0xe) >> 1 == 2)
280 bcma_core_pcie2_cfg_write(pcie2, 0x4e0, 0x17);
282 - /* TODO: Do we need pcie_reqsize? */
283 + switch (bus->chipinfo.id) {
284 + case BCMA_CHIP_ID_BCM4360:
285 + case BCMA_CHIP_ID_BCM4352:
286 + pcie2->reqsize = 1024;
289 + pcie2->reqsize = 128;
293 if (ci->id == BCMA_CHIP_ID_BCM4360 && ci->rev > 3)
294 bcma_core_pcie2_war_delay_perst_enab(pcie2, true);
295 @@ -173,3 +183,18 @@ void bcma_core_pcie2_init(struct bcma_dr
296 pciedev_crwlpciegen2_180(pcie2);
297 pciedev_crwlpciegen2_182(pcie2);
300 +/**************************************************
302 + **************************************************/
304 +void bcma_core_pcie2_up(struct bcma_drv_pcie2 *pcie2)
306 + struct bcma_bus *bus = pcie2->core->bus;
307 + struct pci_dev *dev = bus->host_pci;
310 + err = pcie_set_readrq(dev, pcie2->reqsize);
312 + bcma_err(bus, "Error setting PCI_EXP_DEVCTL_READRQ: %d\n", err);
314 --- a/drivers/bcma/host_pci.c
315 +++ b/drivers/bcma/host_pci.c
316 @@ -213,16 +213,26 @@ static int bcma_host_pci_probe(struct pc
317 /* Initialize struct, detect chip */
320 + /* Scan bus to find out generation of PCIe core */
321 + err = bcma_bus_scan(bus);
323 + goto err_pci_unmap_mmio;
325 + if (bcma_find_core(bus, BCMA_CORE_PCIE2))
326 + bus->host_is_pcie2 = true;
329 err = bcma_bus_register(bus);
331 - goto err_pci_unmap_mmio;
332 + goto err_unregister_cores;
334 pci_set_drvdata(dev, bus);
339 +err_unregister_cores:
340 + bcma_unregister_cores(bus);
342 pci_iounmap(dev, bus->mmio);
343 err_pci_release_regions:
344 @@ -283,9 +293,12 @@ static const struct pci_device_id bcma_p
345 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4357) },
346 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4358) },
347 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
348 + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4360) },
349 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4365) },
350 + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a0) },
351 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a9) },
352 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43aa) },
353 + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43b1) },
354 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
355 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 43227) }, /* 0xa8db, BCM43217 (sic!) */
356 { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 43228) }, /* 0xa8dc */
357 @@ -310,3 +323,65 @@ void __exit bcma_host_pci_exit(void)
359 pci_unregister_driver(&bcma_pci_bridge_driver);
362 +/**************************************************
363 + * Runtime ops for drivers.
364 + **************************************************/
366 +/* See also pcicore_up */
367 +void bcma_host_pci_up(struct bcma_bus *bus)
369 + if (bus->hosttype != BCMA_HOSTTYPE_PCI)
372 + if (bus->host_is_pcie2)
373 + bcma_core_pcie2_up(&bus->drv_pcie2);
375 + bcma_core_pci_up(&bus->drv_pci[0]);
377 +EXPORT_SYMBOL_GPL(bcma_host_pci_up);
379 +/* See also pcicore_down */
380 +void bcma_host_pci_down(struct bcma_bus *bus)
382 + if (bus->hosttype != BCMA_HOSTTYPE_PCI)
385 + if (!bus->host_is_pcie2)
386 + bcma_core_pci_down(&bus->drv_pci[0]);
388 +EXPORT_SYMBOL_GPL(bcma_host_pci_down);
390 +/* See also si_pci_setup */
391 +int bcma_host_pci_irq_ctl(struct bcma_bus *bus, struct bcma_device *core,
394 + struct pci_dev *pdev;
398 + if (bus->hosttype != BCMA_HOSTTYPE_PCI) {
399 + /* This bcma device is not on a PCI host-bus. So the IRQs are
400 + * not routed through the PCI core.
401 + * So we must not enable routing through the PCI core. */
405 + pdev = bus->host_pci;
407 + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
411 + coremask = BIT(core->core_index) << 8;
417 + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
422 +EXPORT_SYMBOL_GPL(bcma_host_pci_irq_ctl);
423 --- a/drivers/bcma/main.c
424 +++ b/drivers/bcma/main.c
425 @@ -363,7 +363,7 @@ static int bcma_register_devices(struct
429 -static void bcma_unregister_cores(struct bcma_bus *bus)
430 +void bcma_unregister_cores(struct bcma_bus *bus)
432 struct bcma_device *core, *tmp;
434 --- a/drivers/net/wireless/b43/main.c
435 +++ b/drivers/net/wireless/b43/main.c
436 @@ -4770,7 +4770,7 @@ static void b43_wireless_core_exit(struc
437 switch (dev->dev->bus_type) {
438 #ifdef CONFIG_B43_BCMA
440 - bcma_core_pci_down(dev->dev->bdev->bus);
441 + bcma_host_pci_down(dev->dev->bdev->bus);
444 #ifdef CONFIG_B43_SSB
445 @@ -4817,9 +4817,9 @@ static int b43_wireless_core_init(struct
446 switch (dev->dev->bus_type) {
447 #ifdef CONFIG_B43_BCMA
449 - bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci[0],
450 + bcma_host_pci_irq_ctl(dev->dev->bdev->bus,
451 dev->dev->bdev, true);
452 - bcma_core_pci_up(dev->dev->bdev->bus);
453 + bcma_host_pci_up(dev->dev->bdev->bus);
456 #ifdef CONFIG_B43_SSB
457 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
458 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
459 @@ -4669,7 +4669,7 @@ static int brcms_b_attach(struct brcms_c
460 brcms_c_coredisable(wlc_hw);
462 /* Match driver "down" state */
463 - bcma_core_pci_down(wlc_hw->d11core->bus);
464 + bcma_host_pci_down(wlc_hw->d11core->bus);
466 /* turn off pll and xtal to match driver "down" state */
467 brcms_b_xtal(wlc_hw, OFF);
468 @@ -4960,7 +4960,7 @@ static int brcms_b_up_prep(struct brcms_
469 * Configure pci/pcmcia here instead of in brcms_c_attach()
470 * to allow mfg hotswap: down, hotswap (chip power cycle), up.
472 - bcma_core_pci_irq_ctl(&wlc_hw->d11core->bus->drv_pci[0], wlc_hw->d11core,
473 + bcma_host_pci_irq_ctl(wlc_hw->d11core->bus, wlc_hw->d11core,
477 @@ -4970,12 +4970,12 @@ static int brcms_b_up_prep(struct brcms_
479 if (brcms_b_radio_read_hwdisabled(wlc_hw)) {
480 /* put SB PCI in down state again */
481 - bcma_core_pci_down(wlc_hw->d11core->bus);
482 + bcma_host_pci_down(wlc_hw->d11core->bus);
483 brcms_b_xtal(wlc_hw, OFF);
487 - bcma_core_pci_up(wlc_hw->d11core->bus);
488 + bcma_host_pci_up(wlc_hw->d11core->bus);
490 /* reset the d11 core */
491 brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
492 @@ -5172,7 +5172,7 @@ static int brcms_b_down_finish(struct br
494 /* turn off primary xtal and pll */
495 if (!wlc_hw->noreset) {
496 - bcma_core_pci_down(wlc_hw->d11core->bus);
497 + bcma_host_pci_down(wlc_hw->d11core->bus);
498 brcms_b_xtal(wlc_hw, OFF);
501 --- a/include/linux/bcma/bcma.h
502 +++ b/include/linux/bcma/bcma.h
503 @@ -434,6 +434,27 @@ static inline struct bcma_device *bcma_f
504 return bcma_find_core_unit(bus, coreid, 0);
507 +#ifdef CONFIG_BCMA_HOST_PCI
508 +extern void bcma_host_pci_up(struct bcma_bus *bus);
509 +extern void bcma_host_pci_down(struct bcma_bus *bus);
510 +extern int bcma_host_pci_irq_ctl(struct bcma_bus *bus,
511 + struct bcma_device *core, bool enable);
513 +static inline void bcma_host_pci_up(struct bcma_bus *bus)
516 +static inline void bcma_host_pci_down(struct bcma_bus *bus)
519 +static inline int bcma_host_pci_irq_ctl(struct bcma_bus *bus,
520 + struct bcma_device *core, bool enable)
522 + if (bus->hosttype == BCMA_HOSTTYPE_PCI)
528 extern bool bcma_core_is_enabled(struct bcma_device *core);
529 extern void bcma_core_disable(struct bcma_device *core, u32 flags);
530 extern int bcma_core_enable(struct bcma_device *core, u32 flags);
531 --- a/include/linux/bcma/bcma_driver_pci.h
532 +++ b/include/linux/bcma/bcma_driver_pci.h
533 @@ -238,13 +238,13 @@ struct bcma_drv_pci {
534 #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val)
535 #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val)
537 -extern void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
538 -extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
539 -extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
540 - struct bcma_device *core, bool enable);
541 -extern void bcma_core_pci_up(struct bcma_bus *bus);
542 -extern void bcma_core_pci_down(struct bcma_bus *bus);
543 +#ifdef CONFIG_BCMA_DRIVER_PCI
544 extern void bcma_core_pci_power_save(struct bcma_bus *bus, bool up);
546 +static inline void bcma_core_pci_power_save(struct bcma_bus *bus, bool up)
551 extern int bcma_core_pci_pcibios_map_irq(const struct pci_dev *dev);
552 extern int bcma_core_pci_plat_dev_init(struct pci_dev *dev);
553 --- a/include/linux/bcma/bcma_driver_pcie2.h
554 +++ b/include/linux/bcma/bcma_driver_pcie2.h
557 struct bcma_drv_pcie2 {
558 struct bcma_device *core;
563 #define pcie2_read16(pcie2, offset) bcma_read16((pcie2)->core, offset)
564 @@ -153,6 +155,4 @@ struct bcma_drv_pcie2 {
565 #define pcie2_set32(pcie2, offset, set) bcma_set32((pcie2)->core, offset, set)
566 #define pcie2_mask32(pcie2, offset, mask) bcma_mask32((pcie2)->core, offset, mask)
568 -void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
570 #endif /* LINUX_BCMA_DRIVER_PCIE2_H_ */
571 --- a/drivers/bcma/Kconfig
572 +++ b/drivers/bcma/Kconfig
573 @@ -26,6 +26,7 @@ config BCMA_HOST_PCI_POSSIBLE
575 bool "Support for BCMA on PCI-host bus"
576 depends on BCMA_HOST_PCI_POSSIBLE
577 + select BCMA_DRIVER_PCI
580 config BCMA_DRIVER_PCI_HOSTMODE
581 @@ -44,6 +45,22 @@ config BCMA_HOST_SOC
585 +config BCMA_DRIVER_PCI
586 + bool "BCMA Broadcom PCI core driver"
587 + depends on BCMA && PCI
590 + BCMA bus may have many versions of PCIe core. This driver
592 + 1) PCIe core working in clientmode
593 + 2) PCIe Gen 2 clientmode core
595 + In general PCIe (Gen 2) clientmode core is required on PCIe
596 + hosted buses. It's responsible for initialization and basic
597 + hardware management.
598 + This driver is also prerequisite for a hostmode PCIe core
601 config BCMA_DRIVER_MIPS
602 bool "BCMA Broadcom MIPS core driver"
603 depends on BCMA && MIPS
604 --- a/drivers/bcma/Makefile
605 +++ b/drivers/bcma/Makefile
606 @@ -3,8 +3,8 @@ bcma-y += driver_chipcommon.o driver
607 bcma-y += driver_chipcommon_b.o
608 bcma-$(CONFIG_BCMA_SFLASH) += driver_chipcommon_sflash.o
609 bcma-$(CONFIG_BCMA_NFLASH) += driver_chipcommon_nflash.o
610 -bcma-y += driver_pci.o
611 -bcma-y += driver_pcie2.o
612 +bcma-$(CONFIG_BCMA_DRIVER_PCI) += driver_pci.o
613 +bcma-$(CONFIG_BCMA_DRIVER_PCI) += driver_pcie2.o
614 bcma-$(CONFIG_BCMA_DRIVER_PCI_HOSTMODE) += driver_pci_host.o
615 bcma-$(CONFIG_BCMA_DRIVER_MIPS) += driver_mips.o
616 bcma-$(CONFIG_BCMA_DRIVER_GMAC_CMN) += driver_gmac_cmn.o
617 --- a/include/linux/bcma/bcma_driver_chipcommon.h
618 +++ b/include/linux/bcma/bcma_driver_chipcommon.h
619 @@ -663,14 +663,6 @@ struct bcma_drv_cc_b {
620 #define bcma_cc_maskset32(cc, offset, mask, set) \
621 bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set))
623 -extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
624 -extern void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
626 -extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);
627 -extern void bcma_chipco_resume(struct bcma_drv_cc *cc);
629 -void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
631 extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
633 extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc);
634 @@ -690,9 +682,6 @@ u32 bcma_chipco_gpio_pullup(struct bcma_
635 u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value);
638 -extern void bcma_pmu_init(struct bcma_drv_cc *cc);
639 -extern void bcma_pmu_early_init(struct bcma_drv_cc *cc);
641 extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset,
643 extern void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset,
644 --- a/include/linux/bcma/bcma_driver_gmac_cmn.h
645 +++ b/include/linux/bcma/bcma_driver_gmac_cmn.h
646 @@ -91,10 +91,4 @@ struct bcma_drv_gmac_cmn {
647 #define gmac_cmn_write16(gc, offset, val) bcma_write16((gc)->core, offset, val)
648 #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val)
650 -#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
651 -extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
653 -static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { }
656 #endif /* LINUX_BCMA_DRIVER_GMAC_CMN_H_ */
657 --- a/include/linux/bcma/bcma_driver_mips.h
658 +++ b/include/linux/bcma/bcma_driver_mips.h
659 @@ -39,21 +39,6 @@ struct bcma_drv_mips {
660 u8 early_setup_done:1;
663 -#ifdef CONFIG_BCMA_DRIVER_MIPS
664 -extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
665 -extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
667 -extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
669 -static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
670 -static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
672 -static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
678 extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
680 #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */