public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Daniele Briguglio <hello@superkali.me>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Daniele Briguglio <hello@superkali.me>
Subject: Re: [PATCH 2/3] clk: rockchip: allow grf_type_sys lookup in aux_grf_table
Date: Wed, 18 Mar 2026 13:35:41 +0100	[thread overview]
Message-ID: <13714918.O9o76ZdvQC@workhorse> (raw)
In-Reply-To: <20260316-rk3588-mclk-gate-grf-v1-2-66fb9a246718@superkali.me>

On Monday, 16 March 2026 14:06:32 Central European Standard Time Daniele Briguglio wrote:
> Remove the grf_type_sys exclusion from the auxiliary GRF table lookup
> in rockchip_clk_register_branches(). Previously, branches with
> grf_type_sys always used ctx->grf directly, bypassing the aux_grf_table.
> 
> This is a problem on SoCs like RK3588 where ctx->grf points to the
> PHP_GRF (set via the CRU's rockchip,grf phandle), but GATE_GRF clock
> entries need to access the SYS_GRF instead.
> 
> With this change, grf_type_sys branches first check the aux_grf_table,
> and fall back to ctx->grf if no entry is found. This is backwards
> compatible: on SoCs that do not register grf_type_sys in the
> aux_grf_table, the behavior is unchanged.
> 
> Signed-off-by: Daniele Briguglio <hello@superkali.me>
> ---
>  drivers/clk/rockchip/clk.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
> index e8b3b0b9a4f8..911e6b610618 100644
> --- a/drivers/clk/rockchip/clk.c
> +++ b/drivers/clk/rockchip/clk.c
> @@ -509,10 +509,9 @@ void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx,
>  		clk = NULL;
>  
>  		/* for GRF-dependent branches, choose the right grf first */
> -		if ((list->branch_type == branch_grf_mux ||
> -		     list->branch_type == branch_grf_gate ||
> -		     list->branch_type == branch_grf_mmc) &&
> -		    list->grf_type != grf_type_sys) {
> +		if (list->branch_type == branch_grf_mux ||
> +		    list->branch_type == branch_grf_gate ||
> +		    list->branch_type == branch_grf_mmc) {
>  			hash_for_each_possible(ctx->aux_grf_table, agrf, node, list->grf_type) {
>  				if (agrf->type == list->grf_type) {
>  					grf = agrf->grf;
> 
> 

Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

Kind regards,
Nicolas Frattaroli



  reply	other threads:[~2026-03-18 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 13:06 [PATCH 0/3] clk: rockchip: rk3588: add I2S MCLK output gate clocks Daniele Briguglio
2026-03-16 13:06 ` [PATCH 1/3] dt-bindings: clock: rockchip,rk3588-cru: add I2S MCLK output to IO clock IDs Daniele Briguglio
2026-03-17  7:40   ` Krzysztof Kozlowski
2026-03-16 13:06 ` [PATCH 2/3] clk: rockchip: allow grf_type_sys lookup in aux_grf_table Daniele Briguglio
2026-03-18 12:35   ` Nicolas Frattaroli [this message]
2026-03-16 13:06 ` [PATCH 3/3] clk: rockchip: rk3588: add GATE_GRF clocks for I2S MCLK output to IO Daniele Briguglio
2026-03-19  7:03   ` kernel test robot
2026-03-18  0:44 ` [PATCH 0/3] clk: rockchip: rk3588: add I2S MCLK output gate clocks Ricardo Pardini

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=13714918.O9o76ZdvQC@workhorse \
    --to=nicolas.frattaroli@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=hello@superkali.me \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --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