All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dong Aisheng <aisheng.dong@nxp.com>
To: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
	sudipm.mukherjee@gmail.com, sboyd@kernel.org,
	shawnguo@kernel.org, linux-pm@vger.kernel.org,
	dongas86@gmail.com, Dong Aisheng <aisheng.dong@nxp.com>
Subject: [PATCH 3/3] clk: imx: scu: defer probe if scu pd is still not ready
Date: Tue, 24 Nov 2020 18:08:02 +0800	[thread overview]
Message-ID: <20201124100802.22775-4-aisheng.dong@nxp.com> (raw)
In-Reply-To: <20201124100802.22775-1-aisheng.dong@nxp.com>

The clocks registered by SCU clock protocol driver requires power domain
to be ready first. Query the SCU PD status to support -EPROBE_DEFER
properly.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/clk/imx/clk-scu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index 1f5518b7ab39..846201f9b72d 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -163,6 +163,9 @@ int imx_clk_scu_init(struct device_node *np)
 	of_property_read_u32(np, "#clock-cells", &clk_cells);
 
 	if (clk_cells == 2) {
+		if (!imx_scu_pd_is_initialized())
+			return -EPROBE_DEFER;
+
 		for (i = 0; i < IMX_SC_R_LAST; i++)
 			INIT_LIST_HEAD(&imx_scu_clks[i]);
 
-- 
2.23.0


WARNING: multiple messages have this Message-ID (diff)
From: Dong Aisheng <aisheng.dong@nxp.com>
To: linux-clk@vger.kernel.org
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
	dongas86@gmail.com, linux-pm@vger.kernel.org, sboyd@kernel.org,
	linux-imx@nxp.com, shawnguo@kernel.org,
	sudipm.mukherjee@gmail.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] clk: imx: scu: defer probe if scu pd is still not ready
Date: Tue, 24 Nov 2020 18:08:02 +0800	[thread overview]
Message-ID: <20201124100802.22775-4-aisheng.dong@nxp.com> (raw)
In-Reply-To: <20201124100802.22775-1-aisheng.dong@nxp.com>

The clocks registered by SCU clock protocol driver requires power domain
to be ready first. Query the SCU PD status to support -EPROBE_DEFER
properly.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/clk/imx/clk-scu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index 1f5518b7ab39..846201f9b72d 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -163,6 +163,9 @@ int imx_clk_scu_init(struct device_node *np)
 	of_property_read_u32(np, "#clock-cells", &clk_cells);
 
 	if (clk_cells == 2) {
+		if (!imx_scu_pd_is_initialized())
+			return -EPROBE_DEFER;
+
 		for (i = 0; i < IMX_SC_R_LAST; i++)
 			INIT_LIST_HEAD(&imx_scu_clks[i]);
 
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-11-24 10:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 10:07 [PATCH 0/3] clk: imx: scu: support defer probe properly Dong Aisheng
2020-11-24 10:07 ` Dong Aisheng
2020-11-24 10:08 ` [PATCH 1/3] clk: imx: scu: make scu clk driver depend on scu pd Dong Aisheng
2020-11-24 10:08   ` Dong Aisheng
2020-11-24 10:08 ` [PATCH 2/3] firmware: imx: scu-pd: export SCU PD register status Dong Aisheng
2020-11-24 10:08   ` Dong Aisheng
2020-11-24 10:08 ` Dong Aisheng [this message]
2020-11-24 10:08   ` [PATCH 3/3] clk: imx: scu: defer probe if scu pd is still not ready Dong Aisheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201124100802.22775-4-aisheng.dong@nxp.com \
    --to=aisheng.dong@nxp.com \
    --cc=dongas86@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.