drivers: can: mcan: remove unused message marker split
The Bosch M_CAN Message Marker, an 8-bit field copied from Tx Buffer elements to Tx Event FIFO elements to aid software in identifying Tx frame status, need not be split into an index and a count, as the count is unused. Remove this split and replace "struct can_mcan_mm" with a simple "uint8_t". Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
d452a0043d
commit
d112e08f0c
2 changed files with 4 additions and 14 deletions
|
@ -500,7 +500,7 @@ static void can_mcan_tc_event_handler(const struct device *dev)
|
|||
return;
|
||||
}
|
||||
|
||||
tx_idx = tx_event.mm.idx;
|
||||
tx_idx = tx_event.mm;
|
||||
|
||||
/* Acknowledge TX event */
|
||||
err = can_mcan_write_reg(dev, CAN_MCAN_TXEFA, event_idx);
|
||||
|
@ -817,7 +817,6 @@ int can_mcan_send(const struct device *dev, const struct can_frame *frame, k_tim
|
|||
#endif /* !CONFIG_CAN_FD_MODE */
|
||||
.efc = 1U,
|
||||
};
|
||||
struct can_mcan_mm mm;
|
||||
uint32_t put_idx;
|
||||
uint32_t reg;
|
||||
int err;
|
||||
|
@ -894,10 +893,7 @@ int can_mcan_send(const struct device *dev, const struct can_frame *frame, k_tim
|
|||
k_mutex_lock(&data->tx_mtx, K_FOREVER);
|
||||
|
||||
put_idx = FIELD_GET(CAN_MCAN_TXFQS_TFQPI, reg);
|
||||
|
||||
mm.idx = put_idx;
|
||||
mm.cnt = data->mm.cnt++;
|
||||
tx_hdr.mm = mm;
|
||||
tx_hdr.mm = put_idx;
|
||||
|
||||
if ((frame->flags & CAN_FRAME_IDE) != 0U) {
|
||||
tx_hdr.ext_id = frame->id;
|
||||
|
|
|
@ -607,11 +607,6 @@ struct can_mcan_rx_fifo {
|
|||
};
|
||||
} __packed __aligned(4);
|
||||
|
||||
struct can_mcan_mm {
|
||||
uint8_t idx: 5;
|
||||
uint8_t cnt: 3;
|
||||
} __packed;
|
||||
|
||||
struct can_mcan_tx_buffer_hdr {
|
||||
union {
|
||||
struct {
|
||||
|
@ -632,7 +627,7 @@ struct can_mcan_tx_buffer_hdr {
|
|||
uint8_t fdf: 1; /* FD Format */
|
||||
uint8_t res2: 1; /* Reserved */
|
||||
uint8_t efc: 1; /* Event FIFO control (Store Tx events) */
|
||||
struct can_mcan_mm mm; /* Message marker */
|
||||
uint8_t mm; /* Message marker */
|
||||
} __packed __aligned(4);
|
||||
|
||||
struct can_mcan_tx_buffer {
|
||||
|
@ -657,7 +652,7 @@ struct can_mcan_tx_event_fifo {
|
|||
uint8_t brs: 1; /* Bit Rate Switch */
|
||||
uint8_t fdf: 1; /* FD Format */
|
||||
uint8_t et: 2; /* Event type */
|
||||
struct can_mcan_mm mm; /* Message marker */
|
||||
uint8_t mm; /* Message marker */
|
||||
} __packed __aligned(4);
|
||||
|
||||
#define CAN_MCAN_FCE_DISABLE 0x0
|
||||
|
@ -730,7 +725,6 @@ struct can_mcan_data {
|
|||
uint16_t ext_filt_fd_frame;
|
||||
uint16_t ext_filt_rtr;
|
||||
uint16_t ext_filt_rtr_mask;
|
||||
struct can_mcan_mm mm;
|
||||
bool started;
|
||||
#ifdef CONFIG_CAN_FD_MODE
|
||||
bool fd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue