History log of /linux-master/drivers/net/can/spi/mcp251xfd/mcp251xfd-timestamp.c
Revision Date Author Comments
# b2fcc707 09-Aug-2021 Marc Kleine-Budde <mkl@pengutronix.de>

can: mcp251xfd: mark some instances of struct mcp251xfd_priv as const

With the patch 07ff4aed015c ("time/timecounter: Mark 1st argument of
timecounter_cyc2time() as const") some instances of the struct
mcp251xfd_priv can be marked as const. This patch marks these as
const.

Link: https://lore.kernel.org/r/20210813091027.159379-1-mkl@pengutronix.de
Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: Thomas Kopp <thomas.kopp@microchip.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>


# efd8d98d 02-Mar-2021 Marc Kleine-Budde <mkl@pengutronix.de>

can: mcp251xfd: add HW timestamp infrastructure

This patch add the HW timestamping infrastructure. The mcp251xfd has a
free running timer of 32 bit width, running at max 40MHz, which wraps
around every 107 seconds. The current timestamp is latched into RX and
TEF objects automatically be the CAN controller.

This patch sets up a cyclecounter, timecounter and delayed worker
infrastructure (which runs every 45 seconds) to convert the timer into
a proper 64 bit based ns timestamp.

Link: https://lore.kernel.org/r/20210304160328.2752293-6-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>