Skip to content

Commit

Permalink
Merge tag 'linux-can-next-for-5.20-20220625' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2022-06-25

this is a pull request of 22 patches for net-next/master.

The first 2 patches target the xilinx driver. Srinivas Neeli's patch
adds Transmitter Delay Compensation (TDC) support, a patch by me fixes
a typo.

The next patch is by me and fixes a typo in the m_can driver.

Another patch by me allows the configuration of fixed bit rates
without need for do_set_bittiming callback.

The following 7 patches are by Vincent Mailhol and refactor the
can-dev module and Kbuild, de-inline the can_dropped_invalid_skb()
function, which has grown over the time, and drop outgoing skbs if the
controller is in listen only mode.

Max Staudt's patch fixes a reference in the networking/can.rst
documentation.

Vincent Mailhol provides 2 patches with cleanups for the etas_es58x
driver.

Conor Dooley adds bindings for the mpfs-can to the PolarFire SoC dtsi.

Another patch by me allows the configuration of fixed data bit rates
without need for do_set_data_bittiming callback.

The last 5 patches are by Frank Jungclaus. They prepare the esd_usb
driver to add support for the the CAN-USB/3 device in a later series.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 27, 2022
2 parents c83bc86 + c3d3961 commit 9dd094e
Show file tree
Hide file tree
Showing 23 changed files with 616 additions and 436 deletions.
45 changes: 45 additions & 0 deletions Documentation/devicetree/bindings/net/can/microchip,mpfs-can.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/can/microchip,mpfs-can.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title:
Microchip PolarFire SoC (MPFS) can controller

maintainers:
- Conor Dooley <conor.dooley@microchip.com>

allOf:
- $ref: can-controller.yaml#

properties:
compatible:
const: microchip,mpfs-can

reg:
maxItems: 1

interrupts:
maxItems: 1

clocks:
maxItems: 1

required:
- compatible
- reg
- interrupts
- clocks

additionalProperties: false

examples:
- |
can@2010c000 {
compatible = "microchip,mpfs-can";
reg = <0x2010c000 0x1000>;
clocks = <&clkcfg 17>;
interrupt-parent = <&plic>;
interrupts = <56>;
};
2 changes: 1 addition & 1 deletion Documentation/networking/can.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ reflect the correct [#f1]_ traffic on the node the loopback of the sent
data has to be performed right after a successful transmission. If
the CAN network interface is not capable of performing the loopback for
some reason the SocketCAN core can do this task as a fallback solution.
See :ref:`socketcan-local-loopback1` for details (recommended).
See :ref:`socketcan-local-loopback2` for details (recommended).

The loopback functionality is enabled by default to reflect standard
networking behaviour for CAN applications. Due to some requests from
Expand Down
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7420,6 +7420,13 @@ S: Maintained
F: include/linux/errseq.h
F: lib/errseq.c

ESD CAN/USB DRIVERS
M: Frank Jungclaus <frank.jungclaus@esd.eu>
R: socketcan@esd.eu
L: linux-can@vger.kernel.org
S: Maintained
F: drivers/net/can/usb/esd_usb.c

ET131X NETWORK DRIVER
M: Mark Einon <mark.einon@gmail.com>
S: Odd Fixes
Expand Down
18 changes: 18 additions & 0 deletions arch/riscv/boot/dts/microchip/mpfs.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,24 @@
status = "disabled";
};

can0: can@2010c000 {
compatible = "microchip,mpfs-can";
reg = <0x0 0x2010c000 0x0 0x1000>;
clocks = <&clkcfg CLK_CAN0>;
interrupt-parent = <&plic>;
interrupts = <56>;
status = "disabled";
};

can1: can@2010d000 {
compatible = "microchip,mpfs-can";
reg = <0x0 0x2010d000 0x0 0x1000>;
clocks = <&clkcfg CLK_CAN1>;
interrupt-parent = <&plic>;
interrupts = <57>;
status = "disabled";
};

mac0: ethernet@20110000 {
compatible = "cdns,macb";
reg = <0x0 0x20110000 0x0 0x2000>;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ config NET_SB1000

source "drivers/net/phy/Kconfig"

source "drivers/net/can/Kconfig"

source "drivers/net/mctp/Kconfig"

source "drivers/net/mdio/Kconfig"
Expand Down
55 changes: 46 additions & 9 deletions drivers/net/can/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "CAN Device Drivers"

menuconfig CAN_DEV
tristate "CAN Device Drivers"
default y
depends on CAN
help
Controller Area Network (CAN) is serial communications protocol up to
1Mbit/s for its original release (now known as Classical CAN) and up
to 8Mbit/s for the more recent CAN with Flexible Data-Rate
(CAN-FD). The CAN bus was originally mainly for automotive, but is now
widely used in marine (NMEA2000), industrial, and medical
applications. More information on the CAN network protocol family
PF_CAN is contained in <Documentation/networking/can.rst>.

This section contains all the CAN(-FD) device drivers including the
virtual ones. If you own such devices or plan to use the virtual CAN
interfaces to develop applications, say Y here.

To compile as a module, choose M here: the module will be called
can-dev.

if CAN_DEV

config CAN_VCAN
tristate "Virtual Local CAN Interface (vcan)"
Expand Down Expand Up @@ -48,15 +69,22 @@ config CAN_SLCAN
can be changed by the 'maxdev=xx' module option. This driver can
also be built as a module. If so, the module will be called slcan.

config CAN_DEV
tristate "Platform CAN drivers with Netlink support"
config CAN_NETLINK
bool "CAN device drivers with Netlink support"
default y
help
Enables the common framework for platform CAN drivers with Netlink
support. This is the standard library for CAN drivers.
If unsure, say Y.
Enables the common framework for CAN device drivers. This is the
standard library and provides features for the Netlink interface such
as bittiming validation, support of CAN error states, device restart
and others.

if CAN_DEV
The additional features selected by this option will be added to the
can-dev module.

This is required by all platform and hardware CAN drivers. If you
plan to use such devices or if unsure, say Y.

if CAN_NETLINK

config CAN_CALC_BITTIMING
bool "CAN bit-timing calculation"
Expand All @@ -69,8 +97,15 @@ config CAN_CALC_BITTIMING
source clock frequencies. Disabling saves some space, but then the
bit-timing parameters must be specified directly using the Netlink
arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw".

The additional features selected by this option will be added to the
can-dev module.

If unsure, say Y.

config CAN_RX_OFFLOAD
bool

config CAN_AT91
tristate "Atmel AT91 onchip CAN controller"
depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM
Expand All @@ -82,6 +117,7 @@ config CAN_FLEXCAN
tristate "Support for Freescale FLEXCAN based chips"
depends on OF || COLDFIRE || COMPILE_TEST
depends on HAS_IOMEM
select CAN_RX_OFFLOAD
help
Say Y here if you want to support for Freescale FlexCAN.

Expand Down Expand Up @@ -131,6 +167,7 @@ config CAN_SUN4I
config CAN_TI_HECC
depends on ARM
tristate "TI High End CAN Controller"
select CAN_RX_OFFLOAD
help
Driver for TI HECC (High End CAN Controller) module found on many
TI devices. The device specifications are available from www.ti.com
Expand Down Expand Up @@ -164,7 +201,7 @@ source "drivers/net/can/softing/Kconfig"
source "drivers/net/can/spi/Kconfig"
source "drivers/net/can/usb/Kconfig"

endif
endif #CAN_NETLINK

config CAN_DEBUG_DEVICES
bool "CAN devices debugging messages"
Expand All @@ -174,4 +211,4 @@ config CAN_DEBUG_DEVICES
a problem with CAN support and want to see more of what is going
on.

endmenu
endif #CAN_DEV
17 changes: 10 additions & 7 deletions drivers/net/can/dev/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_CAN_DEV) += can-dev.o
can-dev-y += bittiming.o
can-dev-y += dev.o
can-dev-y += length.o
can-dev-y += netlink.o
can-dev-y += rx-offload.o
can-dev-y += skb.o
obj-$(CONFIG_CAN_DEV) += can-dev.o

can-dev-y += skb.o

can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o
can-dev-$(CONFIG_CAN_NETLINK) += bittiming.o
can-dev-$(CONFIG_CAN_NETLINK) += dev.o
can-dev-$(CONFIG_CAN_NETLINK) += length.o
can-dev-$(CONFIG_CAN_NETLINK) += netlink.o
can-dev-$(CONFIG_CAN_RX_OFFLOAD) += rx-offload.o
Loading

0 comments on commit 9dd094e

Please sign in to comment.