===================================================================
@@ -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;