On 25.02.2025 15:40:47, Biju Das wrote: > R-Car Gen3 and Gen4 has some differences in the shift bits. Add a > shift table to handle these differences. After this drop the unused > functions reg_gen4() and is_gen4(). > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > --- > v3: > * New patch. > --- > drivers/net/can/rcar/rcar_canfd.c | 78 ++++++++++++++++++++++--------- > 1 file changed, 56 insertions(+), 22 deletions(-) > > diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c > index fcf5cb93f57c..09a9e548b022 100644 > --- a/drivers/net/can/rcar/rcar_canfd.c > +++ b/drivers/net/can/rcar/rcar_canfd.c [...] > +enum rcar_canfd_shift_id { > + FIRST_RNC_SH, /* Rule Number for Channel x */ > + SECOND_RNC_SH, /* Rule Number for Channel x + 1 */ > + NTSEG2_SH, /* Nominal Bit Rate Time Segment 2 Control */ > + NTSEG1_SH, /* Nominal Bit Rate Time Segment 1 Control */ > + NSJW_SH, /* Nominal Bit Rate Resynchronization Jump Width Control */ > + DTSEG2_SH, /* Data Bit Rate Time Segment 2 Control */ > + DTSEG1_SH, /* Data Bit Rate Time Segment 1 Control */ > + CFTML_SH, /* Common FIFO TX Message Buffer Link */ > + CFM_SH, /* Common FIFO Mode */ > + CFDC_SH, /* Common FIFO Depth Configuration */ > +}; Please add a common prefix to the enums, i.e. RCANFD_. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature