Skip to contentSkip to conversation

can: m_can: various regmask-related cleanup

PATCH New Torin Cooper-Bennun 1 participant 1 message May 4, 2021 CAN network drivers

lore
Share & tools
lore
#0 lore raw

cover can: m_can: various regmask-related cleanup

Dear all,

The first patch modernises m_can.c to use the proper masking macros provided in bits.h (namely GENMASK, FIELD_{GET,PREP,MAX}) to make the M_CAN driver more maintainable and readable.

We then clean up the CCCR regmask definitions, to make the differences between M_CAN spec revisions clearer.

TX and RX buffer size configuration is made more explicit, rather than just writing 0x777 to a register to set all buffer sizes to 64 bytes.

Finally, minor whitespace edits to a few comments.

Cheers,

Torin
maxiluxsystems.com