linux/drivers/net/can
Mario Huettel b03cfc5bb0 can: m_can: Enable M_CAN version dependent initialization
This patch adapts the initialization of the M_CAN. So it can be used
with all versions >= 3.0.x.

Changes:
* Added version element to m_can_priv structure to hold M_CAN version.
* Renamed bittiming structs for version 3.0.x
* Added new bittiming structs for version >= 3.1.x
* Function alloc_m_can_dev takes 2 new arguments. The TX FIFO size and the
  base address of the module.
* Chip configuration for CAN_CTRLMODE_LOOPBACK is changed: Enabled
  CCCR_MON bit. In combination with TEST_LBCK it activates the internal
  loopback mode. Leaving CCCR_MON '0' results in external loopback mode.
* Clocks are temporarily enabled by platform_propbe function in order to
  allow read access to the Core Release register and the Control Register.
  Registers are used to detect M_CAN version and optional Non-ISO Feature.

Initialization of M_CAN for version >= 3.1.x:
* TX FIFO of M_CAN is used to transmit frames. The driver does not need to
  stop the tx queue after each frame sent.
* Initialization of TX Event FIFO is added.
* NON-ISO is fixed for all M_CAN versions < 3.2.x. Version 3.2.x _can_ have
  the NISO (Non-ISO) bit which can switch the mode of the M_CAN to Non-ISO
  mode. This bit does not have to be writeable. Therefore it is checked.
  If it is writable Non-ISO support is added to the controllers supported
  CAN modes.

New Functions:
* Function to check the Core Release version. The read value determines the
  behaviour of the driver.
* Function to check if the NISO bit for version >= 3.2.x is implemented.

Signed-off-by: Mario Huettel <mario.huettel@gmx.net>
Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2017-04-25 09:00:47 +02:00
..
c_can drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
cc770 can: fix assignment of error location in CAN error messages 2015-11-23 09:37:34 +01:00
ifi_canfd can: ifi: use correct register to read rx status 2017-04-04 17:48:22 +02:00
m_can can: m_can: Enable M_CAN version dependent initialization 2017-04-25 09:00:47 +02:00
mscan treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
peak_canfd can: peak: add support for PEAK PCAN-PCIe FD CAN-FD boards 2017-04-25 09:00:45 +02:00
rcar can: rcar_can: Do not print virtual addresses 2017-04-04 17:49:59 +02:00
sja1000 can: sja1000: plx_pci: Add support for Moxa CAN devices 2016-10-31 20:48:19 +01:00
softing sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
spi can: hi311x: Add Holt HI-311x CAN driver 2017-04-04 17:35:59 +02:00
usb can: peak: move header file to new can common subdir 2017-04-25 09:00:44 +02:00
at91_can.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
bfin_can.c can: remove obsolete assignment for CAN protocol error type 2015-11-23 09:37:38 +01:00
dev.c can: dev: add CAN interface API for fixed bitrates 2017-01-24 13:52:00 +01:00
flexcan.c can: flexcan: fix typo in comment 2017-03-03 13:00:07 +01:00
grcan.c docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
janz-ican3.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
Kconfig can: peak: add support for PEAK PCAN-PCIe FD CAN-FD boards 2017-04-25 09:00:45 +02:00
led.c can: add combined rx/tx LED trigger support 2015-03-22 23:50:11 +01:00
Makefile can: peak: add support for PEAK PCAN-PCIe FD CAN-FD boards 2017-04-25 09:00:45 +02:00
pch_can.c can: fix assignment of error location in CAN error messages 2015-11-23 09:37:34 +01:00
rx-offload.c can: rx-offload: Add support for timestamp based irq offloading 2017-02-06 15:13:24 +01:00
slcan.c can: slcan: Replace sizeof struct can_frame with CAN_MTU 2016-06-17 15:39:42 +02:00
sun4i_can.c can: remove obsolete assignment for CAN protocol error type 2015-11-23 09:37:38 +01:00
ti_hecc.c can: ti_hecc: Convert TI HECC driver to DT only driver 2017-04-04 16:55:26 +02:00
vcan.c can: replace timestamp as unique skb attribute 2015-07-12 21:13:22 +02:00
xilinx_can.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00