2 Linux CAN Driver (LinCAN) version 0.3.2
3 Pavel Pisa <pisa@cmp.felk.cvut.cz>
4 OCERA team member <http://www.ocera.org>
5 Real-time Systems Laboratory <http://rtlab.felk.cvut.cz/>
6 Department of Control Engineering, FEE CTU
11 The LinCAN is an implementation of the Linux CAN-bus device driver supporting
12 more CAN controller chips and many CAN interface boards. Its development
13 has long history already. The OCERA version of the driver has new better
14 designed internal structure, adds new features (as support for open by multiple
15 applications, select system call) and other enhancements.
17 The driver consist of four main layers:
18 - chip level manipulation routines
19 - board specific support
21 - user-space API and ABI character device interface
27 The driver originates in The Linux Lab Project
28 http://www.llp.fu-berlin.de/
29 then it has been first rewritten by Arnaud Westenberg
30 http://home.wanadoo.nl/arnaud/
31 now it is developed and maintained as part of OCERA framework
34 I am unable to contact previous maintainer Arnaud Westenberg
35 (arnaud@wanadoo.nl). If you know something about him, I like
40 can-0.7.1 latest driver version version published
43 can-0.7.1-tm5 the enhanced version with better support of
44 SJA1000 PeliCAN mode and CAN Ethernet proxy
45 contributed by Tomasz Motylewski <T.Motylewski@bfad.de>
47 can-0.7.1-pi1 the import and usage of previous version for
48 (Dec 2002) OCERA group purposes
50 can-0.7.1-pi3.4 enhanced version with select support and rewritten
51 (Mar 2003) make system for Linux kernels (2.2.x,2.4.x,2.5.x),
52 interrupts service cleanup and partial redesign
55 lincan-0.2-pre heavily rewritten infrastructure of the driver based
56 (Aug 2003) on atomic slot management of queues
58 lincan-0.2 version tested on many bords and 2.2, 2.4, 2.6 Linux
59 (Mar 2004) and RT-Linux enabled 2.4 Linux kernel
61 lincan-0.2.8 possible SMP and HT deadlock fixed, driver can take
62 (Jul 2004) advantage of CMPXCHG instruction if present on CPU,
63 added support for CPC-PCI and PCAN-PCI cards,
64 messages timestamping implemented
65 partially implemented support for Bosch C_CAN module,
66 requires more work and real hardware
68 lincan-0.3 Changed SJA1000 chip IRQ handling. Enhanced VME
69 (Nov 2004) and EMS CPC-PCI support and many other changes.
71 lincan-0.3.1 Small improvements, RTR read moved into separate IOCTL,
72 (Jul 2005) initial support for some boards contributed by users
74 lincan-0.3.2 Improvements in SJA1000 error handling and reporting,
75 (Feb 2006) i82527 support fixes, simple UDEV support,
76 updates for kernels up to 2.6.15 and fully preemptive
77 kernel compatibility. Support for MX1_DIS1 extension
78 board for PiMX1 ARM based BCC.
81 The actual version of driver have been latest tested it with
82 - PC104 Advantech PCM3680 dual channel board on 2.4 RT-Linux enabled kernel
83 - PiKRON ISA card on 2.4.and 2.6 Linux kernels
84 - PiKRON CAN extension board for PiMCX1 ARM BCC on 2.6 Linux kernels
85 - BfaD DIMM PC card on 2.4 RT-Linux enabled kernel
86 - KVASER pcican-q on 2.6 Linux kernel
87 - MICROSPACE msmcan on 2.4 Linux and RT-Linux enabled kernel
88 - Unicontrols PCAN ("unican"),PCAN-PCI ("unican-pci"), VCAN ("unican-vme")
89 - EMS CPC-PCI cards ("ems_cpcpci")
90 - virtual board tested on all systems as wel
91 It takes more time to test driver with more cards.
92 Infrastructure and support for more than 20 boards with more
93 variants is prepared in the sources.
99 The LinCAN driver component page at OCERA web site
100 (not updated to the new version yet)
102 http://www.ocera.org/download/components/WP7/lincan-0.3.1.html
104 List of related communication components
106 http://www.ocera.org/download/components/WP7/index.html
108 The obtaining LinCAN and other CAN related components
109 from OCERA CVS repository at SourceForge
111 EXTCVS=":pserver:anonymous@cvs.ocera.sourceforge.net:/cvsroot/ocera"
113 cvs -z3 -d$EXTCVS co ocera/components/comm/can
117 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ocera/ocera/components/comm/can/lincan/
119 Experimental directory at maintainer's (Pavel Pisa's) pages
121 http://cmp.felk.cvut.cz/~pisa/can/
122 http://cmp.felk.cvut.cz/~pisa/can/lincan-YYMMDD.tar.gz
124 Please send comments, bug-fixes and enhancements directly to
125 Pavel Pisa <pisa@cmp.felk.cvut.cz> or to OCERA discussion
126 forum <https://sourceforge.net/forum/forum.php?forum_id=170893>
127 and lists <ocera-development@lists.sourceforge.net>
129 Driver documentation can be found at
131 http://cmp.felk.cvut.cz/~pisa/can/doc/lincandoc-0.3.pdf
133 The anouncements of new version are published at FreshMeat page
135 http://freshmeat.net/projects/lincan/
138 COMPILATION of LinCAN releases
139 ==============================
141 Just type 'make' at the command line and driver module should compile
142 without errors for current running kernel.
144 More information can be found in driver documentation at
145 http://cmp.felk.cvut.cz/~pisa/can/
146 http://cmp.felk.cvut.cz/~pisa/can/lincandoc-X.Y.pdf
148 Some releases use experimental OMK make system, which requires
149 recent GNU make program version 3.81beta1 and above.
150 Makefiles can be switched to old ones by script
155 If you have problem to obtain recent GNU make program,
157 ftp://alpha.gnu.org/gnu/make/make-3.81beta4.tar.bz2
159 you can use our local copy
161 http://cmp.felk.cvut.cz/~pisa/can/make-3.81beta1.tar.gz
164 COMPILATION from CVS sources without full OCERA tree
165 ====================================================
167 ---------------------------------------------------------------------------
168 Obtaining CVS sources of the CAN components only
169 ---------------------------------------------------------------------------
170 cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocera login
171 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocera co
172 ocera/components/comm/can
174 ---------------------------------------------------------------------------
175 Commands to build OCERA CVS CAN components outside OCERA tree
176 ---------------------------------------------------------------------------
177 cd ocera/components/comm/can
181 The selection of required features and options can be specified before make
182 command invocation. Lines containing required changes to config.omk-default
183 file should be stored in config.omk file. The config.omk is not altered by
184 OMK system and options defined there override values defined in
185 config.omk-default file. GNU make program version 3.81beta1 or newer is
186 required by OMK make-system. If this is problem, LinCAN driver can be
187 compiled with use of old style Makefiles as well.
189 ---------------------------------------------------------------------------
190 Old style Makefiles compilation of the LinCAN driver only
191 ---------------------------------------------------------------------------
192 cd ocera/components/comm/can/lincan
199 Type 'make install' for standard make system compilation.
200 The driver should be copied into actual kernel version
201 modules directory "/lib/modules/x.y.z/kernel/drivers/char".
203 OMK system requires manual copy of files from "_compiled" tree
204 to its final destinations.
206 Create file "lincan.rules" with contents listed below in or linked
207 into "/etc/udev/rules.d" directory to enable automatic device nodes
208 creation for UDEV based system
211 SUBSYSTEM=="can",GROUP="users",MODE="0660"
213 The driver automatic loding can be requested by addition of "lincan"
214 line into "/etc/modules" od Debian based systems.
216 The target hardware/board specific options should be added into
217 "/etc/modprobe.conf" file or file with similar functionality for your
218 distribution. The options are discusses in the next paragraph.
223 To load the driver type:
224 # insmod can.o hw='your hardware' irq='irq number' io='io address' <options>
225 Examples: # insmod can.o hw=pip5 irq=4 io=0x8000
226 # insmod can.o hw=virtual io=0
228 The hw argument can be one of:
229 - pip5, for the PIP5 computer by MPL
230 - pip6, for the PIP6 computer by MPL
231 - pip7, for the PIP7 computer by MPL
232 - pip8, for the PIP8 computer by MPL
233 - pccan-q, for the PCcan-Q ISA card by KVASER
234 - pccan-f, for the PCcan-F ISA card by KVASER
235 - pccan-s, for the PCcan-S ISA card by KVASER
236 - pccan-d, for the PCcan-D ISA card by KVASER
237 - pcican-q, for the PCIcan-Q PCI card by KVASER (4x SJA1000)
238 - pcican-d, for the PCIcan-Q PCI card by KVASER (2x SJA1000)
239 - pcican-s, for the PCIcan-Q PCI card by KVASER (1x SJA1000)
240 - smartcan for i82527 based card with indexed access
241 - nsican, for the CAN104 PC/104 card by NSI
242 - cc104, for the CAN104 PC/104 card by Contemporary Controls
243 - aim104, for the AIM104CAN PC/104 card by Arcom Control Systems
244 - pc-i03, for the PC-I03 ISA card by IXXAT
245 - pcm3680, for the PCM-3680 PC/104 card by Advantech
246 - m437, for the M436 PC/104 card by SECO
247 - bfadcan for sja1000 CAN embedded card made by BFAD GmbH
248 - pikronisa for ISA memory mapped sja1000 CAN card made by PiKRON Ltd.
249 - pimx1 for MX1_DIS1 extension board for PiMX1 ARM based BCC
250 - msmcan for MICROSPACE IO space indexed i82527
251 - unican for Unicontrols PCAN card
252 - unican-pci for Unicontrols PCAN-PCI card
253 - unican-vme for Unicontrols VCAN card
254 - ipci165 for IXXAT iPC-I 165 (PCI), requires CONFIG_OC_LINCAN_CARD_ipci165=y
255 - ems_cpcpci for EMS CPC-PCI card
256 - pcan_dongle for PEAK's printer port dongle addapter
257 - oscar for SJA1000 based card connected to ARM LH7A400 SoC
258 - eb8245 for Kontron EB8245 onboard CAN with SJA1000 controller
259 - adlink7841 for ADLINK PCI-7841 dual SJA1000 based card
260 - tscan1 for Technologic Systems' TS-CAN1 single SJA1000 based board
261 - ts7kv for Technologic Systems' TS-7KV Multi-function board with SJA1000
262 both these cards require CONFIG_OC_LINCAN_CARD_tscan1=y
263 - template, for yet unsupported hardware (you need to edit src/template.c)
264 - virtual, CAN channel for testing of software and driver without CAN hardware
266 options can be one of:
267 - major=<nr>, major specifies the major number of the driver.
268 - minor=<nr>, you can specify which minor numbers the driver should use for your
270 - extended=[1|0], configures the driver to use extended message format.
271 - pelican=[1|0], configures the driver to set the CAN chips into pelican mode.
272 - baudrate=<nr>, sets the baudrate of the device(s)
273 - clock_freq=<nr>, the frequency of the CAN quartz
274 - stdmask=<nr>, sets the standard mask of the device
275 - extmask=<nr>, sets the extended mask of the device
276 - mo15mask=<nr>, sets the mask for message object 15 (i82527 only)
277 - processlocal=<nr>, controls distribution of send messages to Rx FIFOs
278 0, no local outgoing messages delivery to Rx FIFOs
279 1, default off, but can be controlled by individual filter settings
280 2, all FIFOs receive local messages
282 There's still a lot of work to do, have a look at the TODO file for more
285 Some boards support is compiled in only, when it is enabled through
286 config.omk file. It has to be stored in same directory as Makefile.rules
287 and config.omk-default is located.