]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
can: rcar_canfd: Update bit rate constants for RZ/G3E and R-Car Gen4
authorBiju Das <biju.das.jz@bp.renesas.com>
Mon, 8 Sep 2025 12:09:30 +0000 (13:09 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 13 Sep 2025 17:06:52 +0000 (19:06 +0200)
The calculation formula for nominal bit rate of classical CAN is the same as
that of nominal bit rate of CANFD on the RZ/G3E and R-Car Gen4 SoCs
compared to other SoCs. Update nominal bit rate constants.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20250908120940.147196-2-biju.das.jz@bp.renesas.com
[mkl: slightly improve wording of commit message]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/rcar/rcar_canfd.c

index b3c8c592fb0e04edfef30989c3df659ad772a80f..4185fc5b4a70651acd7d0907cf28ecc7dc24bb06 100644 (file)
@@ -1912,7 +1912,10 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
                priv->can.fd.do_get_auto_tdcv = rcar_canfd_get_auto_tdcv;
        } else {
                /* Controller starts in Classical CAN only mode */
-               priv->can.bittiming_const = &rcar_canfd_bittiming_const;
+               if (gpriv->info->shared_can_regs)
+                       priv->can.bittiming_const = gpriv->info->nom_bittiming;
+               else
+                       priv->can.bittiming_const = &rcar_canfd_bittiming_const;
                priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING;
        }