Files
linux/drivers
Biju Das e9ffa12e02 can: rcar_canfd: Add rnc_field_width variable to struct rcar_canfd_hw_info
The shift and w value in rcar_canfd_setrnc() are dictated by the
field width:
  - R-Car Gen4 packs 2 values in a 32-bit word, using a field width
    of 16 bits,
  - R-Car Gen3 packs up to 4 values in a 32-bit word, using a field
    width of 8 bits.

Add rnc_field_width variable to struct rcar_canfd_hw_info to handle this
difference. The rnc_stride is 32 / rnc_field_width and the index parameter
w is calculated by ch / rnc_stride. The shift value in rcar_canfd_setrnc()
is computed by using (32 - (ch % rnc_stride + 1) * rnc_field_width).

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20250417054320.14100-10-biju.das.jz@bp.renesas.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-21 14:31:24 +02:00
..
2025-04-22 16:06:05 +09:00
2025-05-15 04:49:15 +03:00
2025-04-11 17:32:38 -07:00
2025-04-08 19:30:58 +02:00
2025-05-06 12:59:12 -06:00
2025-04-18 10:05:49 -04:00