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: 6045541 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D71079F2A9 for ; Thu, 19 Mar 2015 03:41:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11397204D1 for ; Thu, 19 Mar 2015 03:41:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2782A204D3 for ; Thu, 19 Mar 2015 03:41:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750804AbbCSDlc (ORCPT ); Wed, 18 Mar 2015 23:41:32 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:33907 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbbCSDlb (ORCPT ); Wed, 18 Mar 2015 23:41:31 -0400 Received: by pdbni2 with SMTP id ni2so62873003pdb.1; 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 Reply-To: frowand.list@gmail.com 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 CC: Ian Campbell , Kumar Gala , Leif Lindholm , Mark Rutland , Pawel Moll , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-kbuild@vger.kernel.org, Linux Kernel list Subject: [patch 7/7] dt: dtb version: report dtb info References: <550A42AC.8060104@gmail.com> In-Reply-To: <550A42AC.8060104@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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(+) -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;