]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/README
4b6e4f16c2b97cd0190ccb2db7f431114535ccf9
[lincan.git] / lincan / README
1                 Linux CAN Driver (LinCAN) version 0.3
2                 Pavel Pisa <pisa@cmp.felk.cvut.cz>
3                         OCERA team member
4                         <http://www.ocera.org>
5
6
7 INTRODUCTION
8 ============
9 The LinCAN is an implementation of the Linux CAN-bus device driver supporting
10 more CAN controller chips and many CAN interface boards. Its development
11 has long history already. The OCERA version of the driver has new better
12 designed internal structure, adds new features (as support for open by multiple
13 applications, select system call) and other enhancements.
14   
15 The driver consist of four main layers:
16   - chip level manipulation routines
17   - board specific support
18   - message queues
19   - user-space API and ABI character device interface
20
21
22 DRIVER HISTORY
23 ==============
24
25 The driver originates in The Linux Lab Project
26   http://www.llp.fu-berlin.de/
27 then it has been first rewritten by Arnaud Westenberg
28   http://home.wanadoo.nl/arnaud/
29 now it is developed and maintained as part of OCERA framework
30   http://www.ocera.org/
31
32 I am unable to contact previous maintainer Arnaud Westenberg
33 (arnaud@wanadoo.nl). If you know something about him, I like
34 to hear it.
35
36 Versions:
37
38 can-0.7.1       latest driver version version published
39                 by Arnaud Westenberg
40
41 can-0.7.1-tm5   the enhanced version with better support of
42                 SJA1000 PeliCAN mode and CAN Ethernet proxy
43                 contributed by Tomasz Motylewski <T.Motylewski@bfad.de>
44
45 can-0.7.1-pi1   the import and usage of previous version for
46 (Dec 2002)      OCERA group purposes
47                 
48 can-0.7.1-pi3.4 enhanced version with select support and rewritten
49 (Mar 2003)      make system for Linux kernels (2.2.x,2.4.x,2.5.x),
50                 interrupts service cleanup and partial redesign
51                 and DEVFS support
52
53 lincan-0.2-pre  heavily rewritten infrastructure of the driver based
54 (Aug 2003)      on atomic slot management of queues
55
56 lincan-0.2      version tested on many bords and 2.2, 2.4, 2.6 Linux
57 (Mar 2004)      and RT-Linux enabled 2.4 Linux kernel
58
59 lincan-0.3      possible SMP and HT deadlock fixed, driver can take
60 (Jul 2004)      advantage of CMPXCHG instruction if present on CPU,
61                 added support for CPC-PCI and PCAN-PCI cards,
62                 messages timestamping implemented
63                 partially implemented support for Bosch C_CAN module,
64                 requires more work and real hardware
65                 
66 The actual version of driver have been latest tested it with
67   - PC104 Advantech PCM3680 dual channel board on 2.4 RT-Linux enabled kernel
68   - PiKRON ISA card on 2.4.and 2.6 Linux kernels
69   - BfaD DIMM PC card on 2.4 RT-Linux enabled kernel
70   - KVASER pcican-q on 2.6 Linux kernel
71   - MICROSPACE msmcan on 2.4 Linux and RT-Linux enabled kernel
72   - Unicontrols PCAN ("unican"),PCAN-PCI ("unican-pci"), VCAN  ("unican-vme")
73   - EMS CPC-PCI cards ("ems_cpcpci")
74   - virtual board tested on all systems as wel
75 It takes more time to test driver with more cards.
76 Infrastructure and support for more than 20 boards with more
77 variants is prepared in the sources.
78
79
80 SOURCES AND URLs
81 ================
82
83 The LinCAN driver component page at OCERA web site
84 (not updated to the new version yet)
85
86   http://www.ocera.org/download/components/WP7/lincan-0.2.html
87   
88 List of related communication components
89   
90   http://www.ocera.org/download/components/WP7/index.html
91
92 The CVS repository of OCERA project at SourceForge
93
94   EXTCVS=":pserver:anonymous@cvs.ocera.sourceforge.net:/cvsroot/ocera"
95   cvs -d$EXTCVS login
96   cvs -z3 -d$EXTCVS co ocera
97   
98 Web access into CVS
99
100   http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ocera/ocera/components/comm/can/lincan/
101
102 Experimental directory at maintainer's (Pavel Pisa's) pages 
103
104   http://cmp.felk.cvut.cz/~pisa/can/
105   http://cmp.felk.cvut.cz/~pisa/can/lincan-YYMMDD.tar.gz
106   
107 Please send comments, bug-fixes and enhancements directly to
108 Pavel Pisa <pisa@cmp.felk.cvut.cz> or to OCERA discussion
109 forum <https://sourceforge.net/forum/forum.php?forum_id=170893> 
110 and lists <ocera-development@lists.sourceforge.net>
111
112 Driver documentation can be found at
113
114   http://cmp.felk.cvut.cz/~pisa/can/doc/lincandoc-0.2.pdf
115
116 The anouncements of new version are published at FreshMeat page
117
118   http://freshmeat.net/projects/lincan/
119
120
121 COMPILATION of LinCAN releases
122 ==============================
123
124 Just type 'make' at the command line and driver module should compile
125 without errors for current running kernel. 
126
127 More information can be found in driver documentation at
128   http://cmp.felk.cvut.cz/~pisa/can/
129   http://cmp.felk.cvut.cz/~pisa/can/lincandoc-X.Y.pdf
130   
131 Some releases use experimental OMK make system, which requires
132 recent GNU make program version 3.81beta1 and above.
133 Makefiles can be switched to old ones by script
134
135   sh ./switch-omk2std
136   make
137
138 If you have problem to obtain recent GNU make program,
139 you can use our local copy
140
141   http://cmp.felk.cvut.cz/~pisa/can/make-3.81beta1.tar.gz
142
143
144 COMPILATION from CVS sources without full OCERA tree
145 ====================================================
146   
147 ---------------------------------------------------------------------------
148 Obtaining CVS sources of the CAN components only
149 ---------------------------------------------------------------------------
150   cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocera login
151   cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocera co
152          ocera/components/comm/can
153
154 ---------------------------------------------------------------------------
155 Commands to build OCERA CVS CAN components outside OCERA tree
156 ---------------------------------------------------------------------------
157   cd ocera/components/comm/can
158   ./switch2standalone
159   make
160
161 The selection of required features and options can be specified before make 
162 command invocation. Lines containing required changes to config.omk-default 
163 file should be stored in config.omk file. The config.omk is not altered by 
164 OMK system and options defined there override values defined in 
165 config.omk-default file. GNU make program version 3.81beta1 or newer is 
166 required by OMK make-system. If this is problem, LinCAN driver can be 
167 compiled with use of old style Makefiles as well.
168
169 ---------------------------------------------------------------------------
170 Old style Makefiles compilation of the LinCAN driver only
171 ---------------------------------------------------------------------------
172   cd ocera/components/comm/can/lincan
173   ./switch2std
174   make
175
176
177 INSTALLATION
178 ============
179 Type 'make install' for standard make system compilation.
180 The driver should be copied into actual kernel version
181 modules directory "/lib/modules/x.y.z/kernel/drivers/char".
182
183 OMK system requires manual copy of files from "_compiled" tree
184 to its final destinations.
185
186 LOADING
187 =======
188
189 To load the driver type:
190 # insmod can.o hw='your hardware' irq='irq number' io='io address' <options>
191 Examples: # insmod can.o hw=pip5 irq=4 io=0x8000
192           # insmod can.o hw=virtual io=0
193
194 The hw argument can be one of:
195 - pip5, for the pip5 computer by MPL
196 - pip6, for the pip6 computer by MPL
197 - pccan-q, for the PCcan-Q ISA card by KVASER
198 - pccan-f, for the PCcan-F ISA card by KVASER
199 - pccan-s, for the PCcan-S ISA card by KVASER
200 - pccan-d, for the PCcan-D ISA card by KVASER
201 - pcican-q, for the PCIcan-Q PCI card by KVASER (4x SJA1000)
202 - pcican-d, for the PCIcan-Q PCI card by KVASER (2x SJA1000)
203 - pcican-s, for the PCIcan-Q PCI card by KVASER (1x SJA1000)
204 - nsican, for the CAN104 PC/104 card by NSI
205 - cc104, for the CAN104 PC/104 card by Contemporary Controls
206 - aim104, for the AIM104CAN PC/104 card by Arcom Control Systems
207 - pc-i03, for the PC-I03 ISA card by IXXAT
208 - pcm3680, for the PCM-3680 PC/104 card by Advantech
209 - m437, for the M436 PC/104 card by SECO
210 - bfadcan for sja1000 CAN embedded card made by BFAD GmbH
211 - pikronisa for ISA memory mapped sja1000 CAN card made by PiKRON Ltd.
212 - msmcan for MICROSPACE IO space indexed i82527
213 - unican for Unicontrols PCAN card
214 - unican-pci for Unicontrols PCAN-PCI card
215 - unican-vme for Unicontrols VCAN card
216 - ems_cpcpci for EMS CPC-PCI card
217 - oscar for SJA1000 based card connected to ARM LH7A400 SoC
218 - template, for yet unsupported hardware (you need to edit src/template.c)
219 - virtual, CAN channel for testing of software and driver without CAN hardware
220
221 options can be one of:
222 - major=<nr>, major specifies the major number of the driver.
223 - minor=<nr>, you can specify which minor numbers the driver should use for your
224   hardware.
225 - extended=[1|0], configures the driver to use extended message format.
226 - pelican=[1|0], configures the driver to set the CAN chips into pelican mode.
227 - baudrate=<nr>, sets the baudrate of the device(s)
228 - clock_freq=<nr>, the frequency of the CAN quartz
229 - stdmask=<nr>, sets the standard mask of the device
230 - extmask=<nr>, sets the extended mask of the device
231 - mo15mask=<nr>, sets the mask for message object 15 (i82527 only)
232 - processlocal=<nr>, controls distribution of send messages to Rx FIFOs
233                 0, no local outgoing messages delivery to Rx FIFOs
234                 1, default off, but can be controlled by individual filter settings
235                 2, all FIFOs receive local messages
236
237 There's still a lot of work to do, have a look at the TODO file for more
238 information.
239