Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp820579pxb; Thu, 28 Jan 2021 00:32:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbF1STajRYf/CPE3VD6LMYyS6yuYV9pTD7C8IP37aLHCjqX0Q7vIh01fZMhTKL+rnwMqwB X-Received: by 2002:a05:6402:278a:: with SMTP id b10mr13116821ede.347.1611822737716; Thu, 28 Jan 2021 00:32:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611822737; cv=none; d=google.com; s=arc-20160816; b=SP+vOo0dPmoIQXaP4ItnOPO9+q8meRqoZ5omun9WJ2D3lEpk4gtSFWZhRent2Axbvu Lf8MepL01W/DYErRYCSFWeAaxOzV7udm6FXm+VMlSToKSWAaOcdJnx3+J5jpUBdtgiWV nO2CBLlHD/3t1dGyRb5TpQ95LFA+8gA6eAwyocJ16WMt1nErlxQePxlkZghtDXYVFMFt r/U6spBgXVNVZTRwVo5dqsCzoylwufgK4fHzyAVfe6gSpy2fj5dBzFyFY+kDBXxme5lS Qrx7rc35yzzeqVyGJrk2I3iEHEz8Q2VTqkK2ffda/DVow1S90J4SlCNVS3ntB7dimGOn 4HYw== 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=ho3J35GnS4Vt7FGw76h7kPHKLAoMKsyGkHMSX9sefII=; b=E80qMAGz6KjMELIMa6Ba5MmvmKmEn05f6GhcmQfd5hGmdNhQyetuz54weENi0pD0eB Rt+F6f4AGOn0y6dxe7OzeHP4t7AXEcNZUYvBcL0HV85nKk1epQrwM9WFdgZSHMtPTZzy 7GUsO61HrPzK6HOVy9RgCiBmj//bDVukwonP9od/GgWi7noCWXtCrGUnawvy4ox0Q7gf PozXo2KVyFBiZ6aRyo1mJnNRh25qn8fcy/Q4wrx2Lbj97BrAs20WzX5TdikP0ke0xw/N 9ODoBUGAI2m3MLIHj5TubGpOG1yOKMdQZVQPwvVw47ibJUQfzd515ARxVtShBP72nOIq ehFw== 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 q14si2477331edw.313.2021.01.28.00.31.53; Thu, 28 Jan 2021 00:32:17 -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 S231585AbhA1IaZ (ORCPT + 99 others); Thu, 28 Jan 2021 03:30:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhA1I34 (ORCPT ); Thu, 28 Jan 2021 03:29:56 -0500 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1612C0613ED for ; Thu, 28 Jan 2021 00:28:57 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by albert.telenet-ops.be with bizsmtp id N8Up2400H4C55Sk068UpAC; Thu, 28 Jan 2021 09:28:55 +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 1l52fY-001JNE-RG; Thu, 28 Jan 2021 09:28:48 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l52fY-009Fsb-6J; Thu, 28 Jan 2021 09:28:48 +0100 From: Geert Uytterhoeven To: Magnus Damm Cc: Rob Herring , Saravana Kannan , Yoshihiro Shimoda , Greg Kroah-Hartman , "Rafael J . Wysocki" , Marc Zyngier , Kevin Hilman , Marek Szyprowski , linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] soc: renesas: rcar-sysc: Mark device node OF_POPULATED after init Date: Thu, 28 Jan 2021 09:28:47 +0100 Message-Id: <20210128082847.2205950-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 The R-Car System Controller (SYSC) driver registers PM domains from an early_initcall(). It does not use a platform driver, as secondary CPU startup on R-Car H1 needs to control the CPU power domains, before initialization of the driver framework. As fw_devlink only considers devices, it does not know that the System Controller is ready. Hence probing of on-chip devices that are part of the SYSC PM domain fails if fw_devlink is enabled: probe deferral - supplier e6180000.system-controller not ready Fix this by setting the OF_POPULATED flag for the SYSC device node after successful initialization. This will make of_link_to_phandle() ignore the SYSC device node as a dependency, and consumer devices will be probed again. Signed-off-by: Geert Uytterhoeven Reviewed-by: Saravana Kannan --- As this seems to be harmless if commit e590474768f1cc04 ("driver core: Set fw_devlink=on by default") won't make v5.12, I plan to queue this in renesas-devel for v5.12. v2: - Add Reviewed-by, - s/platform devices/devices/, - Drop Fixes tag, - Drop RFC. --- drivers/soc/renesas/rcar-sysc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c index d51ddc7d5232b9db..53387a72ca00ce79 100644 --- a/drivers/soc/renesas/rcar-sysc.c +++ b/drivers/soc/renesas/rcar-sysc.c @@ -434,6 +434,8 @@ static int __init rcar_sysc_pd_init(void) } error = of_genpd_add_provider_onecell(np, &domains->onecell_data); + if (!error) + of_node_set_flag(np, OF_POPULATED); out_put: of_node_put(np); -- 2.25.1