Re: [PATCH 08/10] can: grcan: Add saving and restoring of CAN FD baud-rate registers

From: Arun Muthusamy

Date: Thu Dec 11 2025 - 04:21:00 EST


Thank you for your suggestion.

From the design point of view, I prefer to retain the "do_set_bittiming" callback to maintain flexibility in adjusting baud rates by the framework. Since CAN and CANFD configurations differ as they use different registers for timing configuration and Specifically, the timing configuration is closely tied to the reset logic only in scenarios where the baud rate for CANFD is stored in a register. This differentiation is not applicable to CAN timing configuration, as CAN and CANFD are handled differently.

--
BR,

Arun Muthusamy
Software Engineer
Frontgrade Gaisler
T : +46 (0) 700 558 528
arun.muthusamy@xxxxxxxxxxx

Frontgrade Gaisler AB, Kungsgatan 12, SE-411 19 GÖTEBORG, Sweden.
+46 (0) 31 775 8650, www.gaisler.com

On 21.11.2025 13:50, Marc Kleine-Budde wrote:
On 18.11.2025 10:21:13, Arun Muthusamy wrote:
From: Daniel Hellstrom <daniel@xxxxxxxxxxx>

While reset the GRCAN baud-rates are preserved, since GRCANFD has the
baud-rate in different registers we need to add saving of those
registers too.

What about removing the do_set_bittiming callback

priv->can.do_set_bittiming = grcan_set_bittiming;

and calling grcan_set_bittiming() explicitly after the reset?

regards,
Marc