Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5666877pxb; Tue, 16 Feb 2021 04:42:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqWEJsBdK+TuGky86TQi+fz1MMnpmsCoJKk+B6TVZ3G88J/8h1X3vaFf+eS6jwvwYlO6aw X-Received: by 2002:a17:906:940c:: with SMTP id q12mr6379305ejx.476.1613479323874; Tue, 16 Feb 2021 04:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613479323; cv=none; d=google.com; s=arc-20160816; b=oKeTSoaSTxHutA+VuiIVpDLZbTWUZ/slUq+EidhVsDlQgFvT+TjEK5wyxLRiKvcFiX G4b1g5Ivfd72a1cUKnP/OSPpnjFcUhVZmujjv5xP3QDdQnMDlbiFgL0UbryhchHpVd3V To7iDLFofKHULHBHTpecygX4SBCdTDKbEC0neivSQj9KPkLlwUnxoWOQm/uyLSyZQ1Q7 DcR3TPOihtAkgtB+6kEW/KBc8szmbkAN0Y4eDdQtwCkrFLnE3T56k3Ur7ybDSaw27Cab 7GT+M2TyU4a8wCm+jpcYmpppWmKnx+RNAGoUnYMlzs0Dike5/cbsAiIQANFEsvo1qZOZ GRAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=unutt+aTiZE/66WKMu9Nh2B3T3qyZQxXOICmZuP5k/s=; b=ID+Q+pRnuPH3vcRyBQ2OKpc9yKlkBMbBoB9jzAKnfSHoxJFyaYSWQcXchy8r0gA1PY x+Ek03dd+9rP6DVH9EWcxEEayu7td9myc4LopC7hb8j5ymyW4KK0IW/bDC9KgLO9V2b1 Veew7mghP1uc7XgKfd2yPFjevDmSZodDPqyc0ipkKhz1jaYVmnE3qwB8XdtqvetEFwQc VYY46ez+E7pDGlLAOzzB+Esrnpz1blKA/if4sPc33VQztSq5uPd+1Ort5c6kPZooJ4ii PJsvehVHQUI8QB+R2BSVO1hK7qDXPxyjLhdGYOsQVdgRZlCtjy++vqHVm/uv0S8AQnb+ 3XDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si14561983edh.31.2021.02.16.04.41.40; Tue, 16 Feb 2021 04:42:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbhBPMkr (ORCPT + 99 others); Tue, 16 Feb 2021 07:40:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbhBPMko (ORCPT ); Tue, 16 Feb 2021 07:40:44 -0500 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73179C06174A for ; Tue, 16 Feb 2021 04:40:03 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed60:c5d6:9422:c618:ee58]) by andre.telenet-ops.be with bizsmtp id Vog02400c2PLE0701og0oF; Tue, 16 Feb 2021 13:40:01 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lBze4-007Pal-DB; Tue, 16 Feb 2021 13:40:00 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lBze3-00DLHK-Tg; Tue, 16 Feb 2021 13:39:59 +0100 From: Geert Uytterhoeven To: Magnus Damm , Saravana Kannan Cc: Sebastian Reichel , linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added Date: Tue, 16 Feb 2021 13:39:58 +0100 Message-Id: <20210216123958.3180014-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, there are two drivers binding to the R-Mobile System Controller (SYSC): - The rmobile-sysc driver registers PM domains from a core_initcall(), and does not use a platform driver, - The optional rmobile-reset driver registers a reset handler, and does use a platform driver. As fw_devlink only considers devices, commit bab2d712eeaf9d60 ("PM: domains: Mark fwnodes when their powerdomain is added/removed") works only for PM Domain drivers where the DT node is a real device node, and not for PM Domain drivers using a hierarchical representation inside a subnode. Hence if fw_devlink is enabled, probing of on-chip devices that are part of the SYSC PM domain is deferred until the optional rmobile-reset driver has been bound. If the rmobile-reset driver is not available, this will never happen, and thus lead to complete system boot failures. Fix this by explicitly marking the fwnode initialized. Suggested-by: Saravana Kannan Signed-off-by: Geert Uytterhoeven --- This is v2 of "soc: renesas: rmobile-sysc: Set OF_POPULATED and absorb reset handling". To be queued in renesas-devel as a fix for v5.12 if v5.12-rc1 will have fw_devlink enabled. v2: - Call fwnode_dev_initialized() instead of setting OF_POPULATED, - Drop reset handling move, as fwnode_dev_initialized() does not prevent the rmobile-reset driver from binding against the same device. --- drivers/soc/renesas/rmobile-sysc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/renesas/rmobile-sysc.c b/drivers/soc/renesas/rmobile-sysc.c index bf64d052f9245db5..204e6135180b919c 100644 --- a/drivers/soc/renesas/rmobile-sysc.c +++ b/drivers/soc/renesas/rmobile-sysc.c @@ -342,6 +342,8 @@ static int __init rmobile_init_pm_domains(void) of_node_put(np); break; } + + fwnode_dev_initialized(&np->fwnode, true); } put_special_pds(); -- 2.25.1