From patchwork Thu Sep 28 10:45:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 114406 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp578971qgf; Thu, 28 Sep 2017 03:46:19 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDEO+1wG9Cdov4ynmJ8MelzlEQ+tWtzHra67uda8oGAqRq4OoLdgYHbS27sIueNfBxEGihx X-Received: by 10.101.66.70 with SMTP id d6mr3846340pgq.169.1506595579435; Thu, 28 Sep 2017 03:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506595579; cv=none; d=google.com; s=arc-20160816; b=bWco/UxwN1qdcKv7aPyjQ7sxaW66XXWoST9KuytKYTZ4c1Ldj6gJ4KuVv5XYQxxwPB 53QKKyhF/Tj+yxE042JcSfSe2A0A/y8ZCNouBT2mb4zafIcirW/bu/k1/PFMJJSlCzzH hOtsIrbmt8Zrp3As4auLKXJYb4a2WcPt5bVEudsvq9UTkVxVvFfDHd0rtNy/OYTdhPJX n3QVCeMYgFwVeRhNsmkuvl/jFmb14ZEc0LJX6B9se+0ohdIJ/inVvfvCB7wNZ1QvPzgt S58ZwhCGa8HpTtAUaJPOrbIc/IZJ2Vbj+Q6DMiLckQuNr5lu1fMx24cWhLKPdbwIvkmC Zxqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=h6kFAnZKICx5HPBb3Wmenv/Rj1rY+pw7NSOpu9QL2/Y=; b=JKOPKjWzF6klGpKTY0BRtLjoodfz+MHIFZ80QESWZY5rhlRE/8HWT81HpvET6KBAA1 dx1ACLVJ7vRCT/BcdBaB0a9JsanWiTbQklD4N1oOrNbJY70IsygFzMWVYshp1nCTtVo5 tUekq1ZQpvAGo08ukM7W1cgMDxx2RoscU+wqVfYVqpuC/zOAQImTO/ReSmDHjZYSO2Yd BSnhFV7E0AuY2RbBpcD2eFq1zx1hrnbRFWOCHAy8Pc5l4NzWwQsBUDLX79BJr7SI3FAZ 94CP0KxhAXsLIJnHVS4STeffRKbFjWwkLakB1fkjrBfTeSAphif4vEb63epLYy0QppmQ cuzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si1183626pld.825.2017.09.28.03.46.18; Thu, 28 Sep 2017 03:46:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbdI1KqQ (ORCPT + 26 others); Thu, 28 Sep 2017 06:46:16 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54960 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbdI1KqO (ORCPT ); Thu, 28 Sep 2017 06:46:14 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C67411596; Thu, 28 Sep 2017 03:46:13 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6837E3F53D; Thu, 28 Sep 2017 03:46:12 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org Cc: Sudeep Holla , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Arnd Bergmann , Rob Herring Subject: [RESEND][PATCH 1/4] of: platform: populate /firmware/ node from of_platform_default_populate_init() Date: Thu, 28 Sep 2017 11:45:59 +0100 Message-Id: <1506595562-10592-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506595562-10592-1-git-send-email-sudeep.holla@arm.com> References: <1506595562-10592-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.7.4 Acked-by: Rob Herring 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);