From patchwork Thu Mar 19 03:41:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 6045581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 810F7BF90F for ; Thu, 19 Mar 2015 03:43:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACFD1204D9 for ; Thu, 19 Mar 2015 03:43:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7B70204D3 for ; Thu, 19 Mar 2015 03:43:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YYRLN-0000uA-WE; Thu, 19 Mar 2015 03:42:02 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YYRLD-0000fJ-V9 for linux-arm-kernel@lists.infradead.org; Thu, 19 Mar 2015 03:41:52 +0000 Received: by padcy3 with SMTP id cy3so62223931pad.3 for ; Wed, 18 Mar 2015 20:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=UOnBg0r1YV8rtYETIHKBEiz8TDy9mDhLLwQnxvD6xwc=; b=p5E/hqozd+/qHcPRELsKLPsL+HFw7qLtWC7OlqIa+VUWygt9dvwVt5lHqjozMZ8IZm NpPPfd/wi7hrlzQXWc3bfPCWJ+QQluFLoVMJI2pePZIYVoVTC2MM0VxNrsKwCfDmyKEG 6xEeWXVHTcmH0fbgmUWPf59vo/PKb1+6rikvghY0nxdMN/EAYtId+n8Kl0inScPRlH6I dxr+NE5TJVpDWeVO4MUcBt+2tHgEwplv+aTchXG+/Mt6zzZNBv2s0rGQz898zmt5pkjd jKnJJQvd/yaJ5d+fc4njQQ8TY/dGxGkzCpTZV6eVRK6N4HBQu3IW+aIwoodn+agwqlX4 q7Ng== X-Received: by 10.70.40.167 with SMTP id y7mr78493618pdk.164.1426736490725; Wed, 18 Mar 2015 20:41:30 -0700 (PDT) Received: from [172.26.79.213] ([64.211.224.253]) by mx.google.com with ESMTPSA id d13sm70843pdj.92.2015.03.18.20.41.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 20:41:29 -0700 (PDT) Message-ID: <550A4567.5030803@gmail.com> Date: Wed, 18 Mar 2015 20:41:27 -0700 From: Frank Rowand User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: frowand.list@gmail.com, Rob Herring , Grant Likely , Russell King , Michal Marek Subject: [patch 7/7] dt: dtb version: report dtb info References: <550A42AC.8060104@gmail.com> In-Reply-To: <550A42AC.8060104@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150318_204152_057658_9D0C130F X-CRM114-Status: GOOD ( 13.70 ) X-Spam-Score: -0.8 (/) Cc: Mark Rutland , "devicetree@vger.kernel.org" , Pawel Moll , Ian Campbell , linux-kbuild@vger.kernel.org, Linux Kernel list , Leif Lindholm , Kumar Gala , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frowand.list@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Frank Rowand Report the /chosen/dtb-info properties on boot. Signed-off-by: Frank Rowand --- 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;