Re: [PATCH v2 5/5] can: flexcan: add mcf5441x support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marc,

On 17/06/21 9:38 PM, Marc Kleine-Budde wrote:
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 <angelo@xxxxxxxxxxxxxxxx>
---
  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 <linux/of_device.h>
  #include <linux/pinctrl/consumer.h>
  #include <linux/platform_device.h>
+#include <linux/can/platform/mcf5441x.h>
  #include <linux/pm_runtime.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
@@ -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.


done

Marc


--
Angelo Dureghello
+++ kernelspace +++
+E: angelo AT kernel-space.org
+W: www.kernel-space.org



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux