From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] fixup! sandbox: hostfile: completely switch to OF based probing
Date: Thu, 5 Mar 2015 15:36:40 +0100 [thread overview]
Message-ID: <1425566201-31989-3-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1425566201-31989-1-git-send-email-mkl@pengutronix.de>
hostfile: add "barebox" prefix to properties
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
arch/sandbox/board/hostfile.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c
index 41ded73a3a21..c1a2643bc7ff 100644
--- a/arch/sandbox/board/hostfile.c
+++ b/arch/sandbox/board/hostfile.c
@@ -85,11 +85,12 @@ static int hf_probe(struct device_d *dev)
if (!dev->device_node)
return -ENODEV;
- err = of_property_read_u32(dev->device_node, "fd", &priv->fd);
+ err = of_property_read_u32(dev->device_node, "barebox,fd", &priv->fd);
if (err)
return err;
- err = of_property_read_string(dev->device_node, "filename", &priv->filename);
+ err = of_property_read_string(dev->device_node, "barebox,filename",
+ &priv->filename);
if (err)
return err;
@@ -132,7 +133,8 @@ static int of_hostfile_fixup(struct device_node *root, void *ctx)
node = of_new_node(root, hf->devname);
- ret = of_property_write_u32(node, "fd", hf->fd);
+ ret = of_set_property(node, "compatible", hostfile_dt_ids->compatible,
+ strlen(hostfile_dt_ids->compatible) + 1, 1);
if (ret)
return ret;
@@ -140,12 +142,11 @@ static int of_hostfile_fixup(struct device_node *root, void *ctx)
if (ret)
return ret;
- ret = of_set_property(node, "compatible", hostfile_dt_ids->compatible,
- strlen(hostfile_dt_ids->compatible) + 1, 1);
+ ret = of_property_write_u32(node, "barebox,fd", hf->fd);
if (ret)
return ret;
- ret = of_set_property(node, "filename", hf->filename,
+ ret = of_set_property(node, "barebox,filename", hf->filename,
strlen(hf->filename) + 1, 1);
return ret;
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-03-05 14:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 14:36 [PATCH 0/3] sandbox cleanups Marc Kleine-Budde
2015-03-05 14:36 ` [PATCH 1/3] fixup! sandbox: hostfile: completely switch to OF based probing Marc Kleine-Budde
2015-03-05 14:36 ` Marc Kleine-Budde [this message]
2015-03-05 14:36 ` [PATCH 3/3] fixup! sandbox: add support to pass dtb to barebox Marc Kleine-Budde
2015-03-06 6:42 ` [PATCH 0/3] sandbox cleanups Sascha Hauer
2015-03-10 14:24 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-10 14:26 ` Marc Kleine-Budde
2015-03-10 14:52 ` Marc Kleine-Budde
2015-03-10 16:35 ` Marc Kleine-Budde
2015-03-10 14:32 ` Marc Kleine-Budde
2015-03-10 14:59 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-10 15:01 ` Marc Kleine-Budde
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=1425566201-31989-3-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@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