Skip to contentSkip to conversation

clk: renesas: r9a08g046: Propagate clk rate for ETH TX mux clocks

PATCH Applied Biju Das 3 participants 4 messages Sep 14 – Oct 31

Subsystems (2)
lore
Share & tools
lore

Biju Das

author
#0 lore raw

PATCH 1/1 clk: renesas: r9a08g046: Propagate clk rate for ETH TX mux clocks

Add CLK_SET_RATE_PARENT flag to the sel_eth0_tx and sel_eth1_tx mux clocks so that rate-setting requests on these clocks propagate up to their parent clocks. Without this flag, a clk_set_rate() call on the downstream GBETH clocks has no effect on the actual PLL/divider chain feeding the TX clock, leaving the requested rate unapplied.

Fixes d55a0dfec40b ("clk: renesas: r9a08g046: Add GBETH clocks and resets")
---
 drivers/clk/renesas/r9a08g046-cpg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/clk/renesas/r9a08g046-cpg.c +4 -2
index 2c5ca5ab5f57..92c76c4a1e89 100644
@@ -307,10 +307,12 @@ static const struct cpg_core_clk r9a08g046_core_clks[] __initconst = {
 	DEF_MUX(".sel_rspi0", CLK_SEL_RSPI0, G3L_SEL_RSPI0, sel_rsci_rspi),
 	DEF_MUX(".sel_rspi1", CLK_SEL_RSPI1, G3L_SEL_RSPI1, sel_rsci_rspi),
 	DEF_MUX(".sel_rspi2", CLK_SEL_RSPI2, G3L_SEL_RSPI2, sel_rsci_rspi),
-	DEF_MUX(".sel_eth0_tx", CLK_SEL_ETH0_TX, G3L_SEL_ETH0_TX, sel_eth0_tx),
+	DEF_MUX_FLAGS(".sel_eth0_tx", CLK_SEL_ETH0_TX, G3L_SEL_ETH0_TX, sel_eth0_tx,
+		      CLK_SET_RATE_PARENT),
 	DEF_MUX(".sel_eth0_rx", CLK_SEL_ETH0_RX, G3L_SEL_ETH0_RX, sel_eth0_rx),
 	DEF_MUX(".sel_eth0_rm", CLK_SEL_ETH0_RM, G3L_SEL_ETH0_RM, sel_eth0_rm),
-	DEF_MUX(".sel_eth1_tx", CLK_SEL_ETH1_TX, G3L_SEL_ETH1_TX, sel_eth1_tx),
+	DEF_MUX_FLAGS(".sel_eth1_tx", CLK_SEL_ETH1_TX, G3L_SEL_ETH1_TX, sel_eth1_tx,
+		      CLK_SET_RATE_PARENT),
 	DEF_MUX(".sel_eth1_rx", CLK_SEL_ETH1_RX, G3L_SEL_ETH1_RX, sel_eth1_rx),
 	DEF_MUX(".sel_eth1_rm", CLK_SEL_ETH1_RM, G3L_SEL_ETH1_RM, sel_eth1_rm),
 	DEF_DIV(".div_eth0_tr", CLK_ETH0_TR, CLK_PLL6, G3L_SDIV_ETH_A, dtable_4_200),
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Biju Das

Add CLK_SET_RATE_PARENT flag to the sel_eth0_tx and sel_eth1_tx mux clocks so that rate-setting requests on these clocks propagate up to their parent clocks. Without this flag, a clk_set_rate() call on the downstream GBETH clocks has no effect on the actual PLL/divider chain feeding the TX clock, leaving the requested rate unapplied.

Fixes d55a0dfec40b ("clk: renesas: r9a08g046: Add GBETH clocks and resets")

i.e. will queue in renesas-clk for v7.4.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author
#2 lore raw
In reply to Biju Das

Hi Greg/Sasha,

Sorry, I missed adding Cc: <[email protected]> for the below Fixes commit

Commit e018c27e6052 "clk: renesas: r9a08g046: Propagate clk rate for ETH TX mux clocks" in Linux-next.

So, can it be backported to 7.3 and stable kernels?

Cheers,
Biju

Quoted 37 lines

-----Original Message-----
From: Biju Das <[email protected]>
Sent: 14 September 2026 17:50
Subject: [PATCH] clk: renesas: r9a08g046: Propagate clk rate for ETH TX mux clocks

Add CLK_SET_RATE_PARENT flag to the sel_eth0_tx and sel_eth1_tx mux clocks so that rate-setting requests on these clocks propagate up to their parent clocks. Without this flag, a clk_set_rate() call on the downstream GBETH clocks has no effect on the actual PLL/divider chain feeding the TX clock, leaving the requested rate unapplied.

Fixes d55a0dfec40b ("clk: renesas: r9a08g046: Add GBETH clocks and resets")
---
 drivers/clk/renesas/r9a08g046-cpg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/clk/renesas/r9a08g046-cpg.c +4 -3
index 2c5ca5ab5f57..92c76c4a1e89 100644
@@ -307,10 +307,12 @@ static const struct cpg_core_clk r9a08g046_core_clks[] __initconst = {
 	DEF_MUX(".sel_rspi0", CLK_SEL_RSPI0, G3L_SEL_RSPI0, sel_rsci_rspi),
 	DEF_MUX(".sel_rspi1", CLK_SEL_RSPI1, G3L_SEL_RSPI1, sel_rsci_rspi),
 	DEF_MUX(".sel_rspi2", CLK_SEL_RSPI2, G3L_SEL_RSPI2, sel_rsci_rspi),
-	DEF_MUX(".sel_eth0_tx", CLK_SEL_ETH0_TX, G3L_SEL_ETH0_TX, sel_eth0_tx),
+	DEF_MUX_FLAGS(".sel_eth0_tx", CLK_SEL_ETH0_TX, G3L_SEL_ETH0_TX, sel_eth0_tx,
+		      CLK_SET_RATE_PARENT),
 	DEF_MUX(".sel_eth0_rx", CLK_SEL_ETH0_RX, G3L_SEL_ETH0_RX, sel_eth0_rx),
 	DEF_MUX(".sel_eth0_rm", CLK_SEL_ETH0_RM, G3L_SEL_ETH0_RM, sel_eth0_rm),
-	DEF_MUX(".sel_eth1_tx", CLK_SEL_ETH1_TX, G3L_SEL_ETH1_TX, sel_eth1_tx),
+	DEF_MUX_FLAGS(".sel_eth1_tx", CLK_SEL_ETH1_TX, G3L_SEL_ETH1_TX, sel_eth1_tx,
+		      CLK_SET_RATE_PARENT),
 	DEF_MUX(".sel_eth1_rx", CLK_SEL_ETH1_RX, G3L_SEL_ETH1_RX, sel_eth1_rx),
 	DEF_MUX(".sel_eth1_rm", CLK_SEL_ETH1_RM, G3L_SEL_ETH1_RM, sel_eth1_rm),
 	DEF_DIV(".div_eth0_tr", CLK_ETH0_TR, CLK_PLL6, G3L_SDIV_ETH_A, dtable_4_200),
--

2.43.0

#3 lore raw
Quoted 9 lines · Biju Das

Hi Greg/Sasha,

Sorry, I missed adding Cc: <[email protected]> for the below Fixes commit

Commit e018c27e6052 "clk: renesas: r9a08g046: Propagate clk rate for ETH TX mux clocks" in Linux-next.

So, can it be backported to 7.3 and stable kernels?

Applied to 7.3.y now, thanks.

greg k-h