dts: bindings: can: mcan: switch to using bosch,mram-cfg property
Switch the Bosch M_CAN devicetree binding to use a bosch,mram-cfg property for specifying the memory layout of the Bosch M_CAN Message RAM. This is identical to the Linux kernel devicetree binding for Bosch M_CAN IP core based CAN controllers. This introduces an offset cell which can be used for controllers with shared Message RAM between Bosch M_CAN instances. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
c52499e447
commit
6cd67e67fe
12 changed files with 35 additions and 86 deletions
|
@ -389,12 +389,13 @@
|
|||
#define MCAN_DT_PATH DT_PATH(soc, can)
|
||||
#endif
|
||||
|
||||
#define NUM_STD_FILTER_ELEMENTS DT_PROP(MCAN_DT_PATH, std_filter_elements)
|
||||
#define NUM_EXT_FILTER_ELEMENTS DT_PROP(MCAN_DT_PATH, ext_filter_elements)
|
||||
#define NUM_RX_FIFO0_ELEMENTS DT_PROP(MCAN_DT_PATH, rx_fifo0_elements)
|
||||
#define NUM_RX_FIFO1_ELEMENTS DT_PROP(MCAN_DT_PATH, rx_fifo0_elements)
|
||||
#define NUM_RX_BUF_ELEMENTS DT_PROP(MCAN_DT_PATH, rx_buffer_elements)
|
||||
#define NUM_TX_BUF_ELEMENTS DT_PROP(MCAN_DT_PATH, tx_buffer_elements)
|
||||
#define NUM_STD_FILTER_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 1)
|
||||
#define NUM_EXT_FILTER_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 2)
|
||||
#define NUM_RX_FIFO0_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 3)
|
||||
#define NUM_RX_FIFO1_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 4)
|
||||
#define NUM_RX_BUF_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 5)
|
||||
#define NUM_TX_EVENT_FIFO_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 6)
|
||||
#define NUM_TX_BUF_ELEMENTS DT_PROP_BY_IDX(MCAN_DT_PATH, bosch_mram_cfg, 7)
|
||||
|
||||
#ifdef CONFIG_CAN_STM32FD
|
||||
#define NUM_STD_FILTER_DATA CONFIG_CAN_MAX_STD_ID_FILTER
|
||||
|
@ -529,7 +530,7 @@ struct can_mcan_msg_sram {
|
|||
volatile struct can_mcan_rx_fifo rx_fifo0[NUM_RX_FIFO0_ELEMENTS];
|
||||
volatile struct can_mcan_rx_fifo rx_fifo1[NUM_RX_FIFO1_ELEMENTS];
|
||||
volatile struct can_mcan_rx_fifo rx_buffer[NUM_RX_BUF_ELEMENTS];
|
||||
volatile struct can_mcan_tx_event_fifo tx_event_fifo[NUM_TX_BUF_ELEMENTS];
|
||||
volatile struct can_mcan_tx_event_fifo tx_event_fifo[NUM_TX_EVENT_FIFO_ELEMENTS];
|
||||
volatile struct can_mcan_tx_buffer tx_buffer[NUM_TX_BUF_ELEMENTS];
|
||||
} __packed __aligned(4);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue