From: Michael Tretter <m.tretter@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Thomas Haemmerle <thomas.haemmerle@wolfvision.net>,
Michael Tretter <m.tretter@pengutronix.de>
Subject: [PATCH 1/6] of: populate "/firmware" while populating device tree
Date: Tue, 12 Mar 2019 11:20:50 +0100 [thread overview]
Message-ID: <20190312102055.12386-2-m.tretter@pengutronix.de> (raw)
In-Reply-To: <20190312102055.12386-1-m.tretter@pengutronix.de>
From: Thomas Haemmerle <thomas.haemmerle@wolfvision.net>
The sub-nodes of "/firmware" are not populated, since it has no
"compatible" property. Copy the behavior of Linux and call
of_platform_populate() on the "/firmware" node to probe firmware
drivers.
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
drivers/of/base.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index b082f0c656..85c7953370 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1979,7 +1979,7 @@ const struct of_device_id of_default_bus_match_table[] = {
int of_probe(void)
{
- struct device_node *memory;
+ struct device_node *memory, *firmware;
if(!root_node)
return -ENODEV;
@@ -1996,6 +1996,10 @@ int of_probe(void)
if (memory)
of_add_memory(memory, false);
+ firmware = of_find_node_by_path("/firmware");
+ if (firmware)
+ of_platform_populate(firmware, NULL, NULL);
+
of_clk_init(root_node, NULL);
of_platform_populate(root_node, of_default_bus_match_table, NULL);
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-03-12 10:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 10:20 [PATCH 0/6] ZynqMP clock driver Michael Tretter
2019-03-12 10:20 ` Michael Tretter [this message]
2019-03-12 10:20 ` [PATCH 2/6] ARM: zynqmp: populate zynqmp_firmware dt node Michael Tretter
2019-03-12 10:20 ` [PATCH 3/6] ARM: zynqmp: move PAYLOAD_ARG_CNT to firmware header Michael Tretter
2019-03-12 10:20 ` [PATCH 4/6] clk: add ZynqMP clock driver Michael Tretter
2019-03-12 10:20 ` [PATCH 5/6] ARM: zynqmp: add firmware DT node Michael Tretter
2019-03-12 10:20 ` [PATCH 6/6] ARM: zynqmp: switch to firmware clock driver Michael Tretter
2019-03-18 7:50 ` [PATCH 0/6] ZynqMP " Sascha Hauer
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=20190312102055.12386-2-m.tretter@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=thomas.haemmerle@wolfvision.net \
/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