can: flexcan: introduce struct flexcan_priv::tx_mask and make use of it
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 1 Mar 2019 12:54:19 +0000 (13:54 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 11 Nov 2019 20:58:11 +0000 (21:58 +0100)
commit0ca64f02de380e0b75b9555d325e6dcfe36470ef
treed231f724025f7a7981bfe0474ba37d871324cc90
parent8ce5139e3db829d53c2f33ff812cea4f1f075e9c
can: flexcan: introduce struct flexcan_priv::tx_mask and make use of it

The current driver uses FLEXCAN_IFLAG2_MB() to generate the mask to check for
the TX complete interrupt. This works well, as the driver will always use the
last mailbox for TX, which falls into the iflag2 register.

To support CANFD the payload size has to increase to 64 bytes and the
number of mailboxes will decrease so much that the TX mailbox will be
handled in the iflag1 register.

This patch introduces a tx_mask in the struct flexcan_priv (similar to rx_mask)
and makes use of it. The actual support to handle the TX mailbox in iflag1 will
be added in the next patches.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c