[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260112142009.1006236-48-herve.codina@bootlin.com>
Date: Mon, 12 Jan 2026 15:19:37 +0100
From: Herve Codina <herve.codina@...tlin.com>
To: David Gibson <david@...son.dropbear.id.au>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Ayush Singh <ayush@...gleboard.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
devicetree-compiler@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
devicetree-spec@...r.kernel.org,
Hui Pu <hui.pu@...ealthcare.com>,
Ian Ray <ian.ray@...ealthcare.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Herve Codina <herve.codina@...tlin.com>
Subject: [RFC PATCH 47/77] dtc: Introduce dti_fill_fullpaths()
The future introduction of orphan nodes for addons device-tree will lead
to more than one tree in the addons data. Those trees will be:
- the classical root tree starting at the root node
- trees related to orphan nodes
Also, an addon device-tree can have only trees based on orphan nodes. In
other words an addon device-tree is valid without having the classical
'root' tree.
To prepare this change, introduce and use dti_fill_fullpaths().
dti_fill_fullpaths() builds fullpaths of nodes available in a
tree like fill_fullpaths() but it works at the struct dt_info level.
It handles the case where a 'root' device-tree is not present and will
handle orphan nodes trees as soon as they will be introduced.
This introduction doesn't lead to any functional changes.
Signed-off-by: Herve Codina <herve.codina@...tlin.com>
---
dtc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dtc.c b/dtc.c
index e0a0b54..59f4d77 100644
--- a/dtc.c
+++ b/dtc.c
@@ -45,6 +45,13 @@ static void fill_fullpaths(struct node *tree, const char *prefix)
fill_fullpaths(child, tree->fullpath);
}
+static void dti_fill_fullpaths(struct dt_info *dti)
+{
+ /* Fill fullpaths for the root node */
+ if (dti->dt)
+ fill_fullpaths(dti->dt, "");
+}
+
/* Usage related data. */
static const char usage_synopsis[] = "dtc [options] <input file>";
static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@LAThv";
@@ -326,7 +333,7 @@ int main(int argc, char *argv[])
if (cmdline_boot_cpuid != -1)
dti->boot_cpuid_phys = cmdline_boot_cpuid;
- fill_fullpaths(dti->dt, "");
+ dti_fill_fullpaths(dti);
/* on a plugin, generate by default */
if (dti->dtsflags & DTSF_PLUGIN) {
--
2.52.0
Powered by blists - more mailing lists