From: Rafał Miłecki Date: Sun, 28 Jun 2015 15:17:13 +0000 (+0200) Subject: bcma: populate bus DT subnodes as platform_device-s X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cae761b5a6bdc597ba476a040fdcd5b4bc559b85;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Kalle Valo --- 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 @@ #include #include #include +#include MODULE_DESCRIPTION("Broadcom's specific AMBA driver"); MODULE_LICENSE("GPL"); @@ -409,6 +410,13 @@ int bcma_bus_register(struct bcma_bus *bus) bcma_core_pci_early_init(&bus->drv_pci[0]); } + if (bus->host_pdev) { + struct device *dev = &bus->host_pdev->dev; + + of_platform_populate(dev->of_node, of_default_bus_match_table, + NULL, dev); + } + /* Cores providing flash access go before SPROM init */ list_for_each_entry(core, &bus->cores, list) { if (bcma_is_core_needed_early(core->id.id))