]> git.baikalelectronics.ru Git - kernel.git/commit
can: mcp251xfd: ram: add helper function for runtime ring size calculation
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 22 Oct 2021 17:11:57 +0000 (19:11 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 13 Mar 2022 08:45:35 +0000 (09:45 +0100)
commita1439a5add6266ae1c02d2ef60c188ae16f4384a
tree41ba71be68c604380c7dcdcff2c1de57c1abf4de
parentc47675b11ba12a2369bbc562f9acb5e84a37951e
can: mcp251xfd: ram: add helper function for runtime ring size calculation

This patch adds a helper function to calculate the ring configuration
of the controller based on various constraints, like available RAM,
size of RX and TX objects, CAN-mode, number of FIFOs and FIFO depth.

Link: https://lore.kernel.org/20220313083640.501791-3-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/Makefile
drivers/net/can/spi/mcp251xfd/mcp251xfd-ram.c [new file with mode: 0644]
drivers/net/can/spi/mcp251xfd/mcp251xfd-ram.h [new file with mode: 0644]