Commit 4f711675 authored by Marek Vasut's avatar Marek Vasut Committed by Marc Kleine-Budde

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: default avatarMarek Vasut <marex@denx.de>
Cc: Markus Marb <markus@marb.org>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 4cbdd0ee
...@@ -670,9 +670,9 @@ static void ifi_canfd_set_bittiming(struct net_device *ndev) ...@@ -670,9 +670,9 @@ static void ifi_canfd_set_bittiming(struct net_device *ndev)
priv->base + IFI_CANFD_FTIME); priv->base + IFI_CANFD_FTIME);
/* Configure transmitter delay */ /* Configure transmitter delay */
tdc = (dbt->brp * (dbt->phase_seg1 + 1)) & IFI_CANFD_TDELAY_MASK; tdc = dbt->brp * (dbt->prop_seg + dbt->phase_seg1);
writel(IFI_CANFD_TDELAY_EN | IFI_CANFD_TDELAY_ABS | tdc, tdc &= IFI_CANFD_TDELAY_MASK;
priv->base + IFI_CANFD_TDELAY); writel(IFI_CANFD_TDELAY_EN | tdc, priv->base + IFI_CANFD_TDELAY);
} }
static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id, static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment