All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@codeaurora.org>
To: sboyd@kernel.org, mturquette@baylibre.com
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	stanimir.varbanov@linaro.org, vivek.gautam@codeaurora.org,
	srinivas.kandagatla@linaro.org,
	Rajendra Nayak <rnayak@codeaurora.org>
Subject: [PATCH v2 2/3] clk: qcom: Register the gdscs before the clocks
Date: Fri, 23 Mar 2018 13:56:15 +0530	[thread overview]
Message-ID: <20180323082616.10142-3-rnayak@codeaurora.org> (raw)
In-Reply-To: <20180323082616.10142-1-rnayak@codeaurora.org>

We have atleast some instances of ALWAYS_ON gdscs, which need to
be turned ON *before* some clocks within the gdsc domain marked
with a CLK_IS_CRITICAL can be turned ON.
To facilitate this sequence, register the GDCSs (and hence handle
the ALWAYS_ON gdscs) before we register clocks (and handle the
clocks marked as CLK_IS_CRITICAL)

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
---
 drivers/clk/qcom/common.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index b8064a336d46..39ce64c2783b 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -228,22 +228,6 @@ int qcom_cc_really_probe(struct platform_device *pdev,
 	if (!cc)
 		return -ENOMEM;
 
-	cc->rclks = rclks;
-	cc->num_rclks = num_clks;
-
-	for (i = 0; i < num_clks; i++) {
-		if (!rclks[i])
-			continue;
-
-		ret = devm_clk_register_regmap(dev, rclks[i]);
-		if (ret)
-			return ret;
-	}
-
-	ret = devm_of_clk_add_hw_provider(dev, qcom_cc_clk_hw_get, cc);
-	if (ret)
-		return ret;
-
 	reset = &cc->reset;
 	reset->rcdev.of_node = dev->of_node;
 	reset->rcdev.ops = &qcom_reset_ops;
@@ -272,6 +256,22 @@ int qcom_cc_really_probe(struct platform_device *pdev,
 			return ret;
 	}
 
+	cc->rclks = rclks;
+	cc->num_rclks = num_clks;
+
+	for (i = 0; i < num_clks; i++) {
+		if (!rclks[i])
+			continue;
+
+		ret = devm_clk_register_regmap(dev, rclks[i]);
+		if (ret)
+			return ret;
+	}
+
+	ret = devm_of_clk_add_hw_provider(dev, qcom_cc_clk_hw_get, cc);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(qcom_cc_really_probe);
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

  parent reply	other threads:[~2018-03-23  8:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  8:26 [PATCH v2 0/3] clk: qcom: msm8996: handle mmagic gdscs and clocks Rajendra Nayak
2018-03-23  8:26 ` [PATCH v2 1/3] clk: qcom: gdsc: Add support for ALWAYS_ON gdscs Rajendra Nayak
2018-05-25 18:18   ` Bjorn Andersson
2018-05-25 18:20   ` Srinivas Kandagatla
2018-06-01 18:05   ` Stephen Boyd
2018-03-23  8:26 ` Rajendra Nayak [this message]
2018-05-25 18:18   ` [PATCH v2 2/3] clk: qcom: Register the gdscs before the clocks Bjorn Andersson
2018-05-25 18:20   ` Srinivas Kandagatla
2018-06-01 18:06   ` Stephen Boyd
2018-03-23  8:26 ` [PATCH v2 3/3] clk: qcom: mmcc-msm8996: leave all mmagic gdscs and clocks always enabled Rajendra Nayak
2018-05-25 18:23   ` Bjorn Andersson
2018-06-01 18:06   ` Stephen Boyd

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=20180323082616.10142-3-rnayak@codeaurora.org \
    --to=rnayak@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=vivek.gautam@codeaurora.org \
    /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.