MLK-15046-3 can: flexcan: make Message Buffer size and number dynamically
authorDong Aisheng <aisheng.dong@nxp.com>
Sat, 3 Jun 2017 08:11:21 +0000 (16:11 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:27:01 +0000 (15:27 -0500)
commit1fbe76c6e87e583f9399dbebbaa37571f9421041
tree7e365cacf5fdac1120f3d33ce98e295ad566bc2e
parent9d8a58b39eb5841df9f0c9c95bb6209c304e546b
MLK-15046-3 can: flexcan: make Message Buffer size and number dynamically

The Message Buffer size and number will change in new Flexcan IP
version supporting CAN FD protocol. Let's make them properties and
assigned dynamically.

And note that when CAN FD is enabled, the FlexCAN RAM is partitioned
in blocks of 512 bytes, there may be hole within the block.
Thus a help macro FLEXCAN_CANFD_MB_OFFSET is introduced to calculate
the internal MB address offset properly within the RAM block.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/net/can/flexcan.c