aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2017-11-10 05:22:39 -0500
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-11-10 05:35:09 -0500
commit4f7116757b4bd99e4ef2636c7d957a6d63035d11 (patch)
tree646683ff5425c5687d2c747e454a8567f972b4f6
parent4cbdd0ee67191481ec57ceed94febdfef95c9f25 (diff)
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 <marex@denx.de> Cc: Markus Marb <markus@marb.org> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--drivers/net/can/ifi_canfd/ifi_canfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
index 4d1fe8d95042..2772d05ff11c 100644
--- a/drivers/net/can/ifi_canfd/ifi_canfd.c
+++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
@@ -670,9 +670,9 @@ static void ifi_canfd_set_bittiming(struct net_device *ndev)
670 priv->base + IFI_CANFD_FTIME); 670 priv->base + IFI_CANFD_FTIME);
671 671
672 /* Configure transmitter delay */ 672 /* Configure transmitter delay */
673 tdc = (dbt->brp * (dbt->phase_seg1 + 1)) & IFI_CANFD_TDELAY_MASK; 673 tdc = dbt->brp * (dbt->prop_seg + dbt->phase_seg1);
674 writel(IFI_CANFD_TDELAY_EN | IFI_CANFD_TDELAY_ABS | tdc, 674 tdc &= IFI_CANFD_TDELAY_MASK;
675 priv->base + IFI_CANFD_TDELAY); 675 writel(IFI_CANFD_TDELAY_EN | tdc, priv->base + IFI_CANFD_TDELAY);
676} 676}
677 677
678static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id, 678static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id,