devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Taniya Das <quic_tdas@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 7/7] clk: qcom: add the driver for the MSM8996 APCS clocks
Date: Wed, 25 Jan 2023 13:56:09 -0800	[thread overview]
Message-ID: <525ef5cdefe987c3412249760324eb09.sboyd@kernel.org> (raw)
In-Reply-To: <63f017c7-d320-a996-7bda-33d263a847bc@linaro.org>

Quoting Konrad Dybcio (2023-01-25 13:48:54)
> 
> 
> On 25.01.2023 22:38, Stephen Boyd wrote:
> > Quoting Dmitry Baryshkov (2023-01-18 05:22:54)
> >> diff --git a/drivers/clk/qcom/apcs-msm8996.c b/drivers/clk/qcom/apcs-msm8996.c
> >> new file mode 100644
> >> index 000000000000..7e46ea8ed444
> >> --- /dev/null
> >> +++ b/drivers/clk/qcom/apcs-msm8996.c
> >> @@ -0,0 +1,76 @@
> > [...]
> >> +
> >> +static int qcom_apcs_msm8996_clk_probe(struct platform_device *pdev)
> >> +{
> >> +       struct device *dev = &pdev->dev;
> >> +       struct device *parent = dev->parent;
> >> +       struct regmap *regmap;
> >> +       struct clk_hw *hw;
> >> +       unsigned int val;
> >> +       int ret = -ENODEV;
> >> +
> >> +       regmap = dev_get_regmap(parent, NULL);
> >> +       if (!regmap) {
> >> +               dev_err(dev, "failed to get regmap: %d\n", ret);
> >> +               return ret;
> >> +       }
> >> +
> >> +       regmap_read(regmap, APCS_AUX_OFFSET, &val);
> >> +       regmap_update_bits(regmap, APCS_AUX_OFFSET, APCS_AUX_DIV_MASK,
> >> +                          FIELD_PREP(APCS_AUX_DIV_MASK, APCS_AUX_DIV_2));
> >> +
> >> +       /* Hardware mandated delay */
> > 
> > Delay for what? Setting the divider? What if the register value didn't
> > change at all? Can you skip the delay in that case?
> Waiting 5 us unconditionally in exchange for ensured CPU clock
> source stability sounds like a rather fair deal.. Checking if
> the register value changed would not save us much time..

So it is waiting for the CPU clk to be stable? The comment is not clear.

  reply	other threads:[~2023-01-25 21:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 13:22 [PATCH v4 0/7] clk: qcom: msm8996: add APCS clock driver Dmitry Baryshkov
2023-01-18 13:22 ` [PATCH v4 1/7] dt-bindings: mailbox: qcom: add SDX55 compatible Dmitry Baryshkov
2023-01-18 13:22 ` [PATCH v4 2/7] dt-bindings: mailbox: qcom: enable syscon compatible for msm8976 Dmitry Baryshkov
2023-01-18 13:22 ` [PATCH v4 3/7] dt-bindings: mailbox: qcom: correct the list of platforms using clocks Dmitry Baryshkov
2023-01-19 11:41   ` Krzysztof Kozlowski
2023-01-18 13:22 ` [PATCH v4 4/7] dt-bindings: mailbox: qcom: add missing platforms to conditional clauses Dmitry Baryshkov
2023-01-19 11:41   ` Krzysztof Kozlowski
2023-01-18 13:22 ` [PATCH v4 5/7] dt-bindings: mailbox: qcom: add #clock-cells to msm8996 example Dmitry Baryshkov
2023-01-18 13:22 ` [PATCH v4 6/7] mailbox: qcom-apcs-ipc: enable APCS clock device for MSM8996 Dmitry Baryshkov
2023-01-18 13:22 ` [PATCH v4 7/7] clk: qcom: add the driver for the MSM8996 APCS clocks Dmitry Baryshkov
2023-01-25 21:38   ` Stephen Boyd
2023-01-25 21:48     ` Konrad Dybcio
2023-01-25 21:56       ` Stephen Boyd [this message]
2023-01-25 22:05         ` Konrad Dybcio
2023-01-25 23:15           ` Stephen Boyd
2023-01-26 22:51     ` Dmitry Baryshkov
2023-01-27 21:24       ` 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=525ef5cdefe987c3412249760324eb09.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@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=quic_tdas@quicinc.com \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).