can: ifi: Fix transmitter delay calculation
PATCH 1/1 can: ifi: Fix transmitter delay calculation
The CANFD transmitter delay calculation formula was updated in the latest software drop from IFI and improves the behavior of the IFI CANFD core during bitrate switching. Use the new formula to improve stability of the CANFD operation.
Signed-off-by Marek Vasut <[email protected]>
Cc Markus Marb <[email protected]>
Cc Marc Kleine-Budde <[email protected]>
--- drivers/net/can/ifi_canfd/ifi_canfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/can/ifi_canfd/ifi_canfd.c +3 -3
@@ -671,9 +671,9 @@ static void ifi_canfd_set_bittiming(struct net_device *ndev) priv->base + IFI_CANFD_FTIME);/* Configure transmitter delay */ - tdc = (dbt->brp * (dbt->phase_seg1 +1 )) &IFI_CANFD_TDELAY_MASK ; -writel (IFI_CANFD_TDELAY_EN |IFI_CANFD_TDELAY_ABS | tdc, - priv->base +IFI_CANFD_TDELAY ); + tdc = dbt->brp * (dbt->prop_seg + dbt->phase_seg1); + tdc &=IFI_CANFD_TDELAY_MASK ; +writel (IFI_CANFD_TDELAY_EN | tdc, priv->base +IFI_CANFD_TDELAY ); } static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id,
Signature · 1 line
2.11.0
Marc Kleine-Budde
maintainerQuoted 8 lines · Marek Vasut
The CANFD transmitter delay calculation formula was updated in the latest software drop from IFI and improves the behavior of the IFI CANFD core during bitrate switching. Use the new formula to improve stability of the CANFD operation.
Signed-off-by Marek Vasut <[email protected]>Cc Markus Marb <[email protected]>Cc Marc Kleine-Budde <[email protected]>
added to can.
Tnx,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |