From: Andrea della Porta <andrea.porta@suse.com>
To: Joshua Covington <joshuacov@gmail.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
Brian Masney <masneyb@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Andrea della Porta <andrea.porta@suse.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] clk: rp1: reset cached rates on probe
Date: Wed, 25 Nov 2026 11:41:13 +0100 [thread overview]
Message-ID: <awa7SfNvWXcItiBk@apocalypse> (raw)
In-Reply-To: <20261124231751.83938-4-joshuacov@gmail.com>
Hi Joshua,
On 23:17 Tue 24 Nov , Joshua Covington wrote:
> The clock descriptors are static, so their cached rates survive when
> RP1 is unbound and bound again. The "varsrc" clocks then report the
> rate of the previous probe, and the audio PLL and I2S clocks start with
> stale cached values.
>
> Reset the cached rates before registering the clocks, so that a second
> probe starts from the same state as the first.
>
> Fixes: 6486341721a2 ("clk: rp1: Add support for clocks provided by RP1")
> Signed-off-by: Joshua Covington <joshuacov@gmail.com>
> ---
> drivers/clk/clk-rp1.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/clk/clk-rp1.c b/drivers/clk/clk-rp1.c
> index 1dd276dd2b..60037b19db 100644
> --- a/drivers/clk/clk-rp1.c
> +++ b/drivers/clk/clk-rp1.c
> @@ -2416,6 +2416,12 @@ static int rp1_clk_probe(struct platform_device *pdev)
> clockman->onecell.num = asize;
> hws = clockman->onecell.hws;
>
> + for (i = 0; i < asize; i++) {
> + desc = clk_desc_array[i];
> + if (desc)
> + desc->cached_rate = 0;
> + }
> +
> for (i = 0; i < asize; i++) {
> desc = clk_desc_array[i];
> if (desc && desc->clk_register && desc->data)
Thanks for your patch!
Reviewed-by: Andrea della Porta <andrea.porta@suse.com>
> --
> 2.56.0
>
next prev parent reply other threads:[~2026-11-25 10:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 23:17 [PATCH v3 0/3] clk: allow a clk_hw to be registered again after unregistering it Joshua Covington
2026-11-24 23:17 ` [PATCH v3 1/3] " Joshua Covington
2026-11-24 23:17 ` [PATCH v3 2/3] clk: tests: add tests for registering a clk_hw again Joshua Covington
2026-11-24 23:17 ` [PATCH v3 3/3] clk: rp1: reset cached rates on probe Joshua Covington
2026-11-25 10:41 ` Andrea della Porta [this message]
2026-12-01 2:56 ` [PATCH v3 0/3] clk: allow a clk_hw to be registered again after unregistering it Brian Masney
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=awa7SfNvWXcItiBk@apocalypse \
--to=andrea.porta@suse.com \
--cc=bmasney+clk@redhat.com \
--cc=florian.fainelli@broadcom.com \
--cc=jbrunet+clk@baylibre.com \
--cc=joshuacov@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=masneyb@kernel.org \
--cc=s.nawrocki@samsung.com \
--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 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.