From: Jerome Brunet <jbrunet@baylibre.com>
To: Carlo Caione <ccaione@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jerome Brunet <jbrunet@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Jian Hu <jian.hu@amlogic.com>, Chuan Liu <chuan.liu@amlogic.com>,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/7] clk: meson: pll: Support active-low resets
Date: Wed, 18 Nov 2026 11:01:12 +0100 [thread overview]
Message-ID: <179499607255.413320.553972685734176286.b4-review@b4> (raw)
In-Reply-To: <20261106-upstream-s7-clk-v1-3-7d501d62621f@baylibre.com>
> The common PLL code assumes that the reset of a PLL is active high. The
> S7 HDMI PLL has an active-low reset, and its lock flag only rises
> reliably when the PLL goes through it.
>
> Add a flag for PLLs with an active-low reset so this PLL can use the
> common implementation.
>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
> drivers/clk/meson/clk-pll.c | 43 +++++++++++++++++++++++++++++++------------
> drivers/clk/meson/clk-pll.h | 1 +
> 2 files changed, 32 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c
> index 44b33051405f..4ac5e45c1e9b 100644
> --- a/drivers/clk/meson/clk-pll.c
> +++ b/drivers/clk/meson/clk-pll.c
> @@ -293,13 +293,37 @@ static int meson_clk_pll_wait_lock(struct clk_hw *hw)
> return -ETIMEDOUT;
> }
>
> +static bool meson_clk_pll_in_reset(struct clk_regmap *clk,
> + struct meson_clk_pll_data *pll)
> +{
> + unsigned int rst;
> +
> + if (!MESON_PARM_APPLICABLE(&pll->rst))
> + return false;
> +
> + rst = meson_parm_read(clk->map, &pll->rst);
> +
> + return pll->flags & CLK_MESON_PLL_RST_ACTIVE_LOW ? !rst : rst;
nitpick: exclusive or ?
> +}
> +
> +static void meson_clk_pll_reset(struct clk_regmap *clk,
> + struct meson_clk_pll_data *pll, bool reset)
> +{
> + if (!MESON_PARM_APPLICABLE(&pll->rst))
> + return;
> +
> + if (pll->flags & CLK_MESON_PLL_RST_ACTIVE_LOW)
> + reset = !reset;
same here.
Apart from that
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
--
Jerome
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-11-18 10:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 8:30 [PATCH 0/7] Add Amlogic S7 clock controllers Carlo Caione
2026-11-06 8:30 ` [PATCH 1/7] dt-bindings: clock: Add Amlogic S7 SCMI clock IDs Carlo Caione
2026-11-08 23:21 ` Conor Dooley
2026-11-09 8:37 ` Jerome Brunet
2026-11-09 20:00 ` Conor Dooley
2026-11-09 20:59 ` Carlo Caione
2026-11-09 8:49 ` Carlo Caione
2026-11-06 8:30 ` [PATCH 2/7] clk: meson: pll: Support PLLs without a pre-divider Carlo Caione
2026-11-06 8:35 ` sashiko-bot
2026-11-18 10:01 ` Jerome Brunet
2026-11-06 8:30 ` [PATCH 3/7] clk: meson: pll: Support active-low resets Carlo Caione
2026-11-18 10:01 ` Jerome Brunet [this message]
2026-11-06 8:30 ` [PATCH 4/7] dt-bindings: clock: Add Amlogic S7 PLL clock controller Carlo Caione
2026-11-06 17:35 ` Conor Dooley
2026-11-08 23:21 ` Conor Dooley
2026-11-18 10:01 ` Jerome Brunet
2026-11-06 8:30 ` [PATCH 5/7] clk: amlogic: Add S7 PLL clock controller driver Carlo Caione
2026-11-06 8:51 ` sashiko-bot
2026-11-18 10:01 ` Jerome Brunet
2026-11-18 18:51 ` Carlo Caione
2026-11-19 8:11 ` Jerome Brunet
2026-11-06 8:30 ` [PATCH 6/7] dt-bindings: clock: Add Amlogic S7 peripherals clock controller Carlo Caione
2026-11-06 17:34 ` Conor Dooley
2026-11-06 19:34 ` Carlo Caione
2026-11-06 20:48 ` Conor Dooley
2026-11-06 22:27 ` Carlo Caione
2026-11-08 23:17 ` Conor Dooley
2026-11-06 8:30 ` [PATCH 7/7] clk: amlogic: Add S7 peripherals clock controller driver Carlo Caione
2026-11-18 10:01 ` Jerome Brunet
2026-11-18 18:55 ` Carlo Caione
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=179499607255.413320.553972685734176286.b4-review@b4 \
--to=jbrunet@baylibre.com \
--cc=bmasney+clk@redhat.com \
--cc=ccaione@baylibre.com \
--cc=chuan.liu@amlogic.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet+clk@baylibre.com \
--cc=jian.hu@amlogic.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=sboyd@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
all inboxes | Powered by JetHome®