can: rcar_canfd: Fix R-Car V3U GAFLCFG field accesses
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 23 Jan 2023 18:56:07 +0000 (19:56 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Feb 2023 16:28:09 +0000 (17:28 +0100)
commit9be8c5583581244d8a77e41afa16b8b0a5ddabc0
treef35210063329a32aae15d0e66021caf5870727bd
parent0a016639ef92b28eb74ba4fed21bee1f1328513a
can: rcar_canfd: Fix R-Car V3U GAFLCFG field accesses

Each Global Acceptance Filter List Configuration Register (GAFLCFG)
contains two fields, and stores the number of channel rules for one
channel pair.

As R-Car V3U and later can have more than 2 channels, the field
selection should be based on the LSB (even or odd) of the channel
number, instead of on the full channel number.

Fixes: 45721c406dcf50d4 ("can: rcar_canfd: Add support for r8a779a0 SoC")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/all/36bcf0ffb96d6aaed970751f9546b901af638bcf.1674499048.git.geert+renesas@glider.be
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/rcar/rcar_canfd.c