mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] R-Car CANFD Improvements
@ 2025-09-08 12:09 Biju
  2025-09-08 12:09 ` [PATCH v3 1/4] can: rcar_canfd: Update bit rate constants for RZ/G3E and R-Car Gen4 Biju
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Biju @ 2025-09-08 12:09 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol, Geert Uytterhoeven, Magnus Damm
  Cc: Biju Das, linux-can, linux-renesas-soc, linux-kernel,
	Prabhakar Mahadev Lad, Biju Das

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 and R-Car Gen4
compared to other SoCs. Update the nominal bit rate constants.

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

v2->v3:
 * Replaced "shared_bittiming"->"shared_can_regs" as it is same for RZ/G3E
   and R-Car Gen4.
 * Updated commit header and description for patch#1.
 * Added Rb tag from Geert for patch #2,#3 and #4.
 * Dropped _MASK suffix from RCANFD_CFG_* macros.
 * Dropped _MASK suffix from RCANFD_NCFG_NBRP_MASK macro.
 * Dropped _MASK suffix from the macro RCANFD_DCFG_DBRP_MASK.
 * Followed the order as used in struct can_bittiming{_const} for easy
   maintenance.
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: Update bit rate constants for RZ/G3E and R-Car Gen4
  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 | 84 +++++++++++++++++--------------
 1 file changed, 47 insertions(+), 37 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-10 12:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-08 12:09 [PATCH v3 0/4] R-Car CANFD Improvements Biju
2025-09-08 12:09 ` [PATCH v3 1/4] can: rcar_canfd: Update bit rate constants for RZ/G3E and R-Car Gen4 Biju
2025-09-10  9:04   ` Geert Uytterhoeven
2025-09-10 10:49     ` Biju Das
2025-09-10 11:44       ` Geert Uytterhoeven
2025-09-10 11:58         ` Marc Kleine-Budde
2025-09-08 12:09 ` [PATCH v3 2/4] can: rcar_canfd: Update RCANFD_CFG_* macros Biju
2025-09-08 12:09 ` [PATCH v3 3/4] can: rcar_canfd: Simplify nominal bit rate config Biju
2025-09-08 12:09 ` [PATCH v3 4/4] can: rcar_canfd: Simplify data " Biju
2025-09-10 12:01 ` [PATCH v3 0/4] R-Car CANFD Improvements Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®