mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
can: m_can: m_can_chip_config(): actually enable internal timestamping
commit5b12933de4
upstream. In commitdf06fd6782
("can: m_can: m_can_chip_config(): enable and configure internal timestamps") the timestamping in the m_can core should be enabled. In peripheral mode, the RX'ed CAN frames, TX compete frames and error events are sorted by the timestamp. The above mentioned commit however forgot to enable the timestamping. Add the missing bits to enable the timestamp counter to the write of the Timestamp Counter Configuration register. Link: https://lore.kernel.org/all/20220612212708.4081756-1-mkl@pengutronix.de Fixes:df06fd6782
("can: m_can: m_can_chip_config(): enable and configure internal timestamps") Cc: <stable@vger.kernel.org> # 5.13 Cc: Torin Cooper-Bennun <torin@maxiluxsystems.com> Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@samsung.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0e60230bc6
commit
f4d90e9c95
@ -1367,7 +1367,9 @@ static void m_can_chip_config(struct net_device *dev)
|
||||
/* enable internal timestamp generation, with a prescalar of 16. The
|
||||
* prescalar is applied to the nominal bit timing
|
||||
*/
|
||||
m_can_write(cdev, M_CAN_TSCC, FIELD_PREP(TSCC_TCP_MASK, 0xf));
|
||||
m_can_write(cdev, M_CAN_TSCC,
|
||||
FIELD_PREP(TSCC_TCP_MASK, 0xf) |
|
||||
FIELD_PREP(TSCC_TSS_MASK, TSCC_TSS_INTERNAL));
|
||||
|
||||
m_can_config_endisable(cdev, false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user