summaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-06-28 11:17:13 -0400
committerKalle Valo <kvalo@codeaurora.org>2015-07-21 10:06:06 -0400
commitcae761b5a6bdc597ba476a040fdcd5b4bc559b85 (patch)
treed6883f03da75274723beeb2530a21ee097bd9382 /drivers/bcma
parentae86c587b5b53da4f7859f236f6c22ff9941cff9 (diff)
bcma: populate bus DT subnodes as platform_device-s
Our bus should allow defining children nodes as we may want to specify devices attached to the bus. This is required e.g. to specify NAND or ChipCommon cores and use bus's address and IRQ mappings. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 9635f1033ce5..59128478a90f 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -12,6 +12,7 @@
12#include <linux/slab.h> 12#include <linux/slab.h>
13#include <linux/of_address.h> 13#include <linux/of_address.h>
14#include <linux/of_irq.h> 14#include <linux/of_irq.h>
15#include <linux/of_platform.h>
15 16
16MODULE_DESCRIPTION("Broadcom's specific AMBA driver"); 17MODULE_DESCRIPTION("Broadcom's specific AMBA driver");
17MODULE_LICENSE("GPL"); 18MODULE_LICENSE("GPL");
@@ -409,6 +410,13 @@ int bcma_bus_register(struct bcma_bus *bus)
409 bcma_core_pci_early_init(&bus->drv_pci[0]); 410 bcma_core_pci_early_init(&bus->drv_pci[0]);
410 } 411 }
411 412
413 if (bus->host_pdev) {
414 struct device *dev = &bus->host_pdev->dev;
415
416 of_platform_populate(dev->of_node, of_default_bus_match_table,
417 NULL, dev);
418 }
419
412 /* Cores providing flash access go before SPROM init */ 420 /* Cores providing flash access go before SPROM init */
413 list_for_each_entry(core, &bus->cores, list) { 421 list_for_each_entry(core, &bus->cores, list) {
414 if (bcma_is_core_needed_early(core->id.id)) 422 if (bcma_is_core_needed_early(core->id.id))