From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932613AbdJPWoi (ORCPT ); Mon, 16 Oct 2017 18:44:38 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:44853 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932321AbdJPWog (ORCPT ); Mon, 16 Oct 2017 18:44:36 -0400 X-Google-Smtp-Source: AOwi7QDgv688kVPHYjaaGnxi81j2CL3tFaFivZY6Qy0jejJ5g4dlPD0J59MWxJEQMw3gatXhywPcAA== Subject: Re: [RESEND][PATCH 1/4] of: platform: populate /firmware/ node from of_platform_default_populate_init() To: Sudeep Holla , linux-arm-kernel@lists.infradead.org References: <1506595562-10592-1-git-send-email-sudeep.holla@arm.com> <1506595562-10592-2-git-send-email-sudeep.holla@arm.com> Cc: Rob Herring , Arnd Bergmann , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Frank Rowand From: Frank Rowand Message-ID: <59E53651.5070704@gmail.com> Date: Mon, 16 Oct 2017 15:44:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1506595562-10592-2-git-send-email-sudeep.holla@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + me On 09/28/17 03:45, Sudeep Holla wrote: > Since "/firmware" does not have its own "compatible" property as it's > just collection of nodes representing firmware interface, it's sub-nodes > are not populated during system initialization. > > Currently different firmware drivers search the /firmware/ node and > populate the sub-node devices selectively. Instead we can populate > the /firmware/ node during init to avoid more drivers continuing to > populate the devices selectively. > > To generalize the solution this patch populates the /firmware/ node > explicitly from of_platform_default_populate_init(). > > Cc: Arnd Bergmann > Cc: Rob Herring > Signed-off-by: Sudeep Holla > --- > drivers/of/platform.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > index ac15d0e3d27d..3a213a6aee89 100644 > --- a/drivers/of/platform.c > +++ b/drivers/of/platform.c > @@ -515,6 +515,10 @@ static int __init of_platform_default_populate_init(void) > of_platform_device_create(node, NULL, NULL); > } > > + node = of_find_node_by_path("/firmware"); > + if (node) > + of_platform_populate(node, NULL, NULL, NULL); > + > /* Populate everything else. */ > of_platform_default_populate(NULL, NULL, NULL); > >