CAN: Add Flexcan CAN controller driver

This core is found on some Freescale SoCs and also some Coldfire
SoCs. Support for Coldfire is missing though at the moment as
they have an older revision of the core which does not have RX FIFO
support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Marc Kleine-Budde 2009-07-29 10:20:10 +02:00
parent 4cfa580e7e
commit e955cead03
4 changed files with 1060 additions and 0 deletions

View File

@ -73,6 +73,15 @@ config CAN_JANZ_ICAN3
This driver can also be built as a module. If so, the module will be
called janz-ican3.ko.
config HAVE_CAN_FLEXCAN
bool
config CAN_FLEXCAN
tristate "Support for Freescale FLEXCAN based chips"
depends on CAN_DEV && HAVE_CAN_FLEXCAN
---help---
Say Y here if you want to support for Freescale FlexCAN.
source "drivers/net/can/mscan/Kconfig"
source "drivers/net/can/sja1000/Kconfig"

View File

@ -16,5 +16,6 @@ obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
obj-$(CONFIG_CAN_MCP251X) += mcp251x.o
obj-$(CONFIG_CAN_BFIN) += bfin_can.o
obj-$(CONFIG_CAN_JANZ_ICAN3) += janz-ican3.o
obj-$(CONFIG_CAN_FLEXCAN) += flexcan.o
ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG

1030
drivers/net/can/flexcan.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
/*
* Copyright (C) 2010 Marc Kleine-Budde <kernel@pengutronix.de>
*
* This file is released under the GPLv2
*
*/
#ifndef __CAN_PLATFORM_FLEXCAN_H
#define __CAN_PLATFORM_FLEXCAN_H
/**
* struct flexcan_platform_data - flex CAN controller platform data
* @transceiver_enable: - called to power on/off the transceiver
*
*/
struct flexcan_platform_data {
void (*transceiver_switch)(int enable);
};
#endif /* __CAN_PLATFORM_FLEXCAN_H */