From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] dtc: Add an option to generate __local_fixups__
Date: Mon, 24 Apr 2023 18:10:07 +0200 [thread overview]
Message-ID: <20230424161007.104212-1-u.kleine-koenig@pengutronix.de> (raw)
This happens implicitly for dts files with a /plugin/ tag.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
Documentation/manual.txt | 5 +++++
dtc.c | 8 +++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/manual.txt b/Documentation/manual.txt
index 15a7837d3cef..94dafb8ace6b 100644
--- a/Documentation/manual.txt
+++ b/Documentation/manual.txt
@@ -126,6 +126,11 @@ Options:
property for each label. The property's name is the label name and the
value is the path of the labeled node.
+ -L
+ Generates a __local_fixups__ node at the root node. For each property
+ that contains a phandle, the __local_fixups__ node contains a property
+ (at path __local_fixups__/$a if $a is the path of the node). It's value
+ is a list of offsets that are phandle values.
-A
Generate automatically aliases for all node labels. This is similar to
diff --git a/dtc.c b/dtc.c
index bc786c543b7e..d2e4e2b55b5c 100644
--- a/dtc.c
+++ b/dtc.c
@@ -47,7 +47,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix)
/* 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:@AThv";
+static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@LAThv";
static struct option const usage_long_opts[] = {
{"quiet", no_argument, NULL, 'q'},
{"in-format", a_argument, NULL, 'I'},
@@ -67,6 +67,7 @@ static struct option const usage_long_opts[] = {
{"warning", a_argument, NULL, 'W'},
{"error", a_argument, NULL, 'E'},
{"symbols", no_argument, NULL, '@'},
+ {"local-fixups", no_argument, NULL, 'L'},
{"auto-alias", no_argument, NULL, 'A'},
{"annotate", no_argument, NULL, 'T'},
{"help", no_argument, NULL, 'h'},
@@ -252,6 +253,11 @@ int main(int argc, char *argv[])
case '@':
generate_symbols = 1;
break;
+
+ case 'L':
+ generate_fixups = 1;
+ break;
+
case 'A':
auto_label_aliases = 1;
break;
base-commit: 2cdf93a6d402a161edf16de6011bd5ad76382e92
prerequisite-patch-id: a819463d7047680b5865233f136e35ac3e3d4ee9
--
2.39.2
next reply other threads:[~2023-04-24 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 16:10 Uwe Kleine-König [this message]
[not found] ` <20230424161007.104212-1-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2023-04-25 10:21 ` [PATCH] dtc: Add an option to generate __local_fixups__ Uwe Kleine-König
[not found] ` <20230425102120.5yprd2vv5vmvtmos-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2023-04-28 7:03 ` David Gibson
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=20230424161007.104212-1-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).