OSDN Git Service

can: mcp251xfd: add dev coredump support
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 23 Dec 2020 15:50:25 +0000 (16:50 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 30 Mar 2021 09:14:49 +0000 (11:14 +0200)
commite0ab3dd5f98fcca95a8290578833552e496fabaf
tree647ea33d2d395b1e87db22147fb6349b6bc2c76f
parent6c23fe67e8dc825ef2fd34d1dac12fc970140a8b
can: mcp251xfd: add dev coredump support

For easier debugging this patch adds dev coredump support to the
driver. A dev coredump is generated in case the chip fails to start or
an error in the interrupt handler is detected.

The dev coredump consists of all chip registers and chip memory, as
well as the driver's internal state of the TEF-, RX- and TX-FIFOs, it
can be analyzed with the mcp251xfd-dump tool of the can-utils:

https://github.com/linux-can/can-utils/tree/master/mcp251xfd
Link: https://lore.kernel.org/r/20210304160328.2752293-2-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/Kconfig
drivers/net/can/spi/mcp251xfd/Makefile
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
drivers/net/can/spi/mcp251xfd/mcp251xfd-dump.c [new file with mode: 0644]
drivers/net/can/spi/mcp251xfd/mcp251xfd-dump.h [new file with mode: 0644]
drivers/net/can/spi/mcp251xfd/mcp251xfd.h