diff options
author | David S. Miller <davem@davemloft.net> | 2015-08-20 14:13:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-20 14:13:25 -0700 |
commit | ef09242f3997f5fa063bcfa918d3ce4c4485376c (patch) | |
tree | dbbf663ff83168d066de7a447926ef8974a51fee /drivers/bcma/main.c | |
parent | ipv4: Make fib_encap_match static (diff) | |
parent | Merge tag 'iwlwifi-next-for-kalle-2015-08-18' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next (diff) | |
download | linux-dev-ef09242f3997f5fa063bcfa918d3ce4c4485376c.tar.xz linux-dev-ef09242f3997f5fa063bcfa918d3ce4c4485376c.zip |
Merge tag 'wireless-drivers-next-for-davem-2015-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says:
====================
Major changes:
ath10k:
* add support for qca99x0 family of devices
* improve performance of tx_lock
* add support for raw mode (802.11 frame format) and software crypto
engine enabled via a module parameter
ath9k:
* add fast-xmit support
wil6210:
* implement TSO support
* support bootloader v1 and onwards
iwlwifi:
* Deprecate -10.ucode
* Clean ups towards multiple Rx queues
* Add support for longer CMD IDs. This will be required by new
firmwares since we are getting close to the u8 limit.
* bugfixes for the D0i3 power state
* Add basic support for FTM
* polish the Miracast operation
* fix a few power consumption issues
* scan cleanup
* fixes for D0i3 system state
* add paging for devices that support it
* add again the new RBD allocation model
* add more options to the firmware debug system
* add support for frag SKBs in Tx
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r-- | drivers/bcma/main.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 8d973c4fc84e..24882c18fcbe 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -7,7 +7,9 @@ #include "bcma_private.h" #include <linux/module.h> +#include <linux/mmc/sdio_func.h> #include <linux/platform_device.h> +#include <linux/pci.h> #include <linux/bcma/bcma.h> #include <linux/slab.h> #include <linux/of_address.h> @@ -269,6 +271,28 @@ void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core) } } +struct device *bcma_bus_get_host_dev(struct bcma_bus *bus) +{ + switch (bus->hosttype) { + case BCMA_HOSTTYPE_PCI: + if (bus->host_pci) + return &bus->host_pci->dev; + else + return NULL; + case BCMA_HOSTTYPE_SOC: + if (bus->host_pdev) + return &bus->host_pdev->dev; + else + return NULL; + case BCMA_HOSTTYPE_SDIO: + if (bus->host_sdio) + return &bus->host_sdio->dev; + else + return NULL; + } + return NULL; +} + void bcma_init_bus(struct bcma_bus *bus) { mutex_lock(&bcma_buses_mutex); @@ -388,6 +412,7 @@ int bcma_bus_register(struct bcma_bus *bus) { int err; struct bcma_device *core; + struct device *dev; /* Scan for devices (cores) */ err = bcma_bus_scan(bus); @@ -410,13 +435,12 @@ int bcma_bus_register(struct bcma_bus *bus) bcma_core_pci_early_init(&bus->drv_pci[0]); } + dev = bcma_bus_get_host_dev(bus); /* TODO: remove check for IS_BUILTIN(CONFIG_BCMA) check when * of_default_bus_match_table is exported or in some other way * accessible. This is just a temporary workaround. */ - if (IS_BUILTIN(CONFIG_BCMA) && bus->host_pdev) { - struct device *dev = &bus->host_pdev->dev; - + if (IS_BUILTIN(CONFIG_BCMA) && dev) { of_platform_populate(dev->of_node, of_default_bus_match_table, NULL, dev); } |