can: flexcan: add CAN-FD mode support
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Fri, 12 Jul 2019 08:02:44 +0000 (08:02 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 22 Sep 2020 14:53:47 +0000 (16:53 +0200)
commiteadf6ca918f6963cd8f3575a2f328018e1a16443
treec789c7c4b1eff88b042e49dcf963dfc3749e6a1d
parentd9b90b05fd78f7a7482ee22a6a6c5581695b4beb
can: flexcan: add CAN-FD mode support

This patch adds CAN-FD mode support to the driver, it means that
payload size can extend up to 64 bytes.

Bit timing always set in the CBT register, not in the CTRL1 register any
more. This has an extend range of all CAN bit timing variables (PRESDIV,
PROPSEG, PSEG1, PSEG2 and RJW), which will improve the bit timing
accuracy.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
[mkl: move cbt-based bitrate support into separate function]
Link: https://lore.kernel.org/r/20200922144429.2613631-16-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c