On Wed, Feb 09, 2022 at 05:38:03PM +0100, Ulrich Hecht wrote: > Adds support for the CANFD IP variant in the V3U SoC. > > Differences to controllers in other SoCs are limited to an increase in > the number of channels from two to eight, an absence of dedicated > registers for "classic" CAN mode, and a number of differences in magic > numbers (register offsets and layouts). > > Inspired by BSP patch by Kazuya Mizuguchi. > > Signed-off-by: Ulrich Hecht <uli+renesas@xxxxxxxx> Hi Ulrich, for some reason this caught by eye. > @@ -740,12 +784,16 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv, > RCANFD_GAFLECTR_AFLDAE)); > > /* Write number of rules for channel */ > - rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG0, > + rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG(ch), > RCANFD_GAFLCFG_SETRNC(ch, num_rules)); > - if (gpriv->fdmode) > - offset = RCANFD_F_GAFL_OFFSET; > - else > - offset = RCANFD_C_GAFL_OFFSET; > + if (is_v3u(gpriv)) { > + offset = RCANFD_V3U_GAFL_OFFSET; > + } else { > + if (gpriv->fdmode) > + offset = RCANFD_F_GAFL_OFFSET; > + else > + offset = RCANFD_C_GAFL_OFFSET; > + } nit: this could be: if (is_v3u(gpriv)) offset = RCANFD_V3U_GAFL_OFFSET; else if (gpriv->fdmode) offset = RCANFD_F_GAFL_OFFSET; else offset = RCANFD_C_GAFL_OFFSET; ...