Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938813AbcJTNX7 (ORCPT ); Thu, 20 Oct 2016 09:23:59 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:51139 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934025AbcJTNX5 (ORCPT ); Thu, 20 Oct 2016 09:23:57 -0400 From: Arnd Bergmann To: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org, Nicolas Ferre , linux-kernel@vger.kernel.org, =?utf-8?B?U3plbXrFkSBBbmRyw6Fz?= Subject: Re: [PATCH v2 3/6] ARM: at91: Add armv7m support Date: Thu, 20 Oct 2016 15:23:19 +0200 Message-ID: <19094397.gRAFyF5emk@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161020102621.od7kkgpndooy25kz@piout.net> References: <20161020094135.18221-1-alexandre.belloni@free-electrons.com> <5506721.HBUId2vnJb@wuerfel> <20161020102621.od7kkgpndooy25kz@piout.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:uvkoURrDf832xSz4Y/5IksQxUlB9UYZa6mKncsG0wQO0rTdDtxG VEgqIXKVXKWsb76veddC4Jw794evZAbBHxelq6TNmZgZGPk4sbj5z8b1FYL8o83WRSyEaVZ o8BPejJodDDKA5bZ7wNx0BKN5Tlki9lSKuaD2W+CSAneBlJtIVrYCTjGMv4gMWJIT2Gz2mU Y3cW2ysi9mXdyM+pxwpSA== X-UI-Out-Filterresults: notjunk:1;V01:K0:BAE/i0hDZjI=:U73rTMoDAvvGKX0wbx+C4u /x0HWca7mZsyIiRG+B0BfS4Tnsaj34GWJge8B6TWZg6JG4Fl1ERF9OHQec2eCumhPt5KFRKeD XpqNuzMMTQMOUaOkTMQur044MGpZQknmGsBWo1tXb1jioCqGOQ4uP3W/kykyNIZKqJ1E7aWFu z2tbVqsXTIujhF4T6FJXgj2JHP+XYh8/8H3kQ3v8IItB1sDQZurbk++L/vu4RczgDVMhrecPO 7TKSLBSi1s7z3jmm0EifkkjVx3vtTanKkCaQBPbKJKlC96pcV4ETZzVXo/de09HXJSrPPFsfH vCO87uAigWXjuNeiRCm6YyCsDTbljNafg/Nx+xmlH43JKQDugO2DPIbxvpKsvZmhwiLQijFgS ZQDci4azsCiBNOKCfbtY3xCE4Nis0vdBOcJS0b+JfWs1JRe1ugDs4pwUUw/oBvdflcY9+FJgJ wSN+LdshiDuqId1BON+P8PzLJZQ3UcYwoQat0xhAuN6YhaTtSCcVCyi5ZUt6HkpDQu2Z6yVBy /qsJDTggQAY76VJ8EstTNCBx1YOJ1c2YyDb8QY6dTWMVLxjTM3ZymZD8bJjSiIgSCpl6k/xhe 2VwH0ZQgtrFO3ZSgmnHGW06ltdRPI0L+UyNtKcFqQJeNbtUwS4iByQzRpneXIsod9Fl7jbe/Y OmNmXBHETrngnToJjc4rhYFajJ0lXMTf2e799xgP1a3NIQTC14cgNddhUmjxnfzhZ+aL0VNe6 OovA8RoDfYFE9bpZ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1673 Lines: 42 On Thursday, October 20, 2016 12:26:21 PM CEST Alexandre Belloni wrote: > > On 20/10/2016 at 11:52:20 +0200, Arnd Bergmann wrote : > > On Thursday, October 20, 2016 11:41:32 AM CEST Alexandre Belloni wrote: > > > + > > > +static void __init samx7_dt_device_init(void) > > > +{ > > > + struct soc_device *soc; > > > + struct device *soc_dev = NULL; > > > + > > > + soc = at91_soc_init(samx7_socs); > > > + if (soc) > > > + soc_dev = soc_device_to_device(soc); > > > + > > > + of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev); > > > +} > > > > This was initially the idea for the soc_device, but we've stopped > > using it as the parent for the on-chip devices a while ago. > > > > Just register the device for identification here, and use > > of_platform_default_populate with a NULL parent as most others do. > > > > We should also investigate whether we can convert the three other > > at91 variants to do the same without breaking expectations in user space. > > > > My opinion is that we could just remove the whole at91_soc_init stuff > but I think Nicolas still wants the two info lines to be printed for > debugging/support purposes. I'm not sure how much this is used anyway > and I don't find the sysfs attributes to be particularly useful. > > Also, removing soc.c is a 10% reduction of the code in mach-at91 > Having the soc_device driver is very valuable in order to have an interface to be used from user space (and soon from the kernel) to look up the exact SoC type in a generic way, so I'd definitely want to keep that, though we may want to move that driver to drivers/soc/. Arnd