Skip to content

Commit 100fafc

Browse files
bijudasmarckleinebudde
authored andcommitted
can: rcar_canfd: Update bit rate constants for RZ/G3E and R-Car Gen4
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>
1 parent f1880f9 commit 100fafc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/can/rcar/rcar_canfd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,10 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
19121912
priv->can.fd.do_get_auto_tdcv = rcar_canfd_get_auto_tdcv;
19131913
} else {
19141914
/* Controller starts in Classical CAN only mode */
1915-
priv->can.bittiming_const = &rcar_canfd_bittiming_const;
1915+
if (gpriv->info->shared_can_regs)
1916+
priv->can.bittiming_const = gpriv->info->nom_bittiming;
1917+
else
1918+
priv->can.bittiming_const = &rcar_canfd_bittiming_const;
19161919
priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING;
19171920
}
19181921

0 commit comments

Comments
 (0)