From: Heiko Stuebner <heiko@sntech.de>
To: Stephen Boyd <sboyd@kernel.org>, Shawn Lin <shawn.lin@rock-chips.com>
Cc: linux-rockchip@lists.infradead.org, linux-clk@vger.kernel.org,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: Re: [PATCH] clk: rockchip: rk3568: Add PCIe pipe clock gates
Date: Fri, 06 Mar 2026 11:52:06 +0100 [thread overview]
Message-ID: <3742329.R56niFO833@phil> (raw)
In-Reply-To: <1772698011-145625-1-git-send-email-shawn.lin@rock-chips.com>
Hi Shawn,
Am Donnerstag, 5. März 2026, 09:06:51 Mitteleuropäische Normalzeit schrieb Shawn Lin:
> The PCIe pipe clocks are currently left as orphan clocks and remain
> enabled indefinitely, which is suboptimal. Add the missing clock gates
> so the PCIe driver can explicitly manage them when not in use.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
> Hi Heiko,
>
> This patch should be considered only after David's patch[1] is merged,
> otherwise it breaks PCIe on RK3566/RK3568 due to clk_disable_unused().
This would also break compatiblity with old devicetrees.
The devicetree used by the kernel can also be embedded for example
in an already installed u-boot and handed to the kernel from there.
You cannot expect board devicetrees and the kernel image to be updated
in lockstep.
We also sort of guarantee this backwards compatiblity - old DTB with
newer kernel.
The solution is to add a CLK_IGNORE_UNUSED flag (but not CLK_IS_CRITICAL)
to the newly added gate.
This lets the clock stay and keeps the original behavious on old DTBs,
but also allows the PCIe driver in newer kernels to turn off the clock
if it wants to.
Thanks
Heiko
next parent reply other threads:[~2026-03-06 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1772698011-145625-1-git-send-email-shawn.lin@rock-chips.com>
2026-03-06 10:52 ` Heiko Stuebner [this message]
2026-03-06 12:05 ` [PATCH] clk: rockchip: rk3568: Add PCIe pipe clock gates Shawn Lin
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=3742329.R56niFO833@phil \
--to=heiko@sntech.de \
--cc=linux-clk@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=sboyd@kernel.org \
--cc=shawn.lin@rock-chips.com \
/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