devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Frank Rowand <frowand.list@gmail.com>
Cc: "Clément Léger" <clement.leger@bootlin.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Lizhi Hou" <lizhi.hou@xilinx.com>,
	"Allan Nielsen" <allan.nielsen@microchip.com>,
	"Horatiu Vultur" <horatiu.vultur@microchip.com>,
	"Steen Hegelund" <steen.hegelund@microchip.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v3 1/2] of: create of_root if no dtb provided
Date: Mon, 27 Feb 2023 11:17:41 -0600	[thread overview]
Message-ID: <CAL_JsqLR9sm+GRU8EP4eO_Ln2UhD=ztdAU834CzP8RSv2s2jQg@mail.gmail.com> (raw)
In-Reply-To: <20230223213418.891942-2-frowand.list@gmail.com>

On Thu, Feb 23, 2023 at 3:34 PM Frank Rowand <frowand.list@gmail.com> wrote:
>
> When enabling CONFIG_OF on a platform where of_root is not populated by
> firmware, we end up without a root node. In order to apply overlays and
> create subnodes of the root node, we need one. Create this root node
> by unflattening an empty builtin dtb.
>
> If firmware provides a flattened device tree (FDT) then the FDT is
> unflattened via setup_arch().  Otherwise, setup_of() which is called
> immediately after setup_arch(), and will create the default root node
> if it does not exist.

Why do we need a hook after setup_arch() rather than an initcall?

Rob

  reply	other threads:[~2023-02-27 17:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 21:34 [PATCH v3 0/2] of: populate of_root_node if not set (alternate) Frank Rowand
2023-02-23 21:34 ` [PATCH v3 1/2] of: create of_root if no dtb provided Frank Rowand
2023-02-27 17:17   ` Rob Herring [this message]
2023-03-01  2:05     ` Frank Rowand
2023-03-01  3:00       ` Rob Herring
2023-03-01 16:49         ` Frank Rowand
2023-02-23 21:34 ` [PATCH v3 2/2] of: unittest: treat missing of_root as error instead of fixing up Frank Rowand
2023-02-23 21:39 ` [PATCH v3 0/2] of: populate of_root_node if not set (alternate) Frank Rowand
2023-02-27  9:31   ` Clément Léger

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='CAL_JsqLR9sm+GRU8EP4eO_Ln2UhD=ztdAU834CzP8RSv2s2jQg@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=allan.nielsen@microchip.com \
    --cc=clement.leger@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@xilinx.com \
    --cc=steen.hegelund@microchip.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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).