On 12.11.2026 15:39:39, claudiu beznea wrote:
quoted
quoted
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index bb2d03b75142a..4f5cdfa8211da 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -2312,7 +2312,7 @@ static int rcar_canfd_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, gpriv);
dev_info(dev, "global operational state (%s clk, %s mode)\n",
- gpriv->extclk ? "ext" : "canfd",
+ gpriv->extclk ? "can_clk" : (info->fcan_pclk ? "fck" : "canfd"),
Is the right name printed when can_clk is in use on hardware where
external_clk is 0?
gpriv->extclk does not record which DT clock was picked. In the branch
that uses "can_clk", it is copied from the hw_info flag that controls
the GCFG DCS bit:
drivers/net/can/rcar/rcar_canfd.c:rcar_canfd_probe() {
...
} else {
fcan_freq = clk_get_rate(gpriv->can_clk);
gpriv->extclk = gpriv->info->external_clk;
}
...
}
r9a09g047_hw_info has:
.external_clk = 0,
.fcan_pclk = 0,
RZ/G3E uses this hw_info, and so do RZ/V2N and RZ/V2H through the
r9a09g047 fallback compatible. Their device trees (r9a09g047.dtsi,
r9a09g056.dtsi and r9a09g057.dtsi) only list:
clock-names = "fck", "ram_clk", "can_clk";
On these SoCs, devm_clk_get_optional(dev, "can_clk") returns a clock
with a non-zero rate, so the else branch runs. extclk then ends up
false, and the message prints "canfd clk".
None of those device trees has a "canfd" clock, so a successful probe on
these SoCs can only have used "can_clk".
RZ/G3E, RZ/V2H, RZ/V2N have input clocks named in the HW manual as pclk,
clk_ram and canfd. These are described in [1] page 3365, [2] page 3286, [3]
page 3160.
All these have external_clk = 0, fcan_pclk = 0 and the patch here will print
"canfd clk" for them, as it is actually defined in HW, and as the previous
code did.
It is true the commit message mentions it uses DT binding clock names. Maybe
that should be amended.
With the current binding names and various usage of it across different SoCs
I'm not sure we can use binding names for all the cases.
Please let me know how would you like me to proceed.
I think it's fine. Let's see what the netdev people say :)
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |