On 17.06.2021 01:16:52, Angelo Dureghello wrote: > Add flexcan support for NXP ColdFire mcf5441x family. > > This flexcan module is quite similar to imx6 flexcan module, but > with some exceptions: > > - 3 separate interrupt sources, MB, BOFF and ERR, > - implements 16 mb only, > - m68k architecture is not supporting devicetrees, so a > platform data check/case has been added, > - ColdFire is m68k, so big-endian cpu, with a little-endian flexcan > module. > > --- > Changes for v2: > - re-add platform data handling restarting from 2c0ac9208135 > - re-add flexcan_id_table, as from 2c0ac9208135 > - usinig irq resources for ERR and BOFF interrupts > - add missing free_irq() for interrupts > - minor syntax fixes > > Signed-off-by: Angelo Dureghello > --- > drivers/net/can/flexcan.c | 95 ++++++++++++++++++++++++++++++++++----- > 1 file changed, 84 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c > index 57f3635ad8d7..2188dc36a010 100644 > --- a/drivers/net/can/flexcan.c > +++ b/drivers/net/can/flexcan.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -246,6 +247,8 @@ > #define FLEXCAN_QUIRK_SUPPORT_ECC BIT(10) > /* Setup stop mode with SCU firmware to support wakeup */ > #define FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW BIT(11) > +/* Setup for flexcan module as in mcf, 16 mb, 3 separate interrupts */ > +#define FLEXCAN_QUIRK_SETUP_MCF BIT(12) Can you split this into QUIRK_NR_IRQ_3 and QUIRK_NR_MB_16. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |