Skip to content

Commit 881ff67

Browse files
bhupesh-sharmadavem330
authored andcommitted
can: c_can: Added support for Bosch C_CAN controller
Bosch C_CAN controller is a full-CAN implementation which is compliant to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual can be obtained from: http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/users_manual_c_can.pdf This patch adds the support for this controller. The following are the design choices made while writing the controller driver: 1. Interface Register set IF1 has be used only in the current design. 2. Out of the 32 Message objects available, 16 are kept aside for RX purposes and the rest for TX purposes. 3. NAPI implementation is such that both the TX and RX paths function in polling mode. Signed-off-by: Bhupesh Sharma <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c906041 commit 881ff67

File tree

7 files changed

+1485
-0
lines changed

7 files changed

+1485
-0
lines changed

drivers/net/can/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ source "drivers/net/can/mscan/Kconfig"
115115

116116
source "drivers/net/can/sja1000/Kconfig"
117117

118+
source "drivers/net/can/c_can/Kconfig"
119+
118120
source "drivers/net/can/usb/Kconfig"
119121

120122
source "drivers/net/can/softing/Kconfig"

drivers/net/can/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj-y += softing/
1313

1414
obj-$(CONFIG_CAN_SJA1000) += sja1000/
1515
obj-$(CONFIG_CAN_MSCAN) += mscan/
16+
obj-$(CONFIG_CAN_C_CAN) += c_can/
1617
obj-$(CONFIG_CAN_AT91) += at91_can.o
1718
obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
1819
obj-$(CONFIG_CAN_MCP251X) += mcp251x.o

drivers/net/can/c_can/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
menuconfig CAN_C_CAN
2+
tristate "Bosch C_CAN devices"
3+
depends on CAN_DEV && HAS_IOMEM
4+
5+
if CAN_C_CAN
6+
7+
config CAN_C_CAN_PLATFORM
8+
tristate "Generic Platform Bus based C_CAN driver"
9+
---help---
10+
This driver adds support for the C_CAN chips connected to
11+
the "platform bus" (Linux abstraction for directly to the
12+
processor attached devices) which can be found on various
13+
boards from ST Microelectronics (http://www.st.com)
14+
like the SPEAr1310 and SPEAr320 evaluation boards.
15+
endif

drivers/net/can/c_can/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Makefile for the Bosch C_CAN controller drivers.
3+
#
4+
5+
obj-$(CONFIG_CAN_C_CAN) += c_can.o
6+
obj-$(CONFIG_CAN_C_CAN_PLATFORM) += c_can_platform.o
7+
8+
ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG

0 commit comments

Comments
 (0)