[PATCH v2 0/4] R-Car CANFD Improvements

Biju posted 4 patches 1 month, 1 week ago
There is a newer version of this series
drivers/net/can/rcar/rcar_canfd.c | 89 ++++++++++++++++++-------------
1 file changed, 52 insertions(+), 37 deletions(-)
[PATCH v2 0/4] R-Car CANFD Improvements
Posted by Biju 1 month, 1 week ago
From: Biju Das <biju.das.jz@bp.renesas.com>

The calculation formula for nominal bit rate of classical CAN is same as
that of nominal bit rate of CANFD on the RZ/G3E SoC compared to other SoCs.
Add shared_bittiming variable to struct rcar_canfd_hw_info to handle this
difference.

Apart from this, for replacing function-like macros, introduced
rcar_canfd_compute_{nominal,data}_bit_rate_cfg().

v1->v2:
 * Dropped patch#2 as it is accepted.
 * Moved patch#4 to patch#2.
 * Updated commit header and description for patch#2.
 * Kept RCANFD_CFG* macro definitions to give a meaning to the magic
   number using GENMASK macro and used FIELD_PREP to extract value.
 * Split patch#3 for computing nominal  and data bit rate config separate.
 * Updated rcar_canfd_compute_nominal_bit_rate_cfg() to handle
   nominal bit rate configuration for both classical CAN and CANFD.
 * Replaced RCANFD_NCFG_NBRP->RCANFD_NCFG_NBRP_MASK and used FIELD_PREP to
   extract value.
 * Replaced RCANFD_DCFG_DBRP->RCANFD_DCFG_DBRP_MASK and used FIELD_PREP to
   extract value.

Biju Das (4):
  can: rcar_canfd: Add shared_bittiming variable to struct
    rcar_canfd_hw_info
  can: rcar_canfd: Update RCANFD_CFG_* macros
  can: rcar_canfd: Simplify nominal bit rate config
  can: rcar_canfd: Simplify data bit rate config

 drivers/net/can/rcar/rcar_canfd.c | 89 ++++++++++++++++++-------------
 1 file changed, 52 insertions(+), 37 deletions(-)

-- 
2.43.0