drivers: can: add NXP LPC MCAN front-end for the Bosch MCAN driver

Add a NXP LPC MCAN-specific front-end for the generic Bosch MCAN
driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
Henrik Brix Andersen 2021-05-31 22:18:48 +02:00 committed by Carles Cufí
commit 93c6b7413b
6 changed files with 319 additions and 7 deletions

View file

@ -1453,6 +1453,14 @@
#define CAN_MCAN_TXEFA_EFAI CAN_MCAN_TXEFA_EFAI_MSK
#endif /* CONFIG_CAN_STM32FD */
/*************** Bit definition for CAN_MCAN_MRBA register *****************/
#ifdef CONFIG_CAN_MCUX_MCAN
/* Event FIFO Acknowledge Index */
#define CAN_MCAN_MRBA_BA_POS (16U)
#define CAN_MCAN_MRBA_BA_MSK (0xFFFFUL << CAN_MCAN_MRBA_BA_POS)
#define CAN_MCAN_MRBA_BA CAN_MCAN_MRBA_BA_MSK
#endif /* CONFIG_CAN_MCUX_MCAN */
#ifdef CONFIG_CAN_STM32FD
struct can_mcan_reg {
volatile uint32_t crel; /* Core Release Register */
@ -1553,6 +1561,10 @@ struct can_mcan_reg {
volatile uint32_t txefc; /* Tx Event FIFO Configuration */
volatile uint32_t txefs; /* Tx Event FIFO Status */
volatile uint32_t txefa; /* Tx Event FIFO Acknowledge */
#ifdef CONFIG_CAN_MCUX_MCAN
volatile uint32_t res6[65]; /* Reserved (65) */
volatile uint32_t mrba; /* Message RAM Base Address */
#endif /* CONFIG_CAN_MCUX_MCAN */
};
#endif /* CONFIG_CAN_STM32FD */