From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNXlg-00086u-LC for barebox@lists.infradead.org; Wed, 30 Sep 2020 08:47:22 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNXlf-0003VV-NS for barebox@lists.infradead.org; Wed, 30 Sep 2020 10:47:19 +0200 Received: from mfe by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kNXlf-000171-9Q for barebox@lists.infradead.org; Wed, 30 Sep 2020 10:47:19 +0200 From: Marco Felsch Date: Wed, 30 Sep 2020 10:47:11 +0200 Message-Id: <20200930084716.4200-4-m.felsch@pengutronix.de> In-Reply-To: <20200930084716.4200-1-m.felsch@pengutronix.de> References: <20200930084716.4200-1-m.felsch@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 3/8] of: base: move clock init from of_probe() to barebox_register_of() To: barebox@lists.infradead.org This is required for the new deep-probe mechanism. Barebox deep-probe calls of_probe() very late and so clock drivers using the old CLK_OF_DECLARE_DRIVER() mechanism are added very late. This would break the deep-probe approach. Move of_clk_init() and call it right before the the of_probe() should have no impact because of_clk_init() only depends on an unflatten dtb. Signed-off-by: Marco Felsch --- v2: - no changes drivers/of/base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 83e4d0e9b5..8ba151dbde 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1575,8 +1575,10 @@ void barebox_register_of(struct device_node *root) of_fix_tree(root); of_set_root_node(root); - if (IS_ENABLED(CONFIG_OFDEVICE)) + if (IS_ENABLED(CONFIG_OFDEVICE)) { + of_clk_init(root, NULL); of_probe(); + } } void barebox_register_fdt(const void *dtb) @@ -2198,7 +2200,6 @@ int of_probe(void) of_platform_device_create_root(root_node); - of_clk_init(root_node, NULL); of_platform_populate(root_node, of_default_bus_match_table, NULL); return 0; -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox