mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/7] of: add support for devicetree overlays
Date: Fri, 6 Sep 2019 09:29:46 +0200	[thread overview]
Message-ID: <20190906072946.bg6vlfl4fjppijaa@pengutronix.de> (raw)
In-Reply-To: <20190905105142.13681-3-m.tretter@pengutronix.de>

On Thu, Sep 05, 2019 at 12:51:37PM +0200, Michael Tretter wrote:
> The devicetree overlay support is based on the Linux driver for device
> tree overlays, but many features that are not required in Barebox are
> left out.
> 
> Unlike Linux, which applies the overlay to the live devicetree, Barebox
> registers a fixup for the overlay which is applied with other fixups to
> whatever tree is fixed. This is necessary to apply the overlay to
> devicetrees that are passed to Linux, which might differ from the
> devicetree that is currently live in Barebox.

Even though we usually apply the overlay as a fixup I would expect some
(exported) function to apply this overlay to that devicetree *now*.

> +	ret = of_property_read_string(fragment, "target-path", &path);
> +	if (!ret) {
> +		node = of_find_node_by_path_from(root, path);
> +		if (!node)
> +			pr_err("fragment %pOF: path '%s' not found\n",
> +			       fragment, path);
> +		return node;
> +	}
> +
> +	pr_err("fragment %pOF: no target property\n", fragment);

You use pr_* functions, so please also add a pr_fmt to give the messages
some more context.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2019-09-06  7:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 10:51 [PATCH 0/7] Device Tree Overlay Support Michael Tretter
2019-09-05 10:51 ` [PATCH 1/7] dtc: add -@ option to enable __symbols__ Michael Tretter
2019-09-05 10:51 ` [PATCH 2/7] of: add support for devicetree overlays Michael Tretter
2019-09-05 15:24   ` Ahmad Fatoum
2019-09-06  7:15     ` Michael Tretter
2019-09-06  7:29   ` Sascha Hauer [this message]
2019-09-05 10:51 ` [PATCH 3/7] blspec: " Michael Tretter
2019-09-06  7:33   ` Sascha Hauer
2019-09-05 10:51 ` [PATCH 4/7] of: add iterator for overlays Michael Tretter
2019-09-05 10:51 ` [PATCH 5/7] firmware: add support to load firmware from dt overlay Michael Tretter
2019-09-05 10:51 ` [PATCH 6/7] blspec: load firmware if specified in " Michael Tretter
2019-09-05 10:51 ` [PATCH 7/7] commands: add of_overlay command for device tree overlays Michael Tretter

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=20190906072946.bg6vlfl4fjppijaa@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.tretter@pengutronix.de \
    /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