From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Rajendra Nayak <rnayak@codeaurora.org>
Cc: sboyd@codeaurora.org, mturquette@baylibre.com,
linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, tdas@codeaurora.org
Subject: Re: [PATCH 2/7] clk: qcom: Add a custom udelay needed for some branch clocks
Date: Fri, 24 Feb 2017 05:20:12 -0800 [thread overview]
Message-ID: <20170224132012.GA29979@builder> (raw)
In-Reply-To: <1476876523-27378-3-git-send-email-rnayak@codeaurora.org>
On Wed 19 Oct 04:28 PDT 2016, Rajendra Nayak wrote:
> Some branch clocks marked with a BRANCH_HALT_DELAY might need more
> than the default 10us delay. Have a way to specify a custom delay
> in such cases
>
> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/clk/qcom/clk-branch.c | 5 ++++-
> drivers/clk/qcom/clk-branch.h | 2 ++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
> index 26f7af31..1c11f12 100644
> --- a/drivers/clk/qcom/clk-branch.c
> +++ b/drivers/clk/qcom/clk-branch.c
> @@ -82,7 +82,10 @@ static int clk_branch_wait(const struct clk_branch *br, bool enabling,
> return 0;
>
> if (br->halt_check == BRANCH_HALT_DELAY || (!enabling && voted)) {
> - udelay(10);
> + if (br->udelay)
> + udelay(br->udelay);
> + else
> + udelay(10);
> } else if (br->halt_check == BRANCH_HALT_ENABLE ||
> br->halt_check == BRANCH_HALT ||
> (enabling && voted)) {
> diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h
> index 284df3f..4c56a35 100644
> --- a/drivers/clk/qcom/clk-branch.h
> +++ b/drivers/clk/qcom/clk-branch.h
> @@ -26,6 +26,7 @@
> * @halt_reg: halt register
> * @halt_bit: ANDed with @halt_reg to test for clock halted
> * @halt_check: type of halt checking to perform
> + * @udelay: custom udelay incase of BRANCH_HALT_DELAY, default is 10us
> * @clkr: handle between common and hardware-specific interfaces
> *
> * Clock which can gate its output.
> @@ -43,6 +44,7 @@ struct clk_branch {
> #define BRANCH_HALT_ENABLE_VOTED (BRANCH_HALT_ENABLE | BRANCH_VOTED)
> #define BRANCH_HALT_DELAY 2 /* No bit to check; just delay */
>
> + u32 udelay;
> struct clk_regmap clkr;
> };
>
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
next prev parent reply other threads:[~2017-02-24 13:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 11:28 [PATCH 0/7] clk: qcom: Misc gcc/mmcc msm8996 fixes Rajendra Nayak
2016-10-19 11:28 ` [PATCH 1/7] clk: qcom: Mark a few branch clocks with BRANCH_HALT_DELAY Rajendra Nayak
2016-11-02 20:39 ` Stephen Boyd
2016-11-03 8:26 ` Rajendra Nayak
2016-10-19 11:28 ` [PATCH 2/7] clk: qcom: Add a custom udelay needed for some branch clocks Rajendra Nayak
2017-02-24 13:20 ` Bjorn Andersson [this message]
2016-10-19 11:28 ` [PATCH 3/7] clk: qcom: Add custom udelays for clks in msm8996 Rajendra Nayak
2016-10-19 11:28 ` [PATCH 4/7] clk: qcom: Add freq tables for a few rcgs Rajendra Nayak
2016-11-02 21:50 ` Stephen Boyd
2016-10-19 11:28 ` [PATCH 5/7] clk: qcom: Mark a few clocks as BRANCH_VOTED Rajendra Nayak
2016-10-19 11:28 ` [PATCH 6/7] clk: qcom: Add force enable/disable needed for gfx3d rcg on msm8996 Rajendra Nayak
2016-10-19 11:28 ` [PATCH 7/7] clk: qcom: Add some missing gcc clks for msm8996 Rajendra Nayak
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=20170224132012.GA29979@builder \
--to=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rnayak@codeaurora.org \
--cc=sboyd@codeaurora.org \
--cc=tdas@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.