From: zajec5@gmail.com (Rafał Miłecki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] bcma: populate bus DT subnodes as platform_device-s
Date: Sun, 28 Jun 2015 17:17:13 +0200 [thread overview]
Message-ID: <1435504633-20831-1-git-send-email-zajec5@gmail.com> (raw)
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>
---
drivers/bcma/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 9635f10..5912847 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -12,6 +12,7 @@
#include <linux/slab.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <linux/of_platform.h>
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))
--
1.8.4.5
next reply other threads:[~2015-06-28 15:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-28 15:17 Rafał Miłecki [this message]
2015-06-30 21:45 ` [PATCH] bcma: populate bus DT subnodes as platform_device-s Hauke Mehrtens
2015-07-01 4:45 ` Rafał Miłecki
2015-07-21 14:07 ` Kalle Valo
2015-07-23 0:30 ` Rafał Miłecki
2015-07-23 6:06 ` Kalle Valo
2015-07-24 16:11 ` Joachim Eastwood
2015-07-25 18:55 ` Hauke Mehrtens
2015-07-25 21:00 ` Joachim Eastwood
2015-08-02 18:03 ` Hauke Mehrtens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435504633-20831-1-git-send-email-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).