Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033070AbbKFJAX (ORCPT ); Fri, 6 Nov 2015 04:00:23 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:54202 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032020AbbKFJAV (ORCPT ); Fri, 6 Nov 2015 04:00:21 -0500 From: Arnd Bergmann To: Vineet Gupta Cc: Alexey Brodkin , "linux-snps-arc@lists.infradead.org" , "jogo@openwrt.org" , lkml , Rob Herring Subject: Re: "compatible" and "model" properties in .dts for ARC boards Date: Fri, 06 Nov 2015 09:59:46 +0100 Message-ID: <82634871.ymdF4uL7TN@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1446749422.3151.29.camel@synopsys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:T3gAZ86j6f6LxqJbmIh8xljMvecqDXq80thytsS5TmjyjeZ9+W/ m7cvD4yVo+bP22y4Jwf0YaO6JQpTlLrGZ5F06k5zDSOStKRES++GAMGihL/f2qptStcZnCD OECD9MXAz/miDTSZGhIqfaPp40I7l54KN6zY5xUa62MyEThIgA1mkC5FWEdHu+noxHSoNv4 FObyKqDuFogG9TIM3BkbA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZwRf0qC8eTI=:LjjrwrjaGcZVZ+OpqXGXh6 hXqyFcFAYg9akVrp26CQ8/ctkJyl6Ww8n+ArmLnm5GIC076nRhIk5EQcee0kJg0oYAZo0nlsY K/dOyJONLKR71i87ZKObJ8HiAEmyVNqVL86gG+6/01GiDt2vyBgupDyjTNOVVw+VlXVMrPkll Yy6ZlNApPwqWRsXNAnBRK6+xO35ug8eI6hPY7KOnaux7dtpbydQp5CmG4WhazT4OLGIaC6m95 7i+8EYkGMsMJiRqDVc2VSSNAWxz3DvjRTTP7I4qoCxHx6xsSO3drjsbUDSEJVVqewCJ6bjhQa oREWWX1YM9qoI16AGxERw+K+/g+lfAJlUrdhLtplzMSjKybOwOF18YSCoZ62wHAU5QMruUOIs syoYE72rh5ZgQBgNHBETREbaPPJaOYByIVyGjLy8PHQeRpcE+3DOO5XMzKD+1JVRkqPoJvLEM UZ0udte33i3uBtfNaeKVp5YyM7wAyKAneu461AWg4oW+kwfHC60BPY9vb1/FeZ2lIAtq4EQzS S/XAsAnwGNJhVqPpv7VDWnmTqkyKHF9+70RIZEn8zgcQYZ0syPPyEDNwiDGxFjqUtepebHA8r KTt0GJ5pmSBR9wUd2HrMS+PhEglD0sxIHVkpFQhObpiNM31ZzBLawMQpM18QjQElu4QDg/l51 HK+r+nDRjOmL7oqpeE0eJNHg1uleRn1retecmu36hDqJC2x0kponAbFk01p8dTffve26gEW0t G3az7pCMs1YDAlnC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2325 Lines: 54 On Friday 06 November 2015 04:45:24 Vineet Gupta wrote: > > > > During OpenWRT upsreaming process one interesting topic was raised. > > See in the middle of https://lists.openwrt.org/pipermail/openwrt-devel/2015-November/036959.html > > > > In Device Tree descriptions for our boards we don't use "model" property > > even though it is a required one as specified by ePAPR, see > > http://free-electrons.com/~thomas/pub/Power_ePAPR_APPROVED_v1.0.pdf, > > page 39 "Table 3-1 Root node properties". > > > > Instead we put 2 items in "compatible" property. > > > > For example: > > ------------------->8---------------- > > compatible = "snps,axs101", "snps,arc-sdp"; > > ------------------->8---------------- > > > > And from ePAPR standpoint it makes sense to split contents of that "compatible" > > property in 2: > > ------------------->8---------------- > > compatible = "snps,arc-sdp"; > > model = "snps,axs101"; > > ------------------->8---------------- > > It seems model is just a descriptive label and we can surely add them to existing DT. > compatible on the other hand is more fundamental used for exact comparisons etc > and follows the vendor,device convention. > It is pretty common for compatible to have multiple strings for exactly the same > reason as I have them here. Both axs101 and axs103 are based on sdp thus we want > the ability to have both pieces of information and use as needed. Correct. The model should also be a human readable name of the machine, just one string like "Synapsys AXS101 Development Board" (or whatever that is called). > > But I do see problems with implementation of that thing. > > Today we have a luxury of selection of AXS init functionality > > based on that compatible value and if "snps,axs101" goes in > > "model" then we'll need to add some more code in > > arch/arc/plat-axs10x/axs10x.c that reads "model" value with > > of_get_property() and then compare to "axs10{1|3}". > > > > Any thoughts? That should use the of_machine_is_compatible() helper. The model string is for printing in dmesg or /proc/cpuinfo. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/