From: Frank Rowand <frowand.list@gmail.com>
To: frowand.list@gmail.com, Rob Herring <robh+dt@kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Russell King <linux@arm.linux.org.uk>,
Michal Marek <mmarek@suse.cz>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Leif Lindholm <leif.lindholm@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-kbuild@vger.kernel.org,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [patch 7/7] dt: dtb version: report dtb info
Date: Wed, 18 Mar 2015 20:41:27 -0700 [thread overview]
Message-ID: <550A4567.5030803@gmail.com> (raw)
In-Reply-To: <550A42AC.8060104@gmail.com>
From: Frank Rowand <frank.rowand@sonymobile.com>
Report the /chosen/dtb-info properties on boot.
Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
---
The beginning of the context for hunk 2 includes a line from
2fa645cb2703d9b3786d850db815414dfeefa51d, which is in 4.0-rc4. The
author of that commit has submitted a request to revert the commit:
http://lkml.iu.edu/hypermail/linux/kernel/1503.2/02134.html
drivers/of/base.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
Index: b/drivers/of/base.c
===================================================================
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1880,6 +1880,7 @@ static void of_alias_add(struct alias_pr
void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
{
struct property *pp;
+ struct device_node *dtb_info = NULL;
of_aliases = of_find_node_by_path("/aliases");
of_chosen = of_find_node_by_path("/chosen");
@@ -1899,6 +1900,47 @@ void of_alias_scan(void * (*dt_alloc)(u6
}
}
+ dtb_info = of_find_node_by_path("/chosen/dtb-info");
+ if (dtb_info == NULL)
+ dtb_info = of_find_node_by_path("/chosen@0/dtb-info");
+
+ if (dtb_info) {
+ const char *string;
+ int len;
+
+ string = of_get_property(dtb_info, "version", &len);
+ if (string) {
+ pr_notice("DTB version ");
+ for ( ; len > 0;
+ len -= (strlen(string) + 1),
+ string += (strlen(string) + 1)) {
+ pr_cont("%s", string);
+ }
+ pr_cont("\n");
+ }
+
+ string = of_get_property(dtb_info, "version-linux", &len);
+ if (string) {
+ pr_notice("DTB linux version ");
+ for ( ; len > 0;
+ len -= (strlen(string) + 1),
+ string += (strlen(string) + 1)) {
+ pr_cont("%s", string);
+ }
+ pr_cont("\n");
+ }
+
+ string = of_get_property(dtb_info, "dts-path", &len);
+ if (string)
+ pr_notice("DTB source %s\n", string);
+
+ string = of_get_property(dtb_info, "dtb-path", &len);
+ if (string)
+ pr_notice("DTB blob %s\n", string);
+
+ of_node_put(dtb_info);
+ }
+
if (!of_aliases)
return;
WARNING: multiple messages have this Message-ID (diff)
From: frowand.list@gmail.com (Frank Rowand)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 7/7] dt: dtb version: report dtb info
Date: Wed, 18 Mar 2015 20:41:27 -0700 [thread overview]
Message-ID: <550A4567.5030803@gmail.com> (raw)
In-Reply-To: <550A42AC.8060104@gmail.com>
From: Frank Rowand <frank.rowand@sonymobile.com>
Report the /chosen/dtb-info properties on boot.
Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
---
The beginning of the context for hunk 2 includes a line from
2fa645cb2703d9b3786d850db815414dfeefa51d, which is in 4.0-rc4. The
author of that commit has submitted a request to revert the commit:
http://lkml.iu.edu/hypermail/linux/kernel/1503.2/02134.html
drivers/of/base.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
Index: b/drivers/of/base.c
===================================================================
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1880,6 +1880,7 @@ static void of_alias_add(struct alias_pr
void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
{
struct property *pp;
+ struct device_node *dtb_info = NULL;
of_aliases = of_find_node_by_path("/aliases");
of_chosen = of_find_node_by_path("/chosen");
@@ -1899,6 +1900,47 @@ void of_alias_scan(void * (*dt_alloc)(u6
}
}
+ dtb_info = of_find_node_by_path("/chosen/dtb-info");
+ if (dtb_info == NULL)
+ dtb_info = of_find_node_by_path("/chosen at 0/dtb-info");
+
+ if (dtb_info) {
+ const char *string;
+ int len;
+
+ string = of_get_property(dtb_info, "version", &len);
+ if (string) {
+ pr_notice("DTB version ");
+ for ( ; len > 0;
+ len -= (strlen(string) + 1),
+ string += (strlen(string) + 1)) {
+ pr_cont("%s", string);
+ }
+ pr_cont("\n");
+ }
+
+ string = of_get_property(dtb_info, "version-linux", &len);
+ if (string) {
+ pr_notice("DTB linux version ");
+ for ( ; len > 0;
+ len -= (strlen(string) + 1),
+ string += (strlen(string) + 1)) {
+ pr_cont("%s", string);
+ }
+ pr_cont("\n");
+ }
+
+ string = of_get_property(dtb_info, "dts-path", &len);
+ if (string)
+ pr_notice("DTB source %s\n", string);
+
+ string = of_get_property(dtb_info, "dtb-path", &len);
+ if (string)
+ pr_notice("DTB blob %s\n", string);
+
+ of_node_put(dtb_info);
+ }
+
if (!of_aliases)
return;
next prev parent reply other threads:[~2015-03-19 3:41 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 3:29 [patch 0/7] dt: dtb version: add version info to dtb Frank Rowand
2015-03-19 3:29 ` Frank Rowand
2015-03-19 3:31 ` [patch 1/7] dt: dtb version: consolidate documentation of chosen node bindings Frank Rowand
2015-03-19 3:31 ` Frank Rowand
2015-03-19 13:40 ` Mark Rutland
2015-03-19 13:40 ` Mark Rutland
2015-03-19 3:33 ` [patch 2/7] dt: dtb version: document chosen/dtb-info node binding Frank Rowand
2015-03-19 3:33 ` Frank Rowand
2015-03-19 13:23 ` Rob Herring
2015-03-19 13:23 ` Rob Herring
2015-03-19 16:42 ` Frank Rowand
2015-03-19 16:42 ` Frank Rowand
2015-03-19 18:41 ` Russell King - ARM Linux
2015-03-19 18:41 ` Russell King - ARM Linux
2015-03-19 18:53 ` Mark Rutland
2015-03-19 18:53 ` Mark Rutland
2015-03-19 18:53 ` Mark Rutland
2015-03-19 19:01 ` Frank Rowand
2015-03-19 19:01 ` Frank Rowand
2015-03-19 19:32 ` Russell King - ARM Linux
2015-03-19 19:32 ` Russell King - ARM Linux
2015-03-19 19:32 ` Russell King - ARM Linux
2015-03-19 20:44 ` Frank Rowand
2015-03-19 20:44 ` Frank Rowand
2015-03-20 14:42 ` Mark Rutland
2015-03-20 14:42 ` Mark Rutland
2015-03-20 14:42 ` Mark Rutland
2015-03-19 13:49 ` Mark Rutland
2015-03-19 13:49 ` Mark Rutland
2015-03-19 17:02 ` Frank Rowand
2015-03-19 17:02 ` Frank Rowand
2015-03-19 17:23 ` Geert Uytterhoeven
2015-03-19 17:23 ` Geert Uytterhoeven
2015-03-19 19:12 ` Mark Rutland
2015-03-19 19:12 ` Mark Rutland
2015-03-19 21:27 ` Frank Rowand
2015-03-19 21:27 ` Frank Rowand
2015-03-20 15:25 ` Mark Rutland
2015-03-20 15:25 ` Mark Rutland
2015-03-19 17:37 ` Frank Rowand
2015-03-19 17:37 ` Frank Rowand
2015-03-19 17:37 ` Frank Rowand
2015-03-19 17:37 ` Frank Rowand
2015-03-19 3:34 ` [patch 3/7] dt: dtb version: arm dts Makefile Frank Rowand
2015-03-19 3:34 ` Frank Rowand
2015-03-19 3:34 ` Frank Rowand
2015-03-19 3:36 ` [patch 4/7] dt: dtb version: kernel Makefile Frank Rowand
2015-03-19 3:36 ` Frank Rowand
2015-03-19 3:38 ` [patch 5/7] dt: dtb version: kbuild scripts Frank Rowand
2015-03-19 3:38 ` Frank Rowand
2015-03-19 3:39 ` [patch 6/7] dt: dtb version: dtsi files Frank Rowand
2015-03-19 3:39 ` Frank Rowand
2015-03-19 18:46 ` Sascha Hauer
2015-03-19 18:46 ` Sascha Hauer
2015-03-19 3:41 ` Frank Rowand [this message]
2015-03-19 3:41 ` [patch 7/7] dt: dtb version: report dtb info Frank Rowand
2015-03-19 8:12 ` [patch 0/7] dt: dtb version: add version info to dtb Gregory CLEMENT
2015-03-19 8:12 ` Gregory CLEMENT
2015-03-19 17:05 ` Frank Rowand
2015-03-19 17:05 ` Frank Rowand
2015-03-20 13:46 ` Rob Herring
2015-03-20 13:46 ` Rob Herring
2015-03-20 19:14 ` Uwe Kleine-König
2015-03-20 19:14 ` Uwe Kleine-König
2015-03-20 19:14 ` Uwe Kleine-König
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=550A4567.5030803@gmail.com \
--to=frowand.list@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mmarek@suse.cz \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.