Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd115931 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Marc Kleine-Budde
Browse files

can: add Renesas R-Car CAN driver



Add support for the CAN controller found in Renesas R-Car SoCs.

Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a9c69209
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -119,6 +119,16 @@ config CAN_GRCAN
	  endian syntheses of the cores would need some modifications on
	  the hardware level to work.

config CAN_RCAR
	tristate "Renesas R-Car CAN controller"
	depends on ARM
	---help---
	  Say Y here if you want to use CAN controller found on Renesas R-Car
	  SoCs.

	  To compile this driver as a module, choose M here: the module will
	  be called rcar_can.

source "drivers/net/can/mscan/Kconfig"

source "drivers/net/can/sja1000/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -25,5 +25,6 @@ obj-$(CONFIG_CAN_JANZ_ICAN3) += janz-ican3.o
obj-$(CONFIG_CAN_FLEXCAN)	+= flexcan.o
obj-$(CONFIG_PCH_CAN)		+= pch_can.o
obj-$(CONFIG_CAN_GRCAN)		+= grcan.o
obj-$(CONFIG_CAN_RCAR)		+= rcar_can.o

ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
+876 −0

File added.

Preview size limit exceeded, changes collapsed.

+17 −0
Original line number Diff line number Diff line
#ifndef _CAN_PLATFORM_RCAR_CAN_H_
#define _CAN_PLATFORM_RCAR_CAN_H_

#include <linux/types.h>

/* Clock Select Register settings */
enum CLKR {
	CLKR_CLKP1 = 0,	/* Peripheral clock (clkp1) */
	CLKR_CLKP2 = 1,	/* Peripheral clock (clkp2) */
	CLKR_CLKEXT = 3	/* Externally input clock */
};

struct rcar_can_platform_data {
	enum CLKR clock_select;	/* Clock source select */
};

#endif	/* !_CAN_PLATFORM_RCAR_CAN_H_ */