This patch adds support for SJA1000 based PCI CAN interface cards from
electronic system design gmbh.
The following list of boards are supported:
CAN-PCI/200 (tested)
CAN-PCI/266
CAN-PMC266
CAN-PCIe/2000
CAN-CPCI/200
CAN-PCI104
The patch is based on the Socket-CAN driver for those boards by Matthias
Fuchs.
Signed-off-by: Sebastian Smolorz smol...@rts.uni-hannover.de
--
ksrc/drivers/can/sja1000/Kconfig | 11 +
ksrc/drivers/can/sja1000/Makefile|7 +
ksrc/drivers/can/sja1000/rtcan_esd_pci.c | 354 ++
3 files changed, 372 insertions(+), 0 deletions(-)
diff --git a/ksrc/drivers/can/sja1000/Kconfig b/ksrc/drivers/can/sja1000/Kconfig
index 4d0ed48..53abdd9 100644
--- a/ksrc/drivers/can/sja1000/Kconfig
+++ b/ksrc/drivers/can/sja1000/Kconfig
@@ -52,6 +52,17 @@ config XENO_DRIVERS_CAN_SJA1000_EMS_PCI
working, Xenomai's shared interrupt support must be enabled.
+config XENO_DRIVERS_CAN_SJA1000_ESD_PCI
+ depends on XENO_DRIVERS_CAN_SJA1000
+ tristate ESD PCI Cards
+ help
+
+ This driver supports the esd PCI CAN cards CAN-PCI/200,
+ CAN-PCI/266, CAN-PMC/266 (PMC), CAN-CPCI/200 (CompactPCI),
+ CAN-PCIe2000 (PCI Express) and CAN-PCI104/200 (PCI104)
+ from the esd electronic system design gmbh (http://www.esd.eu).
+
+
config XENO_DRIVERS_CAN_SJA1000_PEAK_DNG
depends on XENO_DRIVERS_CAN_SJA1000
tristate PEAK Parallel Port Dongle
diff --git a/ksrc/drivers/can/sja1000/Makefile b/ksrc/drivers/can/sja1000/Makefile
index 1db102e..09a03ab 100644
--- a/ksrc/drivers/can/sja1000/Makefile
+++ b/ksrc/drivers/can/sja1000/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_PCI) += xeno_can_peak_pci.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_DNG) += xeno_can_peak_dng.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_IXXAT_PCI) += xeno_can_ixxat_pci.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_EMS_PCI) += xeno_can_ems_pci.o
+obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ESD_PCI) += xeno_can_esd_pci.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ISA) += xeno_can_isa.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_MEM) += xeno_can_mem.o
@@ -17,6 +18,7 @@ xeno_can_peak_pci-y := rtcan_peak_pci.o
xeno_can_peak_dng-y := rtcan_peak_dng.o
xeno_can_ixxat_pci-y := rtcan_ixxat_pci.o
xeno_can_ems_pci-y := rtcan_ems_pci.o
+xeno_can_esd_pci-y := rtcan_esd_pci.o
xeno_can_isa-y := rtcan_isa.o
xeno_can_mem-y := rtcan_mem.o
@@ -31,6 +33,7 @@ obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_PCI) += xeno_can_peak_pci.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_DNG) += xeno_can_peak_dng.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_IXXAT_PCI) += xeno_can_ixxat_pci.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_EMS_PCI) += xeno_can_ems_pci.o
+obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ESD_PCI) += xeno_can_esd_pci.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ISA) += xeno_can_isa.o
obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_MEM) += xeno_can_mem.o
@@ -41,6 +44,7 @@ xeno_can_peak_pci-objs := rtcan_peak_pci.o
xeno_can_peak_dng-objs := rtcan_peak_dng.o
xeno_can_ixxat_pci-objs := rtcan_ixxat_pci.o
xeno_can_ems_pci-objs := rtcan_ems_pci.o
+xeno_can_esd_pci-objs := rtcan_esd_pci.o
xeno_can_isa-objs := rtcan_isa.o
xeno_can_mem-objs := rtcan_mem.o
@@ -65,6 +69,9 @@ xeno_can_ixxat_pci.o: $(xeno_can_ixxat_pci-objs)
xeno_can_ems_pci.o: $(xeno_can_ems_pci-objs)
$(LD) -r -o $@ $(xeno_can_ems_pci-objs)
+xeno_can_esd_pci.o: $(xeno_can_esd_pci-objs)
+ $(LD) -r -o $@ $(xeno_can_esd_pci-objs)
+
xeno_can_isa.o: $(xeno_can_isa-objs)
$(LD) -r -o $@ $(xeno_can_isa-objs)
diff --git a/ksrc/drivers/can/sja1000/rtcan_esd_pci.c b/ksrc/drivers/can/sja1000/rtcan_esd_pci.c
new file mode 100644
index 000..79cf8b6
--- /dev/null
+++ b/ksrc/drivers/can/sja1000/rtcan_esd_pci.c
@@ -0,0 +1,354 @@
+/*
+ * Copyright (C) 2009 Sebastian Smolorz se...@gmx.net
+ *
+ * This driver is based on the Socket-CAN driver esd_pci.c,
+ * Copyright (C) 2007 Wolfgang Grandegger w...@grandegger.com
+ * Copyright (C) 2008 Sascha Hauer s.ha...@pengutronix.de, Pengutronix
+ * Copyright (C) 2009 Matthias Fuchs matthias.fu...@esd.eu, esd gmbh
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the version 2 of the GNU General Public License
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include linux/module.h
+#include linux/ioport.h
+#include linux/delay.h
+#include linux/pci.h
+#include asm/io.h
+
+#include rtdm/rtdm_driver.h
+
+/* CAN device profile */
+#include rtdm/rtcan.h
+#include rtcan_dev.h
+#include rtcan_raw.h
+#include