From: Stephen Boyd <sboyd@kernel.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v6 5/7] clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces
Date: Wed, 15 Jun 2022 22:50:51 -0700 [thread overview]
Message-ID: <20220616055053.F3BCFC34114@smtp.kernel.org> (raw)
In-Reply-To: <20220603080101.2251828-1-vladimir.zapolskiy@linaro.org>
Quoting Vladimir Zapolskiy (2022-06-03 01:01:01)
> The change adds controls for Lucid EVO PLL configuration and exports
Please read the section from this grep
$ git grep "This patch" -- Documentation/process/
> control functions to clock controller drivers.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
> Changes from v3 to v6:
> * none.
>
> Changes from v2 to v3:
> * improved commit subject and description per ask from Bjorn.
>
> drivers/clk/qcom/clk-alpha-pll.c | 65 ++++++++++++++++++++++++++++++++
> drivers/clk/qcom/clk-alpha-pll.h | 5 ++-
> 2 files changed, 69 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
> index 47879ee5a677..54bad5277802 100644
> --- a/drivers/clk/qcom/clk-alpha-pll.c
> +++ b/drivers/clk/qcom/clk-alpha-pll.c
> @@ -1994,6 +1996,33 @@ const struct clk_ops clk_alpha_pll_zonda_ops = {
> };
> EXPORT_SYMBOL_GPL(clk_alpha_pll_zonda_ops);
>
> +void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
> + const struct alpha_pll_config *config)
> +{
> + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l |
> + (TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT));
Prefer a local variable
u32 lval = config->l;
lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval);
> +
> + clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);
> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val);
> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val);
> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U1(pll), config->config_ctl_hi1_val);
> + clk_alpha_pll_write_config(regmap, PLL_USER_CTL(pll), config->user_ctl_val);
> + clk_alpha_pll_write_config(regmap, PLL_USER_CTL_U(pll), config->user_ctl_hi_val);
> + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL(pll), config->test_ctl_val);
> + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U(pll), config->test_ctl_hi_val);
> + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val);
> +
> + /* Disable PLL output */
> + regmap_update_bits(regmap, PLL_MODE(pll), PLL_OUTCTRL, 0);
> +
> + /* Set operation mode to STANDBY */
> + regmap_write(regmap, PLL_OPMODE(pll), PLL_STANDBY);
> +
> + /* Place the PLL in STANDBY mode */
You mean reset? The comments don't seem very useful.
> + regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N);
> +}
> +EXPORT_SYMBOL_GPL(clk_lucid_evo_pll_configure);
> +
> static int alpha_pll_lucid_evo_enable(struct clk_hw *hw)
> {
> struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
next prev parent reply other threads:[~2022-06-16 5:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 8:00 [PATCH v6 0/7] clk: qcom: add camera clock controller driver for SM8450 SoC Vladimir Zapolskiy
2022-06-03 8:00 ` [PATCH v6 1/7] dt-bindings: clock: add QCOM SM8450 camera clock bindings Vladimir Zapolskiy
2022-06-03 12:25 ` Rob Herring
2022-06-16 5:52 ` Stephen Boyd
2022-06-03 8:00 ` [PATCH v6 2/7] arm64: dts: qcom: sm8450: Add description of camera clock controller Vladimir Zapolskiy
2022-06-03 8:00 ` [PATCH v6 3/7] clk: qcom: clk-alpha-pll: fix clk_trion_pll_configure description Vladimir Zapolskiy
2022-06-03 8:00 ` [PATCH v6 4/7] clk: qcom: clk-alpha-pll: limit exported symbols to GPL licensed code Vladimir Zapolskiy
2022-06-16 5:51 ` Stephen Boyd
2022-06-03 8:01 ` [PATCH v6 5/7] clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces Vladimir Zapolskiy
2022-06-16 5:50 ` Stephen Boyd [this message]
2022-06-03 8:01 ` [PATCH v6 6/7] clk: qcom: clk-alpha-pll: add Rivian " Vladimir Zapolskiy
2022-06-16 5:47 ` Stephen Boyd
2022-06-03 8:01 ` [PATCH v6 7/7] clk: qcom: add camera clock controller driver for SM8450 SoC Vladimir Zapolskiy
2022-06-16 5:46 ` 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=20220616055053.F3BCFC34114@smtp.kernel.org \
--to=sboyd@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=vladimir.zapolskiy@linaro.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