diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2008-11-13 16:33:24 -0500 |
---|---|---|
committer | Randy Dunlap <randy.dunlap@oracle.com> | 2008-11-14 12:28:53 -0500 |
commit | 31c00fc15ebd35c1647775dbfc167a15d46657fd (patch) | |
tree | 6d8ff2a6607c94a791ccc56fd8eb625e4fdcc01a /Documentation/serial | |
parent | 3edac25f2e8ac8c2a84904c140e1aeb434e73e75 (diff) |
Create/use more directory structure in the Documentation/ tree.
Create Documentation/blockdev/ sub-directory and populate it.
Populate the Documentation/serial/ sub-directory.
Move MSI-HOWTO.txt to Documentation/PCI/.
Move ioctl-number.txt to Documentation/ioctl/.
Update all relevant 00-INDEX files.
Update all relevant Kconfig files and source files.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Diffstat (limited to 'Documentation/serial')
-rw-r--r-- | Documentation/serial/00-INDEX | 24 | ||||
-rw-r--r-- | Documentation/serial/README.cycladesZ | 8 | ||||
-rw-r--r-- | Documentation/serial/computone.txt | 522 | ||||
-rw-r--r-- | Documentation/serial/digiepca.txt | 98 | ||||
-rw-r--r-- | Documentation/serial/hayes-esp.txt | 154 | ||||
-rw-r--r-- | Documentation/serial/moxa-smartio | 523 | ||||
-rw-r--r-- | Documentation/serial/riscom8.txt | 36 | ||||
-rw-r--r-- | Documentation/serial/rocket.txt | 189 | ||||
-rw-r--r-- | Documentation/serial/specialix.txt | 383 | ||||
-rw-r--r-- | Documentation/serial/stallion.txt | 392 | ||||
-rw-r--r-- | Documentation/serial/sx.txt | 294 | ||||
-rw-r--r-- | Documentation/serial/tty.txt | 292 |
12 files changed, 2915 insertions, 0 deletions
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX new file mode 100644 index 000000000000..07dcdb0d2a36 --- /dev/null +++ b/Documentation/serial/00-INDEX | |||
@@ -0,0 +1,24 @@ | |||
1 | 00-INDEX | ||
2 | - this file. | ||
3 | README.cycladesZ | ||
4 | - info on Cyclades-Z firmware loading. | ||
5 | computone.txt | ||
6 | - info on Computone Intelliport II/Plus Multiport Serial Driver. | ||
7 | digiepca.txt | ||
8 | - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. | ||
9 | hayes-esp.txt | ||
10 | - info on using the Hayes ESP serial driver. | ||
11 | moxa-smartio | ||
12 | - file with info on installing/using Moxa multiport serial driver. | ||
13 | riscom8.txt | ||
14 | - notes on using the RISCom/8 multi-port serial driver. | ||
15 | rocket.txt | ||
16 | - info on the Comtrol RocketPort multiport serial driver. | ||
17 | specialix.txt | ||
18 | - info on hardware/driver for specialix IO8+ multiport serial card. | ||
19 | stallion.txt | ||
20 | - info on using the Stallion multiport serial driver. | ||
21 | sx.txt | ||
22 | - info on the Specialix SX/SI multiport serial driver. | ||
23 | tty.txt | ||
24 | - guide to the locking policies of the tty layer. | ||
diff --git a/Documentation/serial/README.cycladesZ b/Documentation/serial/README.cycladesZ new file mode 100644 index 000000000000..024a69443cc2 --- /dev/null +++ b/Documentation/serial/README.cycladesZ | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | The Cyclades-Z must have firmware loaded onto the card before it will | ||
3 | operate. This operation should be performed during system startup, | ||
4 | |||
5 | The firmware, loader program and the latest device driver code are | ||
6 | available from Cyclades at | ||
7 | ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/ | ||
8 | |||
diff --git a/Documentation/serial/computone.txt b/Documentation/serial/computone.txt new file mode 100644 index 000000000000..c57ea4781e5d --- /dev/null +++ b/Documentation/serial/computone.txt | |||
@@ -0,0 +1,522 @@ | |||
1 | NOTE: This is an unmaintained driver. It is not guaranteed to work due to | ||
2 | changes made in the tty layer in 2.6. If you wish to take over maintenance of | ||
3 | this driver, contact Michael Warfield <mhw@wittsend.com>. | ||
4 | |||
5 | Changelog: | ||
6 | ---------- | ||
7 | 11-01-2001: Original Document | ||
8 | |||
9 | 10-29-2004: Minor misspelling & format fix, update status of driver. | ||
10 | James Nelson <james4765@gmail.com> | ||
11 | |||
12 | Computone Intelliport II/Plus Multiport Serial Driver | ||
13 | ----------------------------------------------------- | ||
14 | |||
15 | Release Notes For Linux Kernel 2.2 and higher. | ||
16 | These notes are for the drivers which have already been integrated into the | ||
17 | kernel and have been tested on Linux kernels 2.0, 2.2, 2.3, and 2.4. | ||
18 | |||
19 | Version: 1.2.14 | ||
20 | Date: 11/01/2001 | ||
21 | Historical Author: Andrew Manison <amanison@america.net> | ||
22 | Primary Author: Doug McNash | ||
23 | Support: support@computone.com | ||
24 | Fixes and Updates: Mike Warfield <mhw@wittsend.com> | ||
25 | |||
26 | This file assumes that you are using the Computone drivers which are | ||
27 | integrated into the kernel sources. For updating the drivers or installing | ||
28 | drivers into kernels which do not already have Computone drivers, please | ||
29 | refer to the instructions in the README.computone file in the driver patch. | ||
30 | |||
31 | |||
32 | 1. INTRODUCTION | ||
33 | |||
34 | This driver supports the entire family of Intelliport II/Plus controllers | ||
35 | with the exception of the MicroChannel controllers. It does not support | ||
36 | products previous to the Intelliport II. | ||
37 | |||
38 | This driver was developed on the v2.0.x Linux tree and has been tested up | ||
39 | to v2.4.14; it will probably not work with earlier v1.X kernels,. | ||
40 | |||
41 | |||
42 | 2. QUICK INSTALLATION | ||
43 | |||
44 | Hardware - If you have an ISA card, find a free interrupt and io port. | ||
45 | List those in use with `cat /proc/interrupts` and | ||
46 | `cat /proc/ioports`. Set the card dip switches to a free | ||
47 | address. You may need to configure your BIOS to reserve an | ||
48 | irq for an ISA card. PCI and EISA parameters are set | ||
49 | automagically. Insert card into computer with the power off | ||
50 | before or after drivers installation. | ||
51 | |||
52 | Note the hardware address from the Computone ISA cards installed into | ||
53 | the system. These are required for editing ip2.c or editing | ||
54 | /etc/modprobe.conf, or for specification on the modprobe | ||
55 | command line. | ||
56 | |||
57 | Note that the /etc/modules.conf should be used for older (pre-2.6) | ||
58 | kernels. | ||
59 | |||
60 | Software - | ||
61 | |||
62 | Module installation: | ||
63 | |||
64 | a) Determine free irq/address to use if any (configure BIOS if need be) | ||
65 | b) Run "make config" or "make menuconfig" or "make xconfig" | ||
66 | Select (m) module for CONFIG_COMPUTONE under character | ||
67 | devices. CONFIG_PCI and CONFIG_MODULES also may need to be set. | ||
68 | c) Set address on ISA cards then: | ||
69 | edit /usr/src/linux/drivers/char/ip2.c if needed | ||
70 | or | ||
71 | edit /etc/modprobe.conf if needed (module). | ||
72 | or both to match this setting. | ||
73 | d) Run "make modules" | ||
74 | e) Run "make modules_install" | ||
75 | f) Run "/sbin/depmod -a" | ||
76 | g) install driver using `modprobe ip2 <options>` (options listed below) | ||
77 | h) run ip2mkdev (either the script below or the binary version) | ||
78 | |||
79 | |||
80 | Kernel installation: | ||
81 | |||
82 | a) Determine free irq/address to use if any (configure BIOS if need be) | ||
83 | b) Run "make config" or "make menuconfig" or "make xconfig" | ||
84 | Select (y) kernel for CONFIG_COMPUTONE under character | ||
85 | devices. CONFIG_PCI may need to be set if you have PCI bus. | ||
86 | c) Set address on ISA cards then: | ||
87 | edit /usr/src/linux/drivers/char/ip2.c | ||
88 | (Optional - may be specified on kernel command line now) | ||
89 | d) Run "make zImage" or whatever target you prefer. | ||
90 | e) mv /usr/src/linux/arch/i386/boot/zImage to /boot. | ||
91 | f) Add new config for this kernel into /etc/lilo.conf, run "lilo" | ||
92 | or copy to a floppy disk and boot from that floppy disk. | ||
93 | g) Reboot using this kernel | ||
94 | h) run ip2mkdev (either the script below or the binary version) | ||
95 | |||
96 | Kernel command line options: | ||
97 | |||
98 | When compiling the driver into the kernel, io and irq may be | ||
99 | compiled into the driver by editing ip2.c and setting the values for | ||
100 | io and irq in the appropriate array. An alternative is to specify | ||
101 | a command line parameter to the kernel at boot up. | ||
102 | |||
103 | ip2=io0,irq0,io1,irq1,io2,irq2,io3,irq3 | ||
104 | |||
105 | Note that this order is very different from the specifications for the | ||
106 | modload parameters which have separate IRQ and IO specifiers. | ||
107 | |||
108 | The io port also selects PCI (1) and EISA (2) boards. | ||
109 | |||
110 | io=0 No board | ||
111 | io=1 PCI board | ||
112 | io=2 EISA board | ||
113 | else ISA board io address | ||
114 | |||
115 | You only need to specify the boards which are present. | ||
116 | |||
117 | Examples: | ||
118 | |||
119 | 2 PCI boards: | ||
120 | |||
121 | ip2=1,0,1,0 | ||
122 | |||
123 | 1 ISA board at 0x310 irq 5: | ||
124 | |||
125 | ip2=0x310,5 | ||
126 | |||
127 | This can be added to and "append" option in lilo.conf similar to this: | ||
128 | |||
129 | append="ip2=1,0,1,0" | ||
130 | |||
131 | |||
132 | 3. INSTALLATION | ||
133 | |||
134 | Previously, the driver sources were packaged with a set of patch files | ||
135 | to update the character drivers' makefile and configuration file, and other | ||
136 | kernel source files. A build script (ip2build) was included which applies | ||
137 | the patches if needed, and build any utilities needed. | ||
138 | What you receive may be a single patch file in conventional kernel | ||
139 | patch format build script. That form can also be applied by | ||
140 | running patch -p1 < ThePatchFile. Otherwise run ip2build. | ||
141 | |||
142 | The driver can be installed as a module (recommended) or built into the | ||
143 | kernel. This is selected as for other drivers through the `make config` | ||
144 | command from the root of the Linux source tree. If the driver is built | ||
145 | into the kernel you will need to edit the file ip2.c to match the boards | ||
146 | you are installing. See that file for instructions. If the driver is | ||
147 | installed as a module the configuration can also be specified on the | ||
148 | modprobe command line as follows: | ||
149 | |||
150 | modprobe ip2 irq=irq1,irq2,irq3,irq4 io=addr1,addr2,addr3,addr4 | ||
151 | |||
152 | where irqnum is one of the valid Intelliport II interrupts (3,4,5,7,10,11, | ||
153 | 12,15) and addr1-4 are the base addresses for up to four controllers. If | ||
154 | the irqs are not specified the driver uses the default in ip2.c (which | ||
155 | selects polled mode). If no base addresses are specified the defaults in | ||
156 | ip2.c are used. If you are autoloading the driver module with kerneld or | ||
157 | kmod the base addresses and interrupt number must also be set in ip2.c | ||
158 | and recompile or just insert and options line in /etc/modprobe.conf or both. | ||
159 | The options line is equivalent to the command line and takes precedence over | ||
160 | what is in ip2.c. | ||
161 | |||
162 | /etc/modprobe.conf sample: | ||
163 | options ip2 io=1,0x328 irq=1,10 | ||
164 | alias char-major-71 ip2 | ||
165 | alias char-major-72 ip2 | ||
166 | alias char-major-73 ip2 | ||
167 | |||
168 | The equivalent in ip2.c: | ||
169 | |||
170 | static int io[IP2_MAX_BOARDS]= { 1, 0x328, 0, 0 }; | ||
171 | static int irq[IP2_MAX_BOARDS] = { 1, 10, -1, -1 }; | ||
172 | |||
173 | The equivalent for the kernel command line (in lilo.conf): | ||
174 | |||
175 | append="ip2=1,1,0x328,10" | ||
176 | |||
177 | |||
178 | Note: Both io and irq should be updated to reflect YOUR system. An "io" | ||
179 | address of 1 or 2 indicates a PCI or EISA card in the board table. | ||
180 | The PCI or EISA irq will be assigned automatically. | ||
181 | |||
182 | Specifying an invalid or in-use irq will default the driver into | ||
183 | running in polled mode for that card. If all irq entries are 0 then | ||
184 | all cards will operate in polled mode. | ||
185 | |||
186 | If you select the driver as part of the kernel run : | ||
187 | |||
188 | make zlilo (or whatever you do to create a bootable kernel) | ||
189 | |||
190 | If you selected a module run : | ||
191 | |||
192 | make modules && make modules_install | ||
193 | |||
194 | The utility ip2mkdev (see 5 and 7 below) creates all the device nodes | ||
195 | required by the driver. For a device to be created it must be configured | ||
196 | in the driver and the board must be installed. Only devices corresponding | ||
197 | to real IntelliPort II ports are created. With multiple boards and expansion | ||
198 | boxes this will leave gaps in the sequence of device names. ip2mkdev uses | ||
199 | Linux tty naming conventions: ttyF0 - ttyF255 for normal devices, and | ||
200 | cuf0 - cuf255 for callout devices. | ||
201 | |||
202 | |||
203 | 4. USING THE DRIVERS | ||
204 | |||
205 | As noted above, the driver implements the ports in accordance with Linux | ||
206 | conventions, and the devices should be interchangeable with the standard | ||
207 | serial devices. (This is a key point for problem reporting: please make | ||
208 | sure that what you are trying do works on the ttySx/cuax ports first; then | ||
209 | tell us what went wrong with the ip2 ports!) | ||
210 | |||
211 | Higher speeds can be obtained using the setserial utility which remaps | ||
212 | 38,400 bps (extb) to 57,600 bps, 115,200 bps, or a custom speed. | ||
213 | Intelliport II installations using the PowerPort expansion module can | ||
214 | use the custom speed setting to select the highest speeds: 153,600 bps, | ||
215 | 230,400 bps, 307,200 bps, 460,800bps and 921,600 bps. The base for | ||
216 | custom baud rate configuration is fixed at 921,600 for cards/expansion | ||
217 | modules with ST654's and 115200 for those with Cirrus CD1400's. This | ||
218 | corresponds to the maximum bit rates those chips are capable. | ||
219 | For example if the baud base is 921600 and the baud divisor is 18 then | ||
220 | the custom rate is 921600/18 = 51200 bps. See the setserial man page for | ||
221 | complete details. Of course if stty accepts the higher rates now you can | ||
222 | use that as well as the standard ioctls(). | ||
223 | |||
224 | |||
225 | 5. ip2mkdev and assorted utilities... | ||
226 | |||
227 | Several utilities, including the source for a binary ip2mkdev utility are | ||
228 | available under .../drivers/char/ip2. These can be build by changing to | ||
229 | that directory and typing "make" after the kernel has be built. If you do | ||
230 | not wish to compile the binary utilities, the shell script below can be | ||
231 | cut out and run as "ip2mkdev" to create the necessary device files. To | ||
232 | use the ip2mkdev script, you must have procfs enabled and the proc file | ||
233 | system mounted on /proc. | ||
234 | |||
235 | |||
236 | 6. NOTES | ||
237 | |||
238 | This is a release version of the driver, but it is impossible to test it | ||
239 | in all configurations of Linux. If there is any anomalous behaviour that | ||
240 | does not match the standard serial port's behaviour please let us know. | ||
241 | |||
242 | |||
243 | 7. ip2mkdev shell script | ||
244 | |||
245 | Previously, this script was simply attached here. It is now attached as a | ||
246 | shar archive to make it easier to extract the script from the documentation. | ||
247 | To create the ip2mkdev shell script change to a convenient directory (/tmp | ||
248 | works just fine) and run the following command: | ||
249 | |||
250 | unshar Documentation/serial/computone.txt | ||
251 | (This file) | ||
252 | |||
253 | You should now have a file ip2mkdev in your current working directory with | ||
254 | permissions set to execute. Running that script with then create the | ||
255 | necessary devices for the Computone boards, interfaces, and ports which | ||
256 | are present on you system at the time it is run. | ||
257 | |||
258 | |||
259 | #!/bin/sh | ||
260 | # This is a shell archive (produced by GNU sharutils 4.2.1). | ||
261 | # To extract the files from this archive, save it to some FILE, remove | ||
262 | # everything before the `!/bin/sh' line above, then type `sh FILE'. | ||
263 | # | ||
264 | # Made on 2001-10-29 10:32 EST by <mhw@alcove.wittsend.com>. | ||
265 | # Source directory was `/home2/src/tmp'. | ||
266 | # | ||
267 | # Existing files will *not* be overwritten unless `-c' is specified. | ||
268 | # | ||
269 | # This shar contains: | ||
270 | # length mode name | ||
271 | # ------ ---------- ------------------------------------------ | ||
272 | # 4251 -rwxr-xr-x ip2mkdev | ||
273 | # | ||
274 | save_IFS="${IFS}" | ||
275 | IFS="${IFS}:" | ||
276 | gettext_dir=FAILED | ||
277 | locale_dir=FAILED | ||
278 | first_param="$1" | ||
279 | for dir in $PATH | ||
280 | do | ||
281 | if test "$gettext_dir" = FAILED && test -f $dir/gettext \ | ||
282 | && ($dir/gettext --version >/dev/null 2>&1) | ||
283 | then | ||
284 | set `$dir/gettext --version 2>&1` | ||
285 | if test "$3" = GNU | ||
286 | then | ||
287 | gettext_dir=$dir | ||
288 | fi | ||
289 | fi | ||
290 | if test "$locale_dir" = FAILED && test -f $dir/shar \ | ||
291 | && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) | ||
292 | then | ||
293 | locale_dir=`$dir/shar --print-text-domain-dir` | ||
294 | fi | ||
295 | done | ||
296 | IFS="$save_IFS" | ||
297 | if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED | ||
298 | then | ||
299 | echo=echo | ||
300 | else | ||
301 | TEXTDOMAINDIR=$locale_dir | ||
302 | export TEXTDOMAINDIR | ||
303 | TEXTDOMAIN=sharutils | ||
304 | export TEXTDOMAIN | ||
305 | echo="$gettext_dir/gettext -s" | ||
306 | fi | ||
307 | if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then | ||
308 | shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' | ||
309 | elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then | ||
310 | shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' | ||
311 | elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then | ||
312 | shar_touch='touch -am $3$4$5$6$2 "$8"' | ||
313 | else | ||
314 | shar_touch=: | ||
315 | echo | ||
316 | $echo 'WARNING: not restoring timestamps. Consider getting and' | ||
317 | $echo "installing GNU \`touch', distributed in GNU File Utilities..." | ||
318 | echo | ||
319 | fi | ||
320 | rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch | ||
321 | # | ||
322 | if mkdir _sh17581; then | ||
323 | $echo 'x -' 'creating lock directory' | ||
324 | else | ||
325 | $echo 'failed to create lock directory' | ||
326 | exit 1 | ||
327 | fi | ||
328 | # ============= ip2mkdev ============== | ||
329 | if test -f 'ip2mkdev' && test "$first_param" != -c; then | ||
330 | $echo 'x -' SKIPPING 'ip2mkdev' '(file already exists)' | ||
331 | else | ||
332 | $echo 'x -' extracting 'ip2mkdev' '(text)' | ||
333 | sed 's/^X//' << 'SHAR_EOF' > 'ip2mkdev' && | ||
334 | #!/bin/sh - | ||
335 | # | ||
336 | # ip2mkdev | ||
337 | # | ||
338 | # Make or remove devices as needed for Computone Intelliport drivers | ||
339 | # | ||
340 | # First rule! If the dev file exists and you need it, don't mess | ||
341 | # with it. That prevents us from screwing up open ttys, ownership | ||
342 | # and permissions on a running system! | ||
343 | # | ||
344 | # This script will NOT remove devices that no longer exist if their | ||
345 | # board or interface box has been removed. If you want to get rid | ||
346 | # of them, you can manually do an "rm -f /dev/ttyF* /dev/cuaf*" | ||
347 | # before running this script. Running this script will then recreate | ||
348 | # all the valid devices. | ||
349 | # | ||
350 | # Michael H. Warfield | ||
351 | # /\/\|=mhw=|\/\/ | ||
352 | # mhw@wittsend.com | ||
353 | # | ||
354 | # Updated 10/29/2000 for version 1.2.13 naming convention | ||
355 | # under devfs. /\/\|=mhw=|\/\/ | ||
356 | # | ||
357 | # Updated 03/09/2000 for devfs support in ip2 drivers. /\/\|=mhw=|\/\/ | ||
358 | # | ||
359 | X | ||
360 | if test -d /dev/ip2 ; then | ||
361 | # This is devfs mode... We don't do anything except create symlinks | ||
362 | # from the real devices to the old names! | ||
363 | X cd /dev | ||
364 | X echo "Creating symbolic links to devfs devices" | ||
365 | X for i in `ls ip2` ; do | ||
366 | X if test ! -L ip2$i ; then | ||
367 | X # Remove it incase it wasn't a symlink (old device) | ||
368 | X rm -f ip2$i | ||
369 | X ln -s ip2/$i ip2$i | ||
370 | X fi | ||
371 | X done | ||
372 | X for i in `( cd tts ; ls F* )` ; do | ||
373 | X if test ! -L tty$i ; then | ||
374 | X # Remove it incase it wasn't a symlink (old device) | ||
375 | X rm -f tty$i | ||
376 | X ln -s tts/$i tty$i | ||
377 | X fi | ||
378 | X done | ||
379 | X for i in `( cd cua ; ls F* )` ; do | ||
380 | X DEVNUMBER=`expr $i : 'F\(.*\)'` | ||
381 | X if test ! -L cuf$DEVNUMBER ; then | ||
382 | X # Remove it incase it wasn't a symlink (old device) | ||
383 | X rm -f cuf$DEVNUMBER | ||
384 | X ln -s cua/$i cuf$DEVNUMBER | ||
385 | X fi | ||
386 | X done | ||
387 | X exit 0 | ||
388 | fi | ||
389 | X | ||
390 | if test ! -f /proc/tty/drivers | ||
391 | then | ||
392 | X echo "\ | ||
393 | Unable to check driver status. | ||
394 | Make sure proc file system is mounted." | ||
395 | X | ||
396 | X exit 255 | ||
397 | fi | ||
398 | X | ||
399 | if test ! -f /proc/tty/driver/ip2 | ||
400 | then | ||
401 | X echo "\ | ||
402 | Unable to locate ip2 proc file. | ||
403 | Attempting to load driver" | ||
404 | X | ||
405 | X if /sbin/insmod ip2 | ||
406 | X then | ||
407 | X if test ! -f /proc/tty/driver/ip2 | ||
408 | X then | ||
409 | X echo "\ | ||
410 | Unable to locate ip2 proc file after loading driver. | ||
411 | Driver initialization failure or driver version error. | ||
412 | " | ||
413 | X exit 255 | ||
414 | X fi | ||
415 | X else | ||
416 | X echo "Unable to load ip2 driver." | ||
417 | X exit 255 | ||
418 | X fi | ||
419 | fi | ||
420 | X | ||
421 | # Ok... So we got the driver loaded and we can locate the procfs files. | ||
422 | # Next we need our major numbers. | ||
423 | X | ||
424 | TTYMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/tt/!d' -e 's/.*tt[^ ]*[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` | ||
425 | CUAMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/cu/!d' -e 's/.*cu[^ ]*[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` | ||
426 | BRDMAJOR=`sed -e '/^Driver: /!d' -e 's/.*IMajor=\([0-9]*\)[ ]*.*/\1/' < /proc/tty/driver/ip2` | ||
427 | X | ||
428 | echo "\ | ||
429 | TTYMAJOR = $TTYMAJOR | ||
430 | CUAMAJOR = $CUAMAJOR | ||
431 | BRDMAJOR = $BRDMAJOR | ||
432 | " | ||
433 | X | ||
434 | # Ok... Now we should know our major numbers, if appropriate... | ||
435 | # Now we need our boards and start the device loops. | ||
436 | X | ||
437 | grep '^Board [0-9]:' /proc/tty/driver/ip2 | while read token number type alltherest | ||
438 | do | ||
439 | X # The test for blank "type" will catch the stats lead-in lines | ||
440 | X # if they exist in the file | ||
441 | X if test "$type" = "vacant" -o "$type" = "Vacant" -o "$type" = "" | ||
442 | X then | ||
443 | X continue | ||
444 | X fi | ||
445 | X | ||
446 | X BOARDNO=`expr "$number" : '\([0-9]\):'` | ||
447 | X PORTS=`expr "$alltherest" : '.*ports=\([0-9]*\)' | tr ',' ' '` | ||
448 | X MINORS=`expr "$alltherest" : '.*minors=\([0-9,]*\)' | tr ',' ' '` | ||
449 | X | ||
450 | X if test "$BOARDNO" = "" -o "$PORTS" = "" | ||
451 | X then | ||
452 | # This may be a bug. We should at least get this much information | ||
453 | X echo "Unable to process board line" | ||
454 | X continue | ||
455 | X fi | ||
456 | X | ||
457 | X if test "$MINORS" = "" | ||
458 | X then | ||
459 | # Silently skip this one. This board seems to have no boxes | ||
460 | X continue | ||
461 | X fi | ||
462 | X | ||
463 | X echo "board $BOARDNO: $type ports = $PORTS; port numbers = $MINORS" | ||
464 | X | ||
465 | X if test "$BRDMAJOR" != "" | ||
466 | X then | ||
467 | X BRDMINOR=`expr $BOARDNO \* 4` | ||
468 | X STSMINOR=`expr $BRDMINOR + 1` | ||
469 | X if test ! -c /dev/ip2ipl$BOARDNO ; then | ||
470 | X mknod /dev/ip2ipl$BOARDNO c $BRDMAJOR $BRDMINOR | ||
471 | X fi | ||
472 | X if test ! -c /dev/ip2stat$BOARDNO ; then | ||
473 | X mknod /dev/ip2stat$BOARDNO c $BRDMAJOR $STSMINOR | ||
474 | X fi | ||
475 | X fi | ||
476 | X | ||
477 | X if test "$TTYMAJOR" != "" | ||
478 | X then | ||
479 | X PORTNO=$BOARDBASE | ||
480 | X | ||
481 | X for PORTNO in $MINORS | ||
482 | X do | ||
483 | X if test ! -c /dev/ttyF$PORTNO ; then | ||
484 | X # We got the hardware but no device - make it | ||
485 | X mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO | ||
486 | X fi | ||
487 | X done | ||
488 | X fi | ||
489 | X | ||
490 | X if test "$CUAMAJOR" != "" | ||
491 | X then | ||
492 | X PORTNO=$BOARDBASE | ||
493 | X | ||
494 | X for PORTNO in $MINORS | ||
495 | X do | ||
496 | X if test ! -c /dev/cuf$PORTNO ; then | ||
497 | X # We got the hardware but no device - make it | ||
498 | X mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO | ||
499 | X fi | ||
500 | X done | ||
501 | X fi | ||
502 | done | ||
503 | X | ||
504 | Xexit 0 | ||
505 | SHAR_EOF | ||
506 | (set 20 01 10 29 10 32 01 'ip2mkdev'; eval "$shar_touch") && | ||
507 | chmod 0755 'ip2mkdev' || | ||
508 | $echo 'restore of' 'ip2mkdev' 'failed' | ||
509 | if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ | ||
510 | && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then | ||
511 | md5sum -c << SHAR_EOF >/dev/null 2>&1 \ | ||
512 | || $echo 'ip2mkdev:' 'MD5 check failed' | ||
513 | cb5717134509f38bad9fde6b1f79b4a4 ip2mkdev | ||
514 | SHAR_EOF | ||
515 | else | ||
516 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'ip2mkdev'`" | ||
517 | test 4251 -eq "$shar_count" || | ||
518 | $echo 'ip2mkdev:' 'original size' '4251,' 'current size' "$shar_count!" | ||
519 | fi | ||
520 | fi | ||
521 | rm -fr _sh17581 | ||
522 | exit 0 | ||
diff --git a/Documentation/serial/digiepca.txt b/Documentation/serial/digiepca.txt new file mode 100644 index 000000000000..f2560e22f2c9 --- /dev/null +++ b/Documentation/serial/digiepca.txt | |||
@@ -0,0 +1,98 @@ | |||
1 | NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at | ||
2 | http://www.digi.com for PCI cards. They no longer maintain this driver, | ||
3 | and have no 2.6 driver for ISA cards. | ||
4 | |||
5 | This driver requires a number of user-space tools. They can be acquired from | ||
6 | http://www.digi.com, but only works with 2.4 kernels. | ||
7 | |||
8 | |||
9 | The Digi Intl. epca driver. | ||
10 | ---------------------------- | ||
11 | The Digi Intl. epca driver for Linux supports the following boards: | ||
12 | |||
13 | Digi PC/Xem, PC/Xr, PC/Xe, PC/Xi, PC/Xeve | ||
14 | Digi EISA/Xem, PCI/Xem, PCI/Xr | ||
15 | |||
16 | Limitations: | ||
17 | ------------ | ||
18 | Currently the driver only autoprobes for supported PCI boards. | ||
19 | |||
20 | The Linux MAKEDEV command does not support generating the Digiboard | ||
21 | Devices. Users executing digiConfig to setup EISA and PC series cards | ||
22 | will have their device nodes automatically constructed (cud?? for ~CLOCAL, | ||
23 | and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO | ||
24 | prompt, or those users booting PCI cards may use buildDIGI to construct | ||
25 | the necessary nodes. | ||
26 | |||
27 | Notes: | ||
28 | ------ | ||
29 | This driver may be configured via LILO. For users who have already configured | ||
30 | their driver using digiConfig, configuring from LILO will override previous | ||
31 | settings. Multiple boards may be configured by issuing multiple LILO command | ||
32 | lines. For examples see the bottom of this document. | ||
33 | |||
34 | Device names start at 0 and continue up. Beware of this as previous Digi | ||
35 | drivers started device names with 1. | ||
36 | |||
37 | PCI boards are auto-detected and configured by the driver. PCI boards will | ||
38 | be allocated device numbers (internally) beginning with the lowest PCI slot | ||
39 | first. In other words a PCI card in slot 3 will always have higher device | ||
40 | nodes than a PCI card in slot 1. | ||
41 | |||
42 | LILO config examples: | ||
43 | --------------------- | ||
44 | Using LILO's APPEND command, a string of comma separated identifiers or | ||
45 | integers can be used to configure supported boards. The six values in order | ||
46 | are: | ||
47 | |||
48 | Enable/Disable this card or Override, | ||
49 | Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2), | ||
50 | EISA/Xem (3), PC/64Xe (4), PC/Xi (5), | ||
51 | Enable/Disable alternate pin arrangement, | ||
52 | Number of ports on this card, | ||
53 | I/O Port where card is configured (in HEX if using string identifiers), | ||
54 | Base of memory window (in HEX if using string identifiers), | ||
55 | |||
56 | NOTE : PCI boards are auto-detected and configured. Do not attempt to | ||
57 | configure PCI boards with the LILO append command. If you wish to override | ||
58 | previous configuration data (As set by digiConfig), but you do not wish to | ||
59 | configure any specific card (Example if there are PCI cards in the system) | ||
60 | the following override command will accomplish this: | ||
61 | -> append="digi=2" | ||
62 | |||
63 | Samples: | ||
64 | append="digiepca=E,PC/Xe,D,16,200,D0000" | ||
65 | or | ||
66 | append="digi=1,0,0,16,512,851968" | ||
67 | |||
68 | Supporting Tools: | ||
69 | ----------------- | ||
70 | Supporting tools include digiDload, digiConfig, buildPCI, and ditty. See | ||
71 | drivers/char/README.epca for more details. Note, | ||
72 | this driver REQUIRES that digiDload be executed prior to it being used. | ||
73 | Failure to do this will result in an ENODEV error. | ||
74 | |||
75 | Documentation: | ||
76 | -------------- | ||
77 | Complete documentation for this product may be found in the tool package. | ||
78 | |||
79 | Sources of information and support: | ||
80 | ----------------------------------- | ||
81 | Digi Intl. support site for this product: | ||
82 | |||
83 | -> http://www.digi.com | ||
84 | |||
85 | Acknowledgments: | ||
86 | ---------------- | ||
87 | Much of this work (And even text) was derived from a similar document | ||
88 | supporting the original public domain DigiBoard driver Copyright (C) | ||
89 | 1994,1995 Troy De Jongh. Many thanks to Christoph Lameter | ||
90 | (christoph@lameter.com) and Mike McLagan (mike.mclagan@linux.org) who authored | ||
91 | and contributed to the original document. | ||
92 | |||
93 | Changelog: | ||
94 | ---------- | ||
95 | 10-29-04: Update status of driver, remove dead links in document | ||
96 | James Nelson <james4765@gmail.com> | ||
97 | |||
98 | 2000 (?) Original Document | ||
diff --git a/Documentation/serial/hayes-esp.txt b/Documentation/serial/hayes-esp.txt new file mode 100644 index 000000000000..09b5d5856758 --- /dev/null +++ b/Documentation/serial/hayes-esp.txt | |||
@@ -0,0 +1,154 @@ | |||
1 | HAYES ESP DRIVER VERSION 2.1 | ||
2 | |||
3 | A big thanks to the people at Hayes, especially Alan Adamson. Their support | ||
4 | has enabled me to provide enhancements to the driver. | ||
5 | |||
6 | Please report your experiences with this driver to me (arobinso@nyx.net). I | ||
7 | am looking for both positive and negative feedback. | ||
8 | |||
9 | *** IMPORTANT CHANGES FOR 2.1 *** | ||
10 | Support for PIO mode. Five situations will cause PIO mode to be used: | ||
11 | 1) A multiport card is detected. PIO mode will always be used. (8 port cards | ||
12 | do not support DMA). | ||
13 | 2) The DMA channel is set to an invalid value (anything other than 1 or 3). | ||
14 | 3) The DMA buffer/channel could not be allocated. The port will revert to PIO | ||
15 | mode until it is reopened. | ||
16 | 4) Less than a specified number of bytes need to be transferred to/from the | ||
17 | FIFOs. PIO mode will be used for that transfer only. | ||
18 | 5) A port needs to do a DMA transfer and another port is already using the | ||
19 | DMA channel. PIO mode will be used for that transfer only. | ||
20 | |||
21 | Since the Hayes ESP seems to conflict with other cards (notably sound cards) | ||
22 | when using DMA, DMA is turned off by default. To use DMA, it must be turned | ||
23 | on explicitly, either with the "dma=" option described below or with | ||
24 | setserial. A multiport card can be forced into DMA mode by using setserial; | ||
25 | however, most multiport cards don't support DMA. | ||
26 | |||
27 | The latest version of setserial allows the enhanced configuration of the ESP | ||
28 | card to be viewed and modified. | ||
29 | *** | ||
30 | |||
31 | This package contains the files needed to compile a module to support the Hayes | ||
32 | ESP card. The drivers are basically a modified version of the serial drivers. | ||
33 | |||
34 | Features: | ||
35 | |||
36 | - Uses the enhanced mode of the ESP card, allowing a wider range of | ||
37 | interrupts and features than compatibility mode | ||
38 | - Uses DMA and 16 bit PIO mode to transfer data to and from the ESP's FIFOs, | ||
39 | reducing CPU load | ||
40 | - Supports primary and secondary ports | ||
41 | |||
42 | |||
43 | If the driver is compiled as a module, the IRQs to use can be specified by | ||
44 | using the irq= option. The format is: | ||
45 | |||
46 | irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380] | ||
47 | |||
48 | The address in brackets is the base address of the card. The IRQ of | ||
49 | nonexistent cards can be set to 0. If an IRQ of a card that does exist is set | ||
50 | to 0, the driver will attempt to guess at the correct IRQ. For example, to set | ||
51 | the IRQ of the card at address 0x300 to 12, the insmod command would be: | ||
52 | |||
53 | insmod esp irq=0,0,0,0,0,0,12,0 | ||
54 | |||
55 | The custom divisor can be set by using the divisor= option. The format is the | ||
56 | same as for the irq= option. Each divisor value is a series of hex digits, | ||
57 | with each digit representing the divisor to use for a corresponding port. The | ||
58 | divisor value is constructed RIGHT TO LEFT. Specifying a nonzero divisor value | ||
59 | will automatically set the spd_cust flag. To calculate the divisor to use for | ||
60 | a certain baud rate, divide the port's base baud (generally 921600) by the | ||
61 | desired rate. For example, to set the divisor of the primary port at 0x300 to | ||
62 | 4 and the divisor of the secondary port at 0x308 to 8, the insmod command would | ||
63 | be: | ||
64 | |||
65 | insmod esp divisor=0,0,0,0,0,0,0x84,0 | ||
66 | |||
67 | The dma= option can be used to set the DMA channel. The channel can be either | ||
68 | 1 or 3. Specifying any other value will force the driver to use PIO mode. | ||
69 | For example, to set the DMA channel to 3, the insmod command would be: | ||
70 | |||
71 | insmod esp dma=3 | ||
72 | |||
73 | The rx_trigger= and tx_trigger= options can be used to set the FIFO trigger | ||
74 | levels. They specify when the ESP card should send an interrupt. Larger | ||
75 | values will decrease the number of interrupts; however, a value too high may | ||
76 | result in data loss. Valid values are 1 through 1023, with 768 being the | ||
77 | default. For example, to set the receive trigger level to 512 bytes and the | ||
78 | transmit trigger level to 700 bytes, the insmod command would be: | ||
79 | |||
80 | insmod esp rx_trigger=512 tx_trigger=700 | ||
81 | |||
82 | The flow_off= and flow_on= options can be used to set the hardware flow off/ | ||
83 | flow on levels. The flow on level must be lower than the flow off level, and | ||
84 | the flow off level should be higher than rx_trigger. Valid values are 1 | ||
85 | through 1023, with 1016 being the default flow off level and 944 being the | ||
86 | default flow on level. For example, to set the flow off level to 1000 bytes | ||
87 | and the flow on level to 935 bytes, the insmod command would be: | ||
88 | |||
89 | insmod esp flow_off=1000 flow_on=935 | ||
90 | |||
91 | The rx_timeout= option can be used to set the receive timeout value. This | ||
92 | value indicates how long after receiving the last character that the ESP card | ||
93 | should wait before signalling an interrupt. Valid values are 0 though 255, | ||
94 | with 128 being the default. A value too high will increase latency, and a | ||
95 | value too low will cause unnecessary interrupts. For example, to set the | ||
96 | receive timeout to 255, the insmod command would be: | ||
97 | |||
98 | insmod esp rx_timeout=255 | ||
99 | |||
100 | The pio_threshold= option sets the threshold (in number of characters) for | ||
101 | using PIO mode instead of DMA mode. For example, if this value is 32, | ||
102 | transfers of 32 bytes or less will always use PIO mode. | ||
103 | |||
104 | insmod esp pio_threshold=32 | ||
105 | |||
106 | Multiple options can be listed on the insmod command line by separating each | ||
107 | option with a space. For example: | ||
108 | |||
109 | insmod esp dma=3 trigger=512 | ||
110 | |||
111 | The esp module can be automatically loaded when needed. To cause this to | ||
112 | happen, add the following lines to /etc/modprobe.conf (replacing the last line | ||
113 | with options for your configuration): | ||
114 | |||
115 | alias char-major-57 esp | ||
116 | alias char-major-58 esp | ||
117 | options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0 | ||
118 | |||
119 | You may also need to run 'depmod -a'. | ||
120 | |||
121 | Devices must be created manually. To create the devices, note the output from | ||
122 | the module after it is inserted. The output will appear in the location where | ||
123 | kernel messages usually appear (usually /var/adm/messages). Create two devices | ||
124 | for each 'tty' mentioned, one with major of 57 and the other with major of 58. | ||
125 | The minor number should be the same as the tty number reported. The commands | ||
126 | would be (replace ? with the tty number): | ||
127 | |||
128 | mknod /dev/ttyP? c 57 ? | ||
129 | mknod /dev/cup? c 58 ? | ||
130 | |||
131 | For example, if the following line appears: | ||
132 | |||
133 | Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port | ||
134 | |||
135 | ...two devices should be created: | ||
136 | |||
137 | mknod /dev/ttyP8 c 57 8 | ||
138 | mknod /dev/cup8 c 58 8 | ||
139 | |||
140 | You may need to set the permissions on the devices: | ||
141 | |||
142 | chmod 666 /dev/ttyP* | ||
143 | chmod 666 /dev/cup* | ||
144 | |||
145 | The ESP module and the serial module should not conflict (they can be used at | ||
146 | the same time). After the ESP module has been loaded the ports on the ESP card | ||
147 | will no longer be accessible by the serial driver. | ||
148 | |||
149 | If I/O errors are experienced when accessing the port, check for IRQ and DMA | ||
150 | conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and | ||
151 | DMAs currently in use). | ||
152 | |||
153 | Enjoy! | ||
154 | Andrew J. Robinson <arobinso@nyx.net> | ||
diff --git a/Documentation/serial/moxa-smartio b/Documentation/serial/moxa-smartio new file mode 100644 index 000000000000..5337e80a5b96 --- /dev/null +++ b/Documentation/serial/moxa-smartio | |||
@@ -0,0 +1,523 @@ | |||
1 | ============================================================================= | ||
2 | MOXA Smartio/Industio Family Device Driver Installation Guide | ||
3 | for Linux Kernel 2.4.x, 2.6.x | ||
4 | Copyright (C) 2008, Moxa Inc. | ||
5 | ============================================================================= | ||
6 | Date: 01/21/2008 | ||
7 | |||
8 | Content | ||
9 | |||
10 | 1. Introduction | ||
11 | 2. System Requirement | ||
12 | 3. Installation | ||
13 | 3.1 Hardware installation | ||
14 | 3.2 Driver files | ||
15 | 3.3 Device naming convention | ||
16 | 3.4 Module driver configuration | ||
17 | 3.5 Static driver configuration for Linux kernel 2.4.x and 2.6.x. | ||
18 | 3.6 Custom configuration | ||
19 | 3.7 Verify driver installation | ||
20 | 4. Utilities | ||
21 | 5. Setserial | ||
22 | 6. Troubleshooting | ||
23 | |||
24 | ----------------------------------------------------------------------------- | ||
25 | 1. Introduction | ||
26 | |||
27 | The Smartio/Industio/UPCI family Linux driver supports following multiport | ||
28 | boards. | ||
29 | |||
30 | - 2 ports multiport board | ||
31 | CP-102U, CP-102UL, CP-102UF | ||
32 | CP-132U-I, CP-132UL, | ||
33 | CP-132, CP-132I, CP132S, CP-132IS, | ||
34 | CI-132, CI-132I, CI-132IS, | ||
35 | (C102H, C102HI, C102HIS, C102P, CP-102, CP-102S) | ||
36 | |||
37 | - 4 ports multiport board | ||
38 | CP-104EL, | ||
39 | CP-104UL, CP-104JU, | ||
40 | CP-134U, CP-134U-I, | ||
41 | C104H/PCI, C104HS/PCI, | ||
42 | CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL, | ||
43 | C104H, C104HS, | ||
44 | CI-104J, CI-104JS, | ||
45 | CI-134, CI-134I, CI-134IS, | ||
46 | (C114HI, CT-114I, C104P) | ||
47 | POS-104UL, | ||
48 | CB-114, | ||
49 | CB-134I | ||
50 | |||
51 | - 8 ports multiport board | ||
52 | CP-118EL, CP-168EL, | ||
53 | CP-118U, CP-168U, | ||
54 | C168H/PCI, | ||
55 | C168H, C168HS, | ||
56 | (C168P), | ||
57 | CB-108 | ||
58 | |||
59 | This driver and installation procedure have been developed upon Linux Kernel | ||
60 | 2.4.x and 2.6.x. This driver supports Intel x86 hardware platform. In order | ||
61 | to maintain compatibility, this version has also been properly tested with | ||
62 | RedHat, Mandrake, Fedora and S.u.S.E Linux. However, if compatibility problem | ||
63 | occurs, please contact Moxa at support@moxa.com.tw. | ||
64 | |||
65 | In addition to device driver, useful utilities are also provided in this | ||
66 | version. They are | ||
67 | - msdiag Diagnostic program for displaying installed Moxa | ||
68 | Smartio/Industio boards. | ||
69 | - msmon Monitor program to observe data count and line status signals. | ||
70 | - msterm A simple terminal program which is useful in testing serial | ||
71 | ports. | ||
72 | - io-irq.exe Configuration program to setup ISA boards. Please note that | ||
73 | this program can only be executed under DOS. | ||
74 | |||
75 | All the drivers and utilities are published in form of source code under | ||
76 | GNU General Public License in this version. Please refer to GNU General | ||
77 | Public License announcement in each source code file for more detail. | ||
78 | |||
79 | In Moxa's Web sites, you may always find latest driver at http://web.moxa.com. | ||
80 | |||
81 | This version of driver can be installed as Loadable Module (Module driver) | ||
82 | or built-in into kernel (Static driver). You may refer to following | ||
83 | installation procedure for suitable one. Before you install the driver, | ||
84 | please refer to hardware installation procedure in the User's Manual. | ||
85 | |||
86 | We assume the user should be familiar with following documents. | ||
87 | - Serial-HOWTO | ||
88 | - Kernel-HOWTO | ||
89 | |||
90 | ----------------------------------------------------------------------------- | ||
91 | 2. System Requirement | ||
92 | - Hardware platform: Intel x86 machine | ||
93 | - Kernel version: 2.4.x or 2.6.x | ||
94 | - gcc version 2.72 or later | ||
95 | - Maximum 4 boards can be installed in combination | ||
96 | |||
97 | ----------------------------------------------------------------------------- | ||
98 | 3. Installation | ||
99 | |||
100 | 3.1 Hardware installation | ||
101 | 3.2 Driver files | ||
102 | 3.3 Device naming convention | ||
103 | 3.4 Module driver configuration | ||
104 | 3.5 Static driver configuration for Linux kernel 2.4.x, 2.6.x. | ||
105 | 3.6 Custom configuration | ||
106 | 3.7 Verify driver installation | ||
107 | |||
108 | |||
109 | 3.1 Hardware installation | ||
110 | |||
111 | There are two types of buses, ISA and PCI, for Smartio/Industio | ||
112 | family multiport board. | ||
113 | |||
114 | ISA board | ||
115 | --------- | ||
116 | You'll have to configure CAP address, I/O address, Interrupt Vector | ||
117 | as well as IRQ before installing this driver. Please refer to hardware | ||
118 | installation procedure in User's Manual before proceed any further. | ||
119 | Please make sure the JP1 is open after the ISA board is set properly. | ||
120 | |||
121 | PCI/UPCI board | ||
122 | -------------- | ||
123 | You may need to adjust IRQ usage in BIOS to avoid from IRQ conflict | ||
124 | with other ISA devices. Please refer to hardware installation | ||
125 | procedure in User's Manual in advance. | ||
126 | |||
127 | PCI IRQ Sharing | ||
128 | ----------- | ||
129 | Each port within the same multiport board shares the same IRQ. Up to | ||
130 | 4 Moxa Smartio/Industio PCI Family multiport boards can be installed | ||
131 | together on one system and they can share the same IRQ. | ||
132 | |||
133 | |||
134 | 3.2 Driver files | ||
135 | |||
136 | The driver file may be obtained from ftp, CD-ROM or floppy disk. The | ||
137 | first step, anyway, is to copy driver file "mxser.tgz" into specified | ||
138 | directory. e.g. /moxa. The execute commands as below. | ||
139 | |||
140 | # cd / | ||
141 | # mkdir moxa | ||
142 | # cd /moxa | ||
143 | # tar xvf /dev/fd0 | ||
144 | |||
145 | or | ||
146 | |||
147 | # cd / | ||
148 | # mkdir moxa | ||
149 | # cd /moxa | ||
150 | # cp /mnt/cdrom/<driver directory>/mxser.tgz . | ||
151 | # tar xvfz mxser.tgz | ||
152 | |||
153 | |||
154 | 3.3 Device naming convention | ||
155 | |||
156 | You may find all the driver and utilities files in /moxa/mxser. | ||
157 | Following installation procedure depends on the model you'd like to | ||
158 | run the driver. If you prefer module driver, please refer to 3.4. | ||
159 | If static driver is required, please refer to 3.5. | ||
160 | |||
161 | Dialin and callout port | ||
162 | ----------------------- | ||
163 | This driver remains traditional serial device properties. There are | ||
164 | two special file name for each serial port. One is dial-in port | ||
165 | which is named "ttyMxx". For callout port, the naming convention | ||
166 | is "cumxx". | ||
167 | |||
168 | Device naming when more than 2 boards installed | ||
169 | ----------------------------------------------- | ||
170 | Naming convention for each Smartio/Industio multiport board is | ||
171 | pre-defined as below. | ||
172 | |||
173 | Board Num. Dial-in Port Callout port | ||
174 | 1st board ttyM0 - ttyM7 cum0 - cum7 | ||
175 | 2nd board ttyM8 - ttyM15 cum8 - cum15 | ||
176 | 3rd board ttyM16 - ttyM23 cum16 - cum23 | ||
177 | 4th board ttyM24 - ttym31 cum24 - cum31 | ||
178 | |||
179 | |||
180 | !!!!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
181 | Under Kernel 2.6 the cum Device is Obsolete. So use ttyM* | ||
182 | device instead. | ||
183 | !!!!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
184 | |||
185 | Board sequence | ||
186 | -------------- | ||
187 | This driver will activate ISA boards according to the parameter set | ||
188 | in the driver. After all specified ISA board activated, PCI board | ||
189 | will be installed in the system automatically driven. | ||
190 | Therefore the board number is sorted by the CAP address of ISA boards. | ||
191 | For PCI boards, their sequence will be after ISA boards and C168H/PCI | ||
192 | has higher priority than C104H/PCI boards. | ||
193 | |||
194 | 3.4 Module driver configuration | ||
195 | Module driver is easiest way to install. If you prefer static driver | ||
196 | installation, please skip this paragraph. | ||
197 | |||
198 | |||
199 | ------------- Prepare to use the MOXA driver-------------------- | ||
200 | 3.4.1 Create tty device with correct major number | ||
201 | Before using MOXA driver, your system must have the tty devices | ||
202 | which are created with driver's major number. We offer one shell | ||
203 | script "msmknod" to simplify the procedure. | ||
204 | This step is only needed to be executed once. But you still | ||
205 | need to do this procedure when: | ||
206 | a. You change the driver's major number. Please refer the "3.7" | ||
207 | section. | ||
208 | b. Your total installed MOXA boards number is changed. Maybe you | ||
209 | add/delete one MOXA board. | ||
210 | c. You want to change the tty name. This needs to modify the | ||
211 | shell script "msmknod" | ||
212 | |||
213 | The procedure is: | ||
214 | # cd /moxa/mxser/driver | ||
215 | # ./msmknod | ||
216 | |||
217 | This shell script will require the major number for dial-in | ||
218 | device and callout device to create tty device. You also need | ||
219 | to specify the total installed MOXA board number. Default major | ||
220 | numbers for dial-in device and callout device are 30, 35. If | ||
221 | you need to change to other number, please refer section "3.7" | ||
222 | for more detailed procedure. | ||
223 | Msmknod will delete any special files occupying the same device | ||
224 | naming. | ||
225 | |||
226 | 3.4.2 Build the MOXA driver and utilities | ||
227 | Before using the MOXA driver and utilities, you need compile the | ||
228 | all the source code. This step is only need to be executed once. | ||
229 | But you still re-compile the source code if you modify the source | ||
230 | code. For example, if you change the driver's major number (see | ||
231 | "3.7" section), then you need to do this step again. | ||
232 | |||
233 | Find "Makefile" in /moxa/mxser, then run | ||
234 | |||
235 | # make clean; make install | ||
236 | |||
237 | !!!!!!!!!! NOTE !!!!!!!!!!!!!!!!! | ||
238 | For Red Hat 9, Red Hat Enterprise Linux AS3/ES3/WS3 & Fedora Core1: | ||
239 | # make clean; make installsp1 | ||
240 | |||
241 | For Red Hat Enterprise Linux AS4/ES4/WS4: | ||
242 | # make clean; make installsp2 | ||
243 | !!!!!!!!!! NOTE !!!!!!!!!!!!!!!!! | ||
244 | |||
245 | The driver files "mxser.o" and utilities will be properly compiled | ||
246 | and copied to system directories respectively. | ||
247 | |||
248 | ------------- Load MOXA driver-------------------- | ||
249 | 3.4.3 Load the MOXA driver | ||
250 | |||
251 | # modprobe mxser <argument> | ||
252 | |||
253 | will activate the module driver. You may run "lsmod" to check | ||
254 | if "mxser" is activated. If the MOXA board is ISA board, the | ||
255 | <argument> is needed. Please refer to section "3.4.5" for more | ||
256 | information. | ||
257 | |||
258 | |||
259 | ------------- Load MOXA driver on boot -------------------- | ||
260 | 3.4.4 For the above description, you may manually execute | ||
261 | "modprobe mxser" to activate this driver and run | ||
262 | "rmmod mxser" to remove it. | ||
263 | However, it's better to have a boot time configuration to | ||
264 | eliminate manual operation. Boot time configuration can be | ||
265 | achieved by rc file. We offer one "rc.mxser" file to simplify | ||
266 | the procedure under "moxa/mxser/driver". | ||
267 | |||
268 | But if you use ISA board, please modify the "modprobe ..." command | ||
269 | to add the argument (see "3.4.5" section). After modifying the | ||
270 | rc.mxser, please try to execute "/moxa/mxser/driver/rc.mxser" | ||
271 | manually to make sure the modification is ok. If any error | ||
272 | encountered, please try to modify again. If the modification is | ||
273 | completed, follow the below step. | ||
274 | |||
275 | Run following command for setting rc files. | ||
276 | |||
277 | # cd /moxa/mxser/driver | ||
278 | # cp ./rc.mxser /etc/rc.d | ||
279 | # cd /etc/rc.d | ||
280 | |||
281 | Check "rc.serial" is existed or not. If "rc.serial" doesn't exist, | ||
282 | create it by vi, run "chmod 755 rc.serial" to change the permission. | ||
283 | Add "/etc/rc.d/rc.mxser" in last line, | ||
284 | |||
285 | Reboot and check if moxa.o activated by "lsmod" command. | ||
286 | |||
287 | 3.4.5. If you'd like to drive Smartio/Industio ISA boards in the system, | ||
288 | you'll have to add parameter to specify CAP address of given | ||
289 | board while activating "mxser.o". The format for parameters are | ||
290 | as follows. | ||
291 | |||
292 | modprobe mxser ioaddr=0x???,0x???,0x???,0x??? | ||
293 | | | | | | ||
294 | | | | +- 4th ISA board | ||
295 | | | +------ 3rd ISA board | ||
296 | | +------------ 2nd ISA board | ||
297 | +------------------- 1st ISA board | ||
298 | |||
299 | 3.5 Static driver configuration for Linux kernel 2.4.x and 2.6.x | ||
300 | |||
301 | Note: To use static driver, you must install the linux kernel | ||
302 | source package. | ||
303 | |||
304 | 3.5.1 Backup the built-in driver in the kernel. | ||
305 | # cd /usr/src/linux/drivers/char | ||
306 | # mv mxser.c mxser.c.old | ||
307 | |||
308 | For Red Hat 7.x user, you need to create link: | ||
309 | # cd /usr/src | ||
310 | # ln -s linux-2.4 linux | ||
311 | |||
312 | 3.5.2 Create link | ||
313 | # cd /usr/src/linux/drivers/char | ||
314 | # ln -s /moxa/mxser/driver/mxser.c mxser.c | ||
315 | |||
316 | 3.5.3 Add CAP address list for ISA boards. For PCI boards user, | ||
317 | please skip this step. | ||
318 | |||
319 | In module mode, the CAP address for ISA board is given by | ||
320 | parameter. In static driver configuration, you'll have to | ||
321 | assign it within driver's source code. If you will not | ||
322 | install any ISA boards, you may skip to next portion. | ||
323 | The instructions to modify driver source code are as | ||
324 | below. | ||
325 | a. # cd /moxa/mxser/driver | ||
326 | # vi mxser.c | ||
327 | b. Find the array mxserBoardCAP[] as below. | ||
328 | |||
329 | static int mxserBoardCAP[] | ||
330 | = {0x00, 0x00, 0x00, 0x00}; | ||
331 | |||
332 | c. Change the address within this array using vi. For | ||
333 | example, to driver 2 ISA boards with CAP address | ||
334 | 0x280 and 0x180 as 1st and 2nd board. Just to change | ||
335 | the source code as follows. | ||
336 | |||
337 | static int mxserBoardCAP[] | ||
338 | = {0x280, 0x180, 0x00, 0x00}; | ||
339 | |||
340 | 3.5.4 Setup kernel configuration | ||
341 | |||
342 | Configure the kernel: | ||
343 | |||
344 | # cd /usr/src/linux | ||
345 | # make menuconfig | ||
346 | |||
347 | You will go into a menu-driven system. Please select [Character | ||
348 | devices][Non-standard serial port support], enable the [Moxa | ||
349 | SmartIO support] driver with "[*]" for built-in (not "[M]"), then | ||
350 | select [Exit] to exit this program. | ||
351 | |||
352 | 3.5.5 Rebuild kernel | ||
353 | The following are for Linux kernel rebuilding, for your | ||
354 | reference only. | ||
355 | For appropriate details, please refer to the Linux document. | ||
356 | |||
357 | a. cd /usr/src/linux | ||
358 | b. make clean /* take a few minutes */ | ||
359 | c. make dep /* take a few minutes */ | ||
360 | d. make bzImage /* take probably 10-20 minutes */ | ||
361 | e. make install /* copy boot image to correct position */ | ||
362 | f. Please make sure the boot kernel (vmlinuz) is in the | ||
363 | correct position. | ||
364 | g. If you use 'lilo' utility, you should check /etc/lilo.conf | ||
365 | 'image' item specified the path which is the 'vmlinuz' path, | ||
366 | or you will load wrong (or old) boot kernel image (vmlinuz). | ||
367 | After checking /etc/lilo.conf, please run "lilo". | ||
368 | |||
369 | Note that if the result of "make bzImage" is ERROR, then you have to | ||
370 | go back to Linux configuration Setup. Type "make menuconfig" in | ||
371 | directory /usr/src/linux. | ||
372 | |||
373 | |||
374 | 3.5.6 Make tty device and special file | ||
375 | # cd /moxa/mxser/driver | ||
376 | # ./msmknod | ||
377 | |||
378 | 3.5.7 Make utility | ||
379 | # cd /moxa/mxser/utility | ||
380 | # make clean; make install | ||
381 | |||
382 | 3.5.8 Reboot | ||
383 | |||
384 | |||
385 | |||
386 | 3.6 Custom configuration | ||
387 | Although this driver already provides you default configuration, you | ||
388 | still can change the device name and major number. The instruction to | ||
389 | change these parameters are shown as below. | ||
390 | |||
391 | Change Device name | ||
392 | ------------------ | ||
393 | If you'd like to use other device names instead of default naming | ||
394 | convention, all you have to do is to modify the internal code | ||
395 | within the shell script "msmknod". First, you have to open "msmknod" | ||
396 | by vi. Locate each line contains "ttyM" and "cum" and change them | ||
397 | to the device name you desired. "msmknod" creates the device names | ||
398 | you need next time executed. | ||
399 | |||
400 | Change Major number | ||
401 | ------------------- | ||
402 | If major number 30 and 35 had been occupied, you may have to select | ||
403 | 2 free major numbers for this driver. There are 3 steps to change | ||
404 | major numbers. | ||
405 | |||
406 | 3.6.1 Find free major numbers | ||
407 | In /proc/devices, you may find all the major numbers occupied | ||
408 | in the system. Please select 2 major numbers that are available. | ||
409 | e.g. 40, 45. | ||
410 | 3.6.2 Create special files | ||
411 | Run /moxa/mxser/driver/msmknod to create special files with | ||
412 | specified major numbers. | ||
413 | 3.6.3 Modify driver with new major number | ||
414 | Run vi to open /moxa/mxser/driver/mxser.c. Locate the line | ||
415 | contains "MXSERMAJOR". Change the content as below. | ||
416 | #define MXSERMAJOR 40 | ||
417 | #define MXSERCUMAJOR 45 | ||
418 | 3.6.4 Run "make clean; make install" in /moxa/mxser/driver. | ||
419 | |||
420 | 3.7 Verify driver installation | ||
421 | You may refer to /var/log/messages to check the latest status | ||
422 | log reported by this driver whenever it's activated. | ||
423 | |||
424 | ----------------------------------------------------------------------------- | ||
425 | 4. Utilities | ||
426 | There are 3 utilities contained in this driver. They are msdiag, msmon and | ||
427 | msterm. These 3 utilities are released in form of source code. They should | ||
428 | be compiled into executable file and copied into /usr/bin. | ||
429 | |||
430 | Before using these utilities, please load driver (refer 3.4 & 3.5) and | ||
431 | make sure you had run the "msmknod" utility. | ||
432 | |||
433 | msdiag - Diagnostic | ||
434 | -------------------- | ||
435 | This utility provides the function to display what Moxa Smartio/Industio | ||
436 | board found by driver in the system. | ||
437 | |||
438 | msmon - Port Monitoring | ||
439 | ----------------------- | ||
440 | This utility gives the user a quick view about all the MOXA ports' | ||
441 | activities. One can easily learn each port's total received/transmitted | ||
442 | (Rx/Tx) character count since the time when the monitoring is started. | ||
443 | Rx/Tx throughputs per second are also reported in interval basis (e.g. | ||
444 | the last 5 seconds) and in average basis (since the time the monitoring | ||
445 | is started). You can reset all ports' count by <HOME> key. <+> <-> | ||
446 | (plus/minus) keys to change the displaying time interval. Press <ENTER> | ||
447 | on the port, that cursor stay, to view the port's communication | ||
448 | parameters, signal status, and input/output queue. | ||
449 | |||
450 | msterm - Terminal Emulation | ||
451 | --------------------------- | ||
452 | This utility provides data sending and receiving ability of all tty ports, | ||
453 | especially for MOXA ports. It is quite useful for testing simple | ||
454 | application, for example, sending AT command to a modem connected to the | ||
455 | port or used as a terminal for login purpose. Note that this is only a | ||
456 | dumb terminal emulation without handling full screen operation. | ||
457 | |||
458 | ----------------------------------------------------------------------------- | ||
459 | 5. Setserial | ||
460 | |||
461 | Supported Setserial parameters are listed as below. | ||
462 | |||
463 | uart set UART type(16450-->disable FIFO, 16550A-->enable FIFO) | ||
464 | close_delay set the amount of time(in 1/100 of a second) that DTR | ||
465 | should be kept low while being closed. | ||
466 | closing_wait set the amount of time(in 1/100 of a second) that the | ||
467 | serial port should wait for data to be drained while | ||
468 | being closed, before the receiver is disable. | ||
469 | spd_hi Use 57.6kb when the application requests 38.4kb. | ||
470 | spd_vhi Use 115.2kb when the application requests 38.4kb. | ||
471 | spd_shi Use 230.4kb when the application requests 38.4kb. | ||
472 | spd_warp Use 460.8kb when the application requests 38.4kb. | ||
473 | spd_normal Use 38.4kb when the application requests 38.4kb. | ||
474 | spd_cust Use the custom divisor to set the speed when the | ||
475 | application requests 38.4kb. | ||
476 | divisor This option set the custom divison. | ||
477 | baud_base This option set the base baud rate. | ||
478 | |||
479 | ----------------------------------------------------------------------------- | ||
480 | 6. Troubleshooting | ||
481 | |||
482 | The boot time error messages and solutions are stated as clearly as | ||
483 | possible. If all the possible solutions fail, please contact our technical | ||
484 | support team to get more help. | ||
485 | |||
486 | |||
487 | Error msg: More than 4 Moxa Smartio/Industio family boards found. Fifth board | ||
488 | and after are ignored. | ||
489 | Solution: | ||
490 | To avoid this problem, please unplug fifth and after board, because Moxa | ||
491 | driver supports up to 4 boards. | ||
492 | |||
493 | Error msg: Request_irq fail, IRQ(?) may be conflict with another device. | ||
494 | Solution: | ||
495 | Other PCI or ISA devices occupy the assigned IRQ. If you are not sure | ||
496 | which device causes the situation, please check /proc/interrupts to find | ||
497 | free IRQ and simply change another free IRQ for Moxa board. | ||
498 | |||
499 | Error msg: Board #: C1xx Series(CAP=xxx) interrupt number invalid. | ||
500 | Solution: | ||
501 | Each port within the same multiport board shares the same IRQ. Please set | ||
502 | one IRQ (IRQ doesn't equal to zero) for one Moxa board. | ||
503 | |||
504 | Error msg: No interrupt vector be set for Moxa ISA board(CAP=xxx). | ||
505 | Solution: | ||
506 | Moxa ISA board needs an interrupt vector.Please refer to user's manual | ||
507 | "Hardware Installation" chapter to set interrupt vector. | ||
508 | |||
509 | Error msg: Couldn't install MOXA Smartio/Industio family driver! | ||
510 | Solution: | ||
511 | Load Moxa driver fail, the major number may conflict with other devices. | ||
512 | Please refer to previous section 3.7 to change a free major number for | ||
513 | Moxa driver. | ||
514 | |||
515 | Error msg: Couldn't install MOXA Smartio/Industio family callout driver! | ||
516 | Solution: | ||
517 | Load Moxa callout driver fail, the callout device major number may | ||
518 | conflict with other devices. Please refer to previous section 3.7 to | ||
519 | change a free callout device major number for Moxa driver. | ||
520 | |||
521 | |||
522 | ----------------------------------------------------------------------------- | ||
523 | |||
diff --git a/Documentation/serial/riscom8.txt b/Documentation/serial/riscom8.txt new file mode 100644 index 000000000000..14f61fdad7ca --- /dev/null +++ b/Documentation/serial/riscom8.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | * NOTE - this is an unmaintained driver. The original author cannot be located. | ||
2 | |||
3 | SDL Communications is now SBS Technologies, and does not have any | ||
4 | information on these ancient ISA cards on their website. | ||
5 | |||
6 | James Nelson <james4765@gmail.com> - 12-12-2004 | ||
7 | |||
8 | This is the README for RISCom/8 multi-port serial driver | ||
9 | (C) 1994-1996 D.Gorodchanin | ||
10 | See file LICENSE for terms and conditions. | ||
11 | |||
12 | NOTE: English is not my native language. | ||
13 | I'm sorry for any mistakes in this text. | ||
14 | |||
15 | Misc. notes for RISCom/8 serial driver, in no particular order :) | ||
16 | |||
17 | 1) This driver can support up to 4 boards at time. | ||
18 | Use string "riscom8=0xXXX,0xXXX,0xXXX,0xXXX" at LILO prompt, for | ||
19 | setting I/O base addresses for boards. If you compile driver | ||
20 | as module use modprobe options "iobase=0xXXX iobase1=0xXXX iobase2=..." | ||
21 | |||
22 | 2) The driver partially supports famous 'setserial' program, you can use almost | ||
23 | any of its options, excluding port & irq settings. | ||
24 | |||
25 | 3) There are some misc. defines at the beginning of riscom8.c, please read the | ||
26 | comments and try to change some of them in case of problems. | ||
27 | |||
28 | 4) I consider the current state of the driver as BETA. | ||
29 | |||
30 | 5) SDL Communications WWW page is http://www.sdlcomm.com. | ||
31 | |||
32 | 6) You can use the MAKEDEV program to create RISCom/8 /dev/ttyL* entries. | ||
33 | |||
34 | 7) Minor numbers for first board are 0-7, for second 8-15, etc. | ||
35 | |||
36 | 22 Apr 1996. | ||
diff --git a/Documentation/serial/rocket.txt b/Documentation/serial/rocket.txt new file mode 100644 index 000000000000..1d8582990435 --- /dev/null +++ b/Documentation/serial/rocket.txt | |||
@@ -0,0 +1,189 @@ | |||
1 | Comtrol(tm) RocketPort(R)/RocketModem(TM) Series | ||
2 | Device Driver for the Linux Operating System | ||
3 | |||
4 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
5 | |||
6 | PRODUCT OVERVIEW | ||
7 | ---------------- | ||
8 | |||
9 | This driver provides a loadable kernel driver for the Comtrol RocketPort | ||
10 | and RocketModem PCI boards. These boards provide, 2, 4, 8, 16, or 32 | ||
11 | high-speed serial ports or modems. This driver supports up to a combination | ||
12 | of four RocketPort or RocketModems boards in one machine simultaneously. | ||
13 | This file assumes that you are using the RocketPort driver which is | ||
14 | integrated into the kernel sources. | ||
15 | |||
16 | The driver can also be installed as an external module using the usual | ||
17 | "make;make install" routine. This external module driver, obtainable | ||
18 | from the Comtrol website listed below, is useful for updating the driver | ||
19 | or installing it into kernels which do not have the driver configured | ||
20 | into them. Installations instructions for the external module | ||
21 | are in the included README and HW_INSTALL files. | ||
22 | |||
23 | RocketPort ISA and RocketModem II PCI boards currently are only supported by | ||
24 | this driver in module form. | ||
25 | |||
26 | The RocketPort ISA board requires I/O ports to be configured by the DIP | ||
27 | switches on the board. See the section "ISA Rocketport Boards" below for | ||
28 | information on how to set the DIP switches. | ||
29 | |||
30 | You pass the I/O port to the driver using the following module parameters: | ||
31 | |||
32 | board1 : I/O port for the first ISA board | ||
33 | board2 : I/O port for the second ISA board | ||
34 | board3 : I/O port for the third ISA board | ||
35 | board4 : I/O port for the fourth ISA board | ||
36 | |||
37 | There is a set of utilities and scripts provided with the external driver | ||
38 | ( downloadable from http://www.comtrol.com ) that ease the configuration and | ||
39 | setup of the ISA cards. | ||
40 | |||
41 | The RocketModem II PCI boards require firmware to be loaded into the card | ||
42 | before it will function. The driver has only been tested as a module for this | ||
43 | board. | ||
44 | |||
45 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
46 | |||
47 | INSTALLATION PROCEDURES | ||
48 | ----------------------- | ||
49 | |||
50 | RocketPort/RocketModem PCI cards require no driver configuration, they are | ||
51 | automatically detected and configured. | ||
52 | |||
53 | The RocketPort driver can be installed as a module (recommended) or built | ||
54 | into the kernel. This is selected, as for other drivers, through the `make config` | ||
55 | command from the root of the Linux source tree during the kernel build process. | ||
56 | |||
57 | The RocketPort/RocketModem serial ports installed by this driver are assigned | ||
58 | device major number 46, and will be named /dev/ttyRx, where x is the port number | ||
59 | starting at zero (ex. /dev/ttyR0, /devttyR1, ...). If you have multiple cards | ||
60 | installed in the system, the mapping of port names to serial ports is displayed | ||
61 | in the system log at /var/log/messages. | ||
62 | |||
63 | If installed as a module, the module must be loaded. This can be done | ||
64 | manually by entering "modprobe rocket". To have the module loaded automatically | ||
65 | upon system boot, edit the /etc/modprobe.conf file and add the line | ||
66 | "alias char-major-46 rocket". | ||
67 | |||
68 | In order to use the ports, their device names (nodes) must be created with mknod. | ||
69 | This is only required once, the system will retain the names once created. To | ||
70 | create the RocketPort/RocketModem device names, use the command | ||
71 | "mknod /dev/ttyRx c 46 x" where x is the port number starting at zero. For example: | ||
72 | |||
73 | >mknod /dev/ttyR0 c 46 0 | ||
74 | >mknod /dev/ttyR1 c 46 1 | ||
75 | >mknod /dev/ttyR2 c 46 2 | ||
76 | |||
77 | The Linux script MAKEDEV will create the first 16 ttyRx device names (nodes) | ||
78 | for you: | ||
79 | |||
80 | >/dev/MAKEDEV ttyR | ||
81 | |||
82 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
83 | |||
84 | ISA Rocketport Boards | ||
85 | --------------------- | ||
86 | |||
87 | You must assign and configure the I/O addresses used by the ISA Rocketport | ||
88 | card before installing and using it. This is done by setting a set of DIP | ||
89 | switches on the Rocketport board. | ||
90 | |||
91 | |||
92 | SETTING THE I/O ADDRESS | ||
93 | ----------------------- | ||
94 | |||
95 | Before installing RocketPort(R) or RocketPort RA boards, you must find | ||
96 | a range of I/O addresses for it to use. The first RocketPort card | ||
97 | requires a 68-byte contiguous block of I/O addresses, starting at one | ||
98 | of the following: 0x100h, 0x140h, 0x180h, 0x200h, 0x240h, 0x280h, | ||
99 | 0x300h, 0x340h, 0x380h. This I/O address must be reflected in the DIP | ||
100 | switches of *all* of the Rocketport cards. | ||
101 | |||
102 | The second, third, and fourth RocketPort cards require a 64-byte | ||
103 | contiguous block of I/O addresses, starting at one of the following | ||
104 | I/O addresses: 0x100h, 0x140h, 0x180h, 0x1C0h, 0x200h, 0x240h, 0x280h, | ||
105 | 0x2C0h, 0x300h, 0x340h, 0x380h, 0x3C0h. The I/O address used by the | ||
106 | second, third, and fourth Rocketport cards (if present) are set via | ||
107 | software control. The DIP switch settings for the I/O address must be | ||
108 | set to the value of the first Rocketport cards. | ||
109 | |||
110 | In order to distinguish each of the card from the others, each card | ||
111 | must have a unique board ID set on the dip switches. The first | ||
112 | Rocketport board must be set with the DIP switches corresponding to | ||
113 | the first board, the second board must be set with the DIP switches | ||
114 | corresponding to the second board, etc. IMPORTANT: The board ID is | ||
115 | the only place where the DIP switch settings should differ between the | ||
116 | various Rocketport boards in a system. | ||
117 | |||
118 | The I/O address range used by any of the RocketPort cards must not | ||
119 | conflict with any other cards in the system, including other | ||
120 | RocketPort cards. Below, you will find a list of commonly used I/O | ||
121 | address ranges which may be in use by other devices in your system. | ||
122 | On a Linux system, "cat /proc/ioports" will also be helpful in | ||
123 | identifying what I/O addresses are being used by devices on your | ||
124 | system. | ||
125 | |||
126 | Remember, the FIRST RocketPort uses 68 I/O addresses. So, if you set it | ||
127 | for 0x100, it will occupy 0x100 to 0x143. This would mean that you | ||
128 | CAN NOT set the second, third or fourth board for address 0x140 since | ||
129 | the first 4 bytes of that range are used by the first board. You would | ||
130 | need to set the second, third, or fourth board to one of the next available | ||
131 | blocks such as 0x180. | ||
132 | |||
133 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
134 | |||
135 | RocketPort and RocketPort RA SW1 Settings: | ||
136 | |||
137 | +-------------------------------+ | ||
138 | | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | | ||
139 | +-------+-------+---------------+ | ||
140 | | Unused| Card | I/O Port Block| | ||
141 | +-------------------------------+ | ||
142 | |||
143 | DIP Switches DIP Switches | ||
144 | 7 8 6 5 | ||
145 | =================== =================== | ||
146 | On On UNUSED, MUST BE ON. On On First Card <==== Default | ||
147 | On Off Second Card | ||
148 | Off On Third Card | ||
149 | Off Off Fourth Card | ||
150 | |||
151 | DIP Switches I/O Address Range | ||
152 | 4 3 2 1 Used by the First Card | ||
153 | ===================================== | ||
154 | On Off On Off 100-143 | ||
155 | On Off Off On 140-183 | ||
156 | On Off Off Off 180-1C3 <==== Default | ||
157 | Off On On Off 200-243 | ||
158 | Off On Off On 240-283 | ||
159 | Off On Off Off 280-2C3 | ||
160 | Off Off On Off 300-343 | ||
161 | Off Off Off On 340-383 | ||
162 | Off Off Off Off 380-3C3 | ||
163 | |||
164 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
165 | |||
166 | REPORTING BUGS | ||
167 | -------------- | ||
168 | |||
169 | For technical support, please provide the following | ||
170 | information: Driver version, kernel release, distribution of | ||
171 | kernel, and type of board you are using. Error messages and log | ||
172 | printouts port configuration details are especially helpful. | ||
173 | |||
174 | USA | ||
175 | Phone: (612) 494-4100 | ||
176 | FAX: (612) 494-4199 | ||
177 | email: support@comtrol.com | ||
178 | |||
179 | Comtrol Europe | ||
180 | Phone: +44 (0) 1 869 323-220 | ||
181 | FAX: +44 (0) 1 869 323-211 | ||
182 | email: support@comtrol.co.uk | ||
183 | |||
184 | Web: http://www.comtrol.com | ||
185 | FTP: ftp.comtrol.com | ||
186 | |||
187 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
188 | |||
189 | |||
diff --git a/Documentation/serial/specialix.txt b/Documentation/serial/specialix.txt new file mode 100644 index 000000000000..6eb6f3a3331c --- /dev/null +++ b/Documentation/serial/specialix.txt | |||
@@ -0,0 +1,383 @@ | |||
1 | |||
2 | specialix.txt -- specialix IO8+ multiport serial driver readme. | ||
3 | |||
4 | |||
5 | |||
6 | Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl) | ||
7 | |||
8 | Specialix pays for the development and support of this driver. | ||
9 | Please DO contact io8-linux@specialix.co.uk if you require | ||
10 | support. | ||
11 | |||
12 | This driver was developed in the BitWizard linux device | ||
13 | driver service. If you require a linux device driver for your | ||
14 | product, please contact devices@BitWizard.nl for a quote. | ||
15 | |||
16 | This code is firmly based on the riscom/8 serial driver, | ||
17 | written by Dmitry Gorodchanin. The specialix IO8+ card | ||
18 | programming information was obtained from the CL-CD1865 Data | ||
19 | Book, and Specialix document number 6200059: IO8+ Hardware | ||
20 | Functional Specification, augmented by document number 6200088: | ||
21 | Merak Hardware Functional Specification. (IO8+/PCI is also | ||
22 | called Merak) | ||
23 | |||
24 | |||
25 | This program is free software; you can redistribute it and/or | ||
26 | modify it under the terms of the GNU General Public License as | ||
27 | published by the Free Software Foundation; either version 2 of | ||
28 | the License, or (at your option) any later version. | ||
29 | |||
30 | This program is distributed in the hope that it will be | ||
31 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
32 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
33 | PURPOSE. See the GNU General Public License for more details. | ||
34 | |||
35 | You should have received a copy of the GNU General Public | ||
36 | License along with this program; if not, write to the Free | ||
37 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, | ||
38 | USA. | ||
39 | |||
40 | |||
41 | Intro | ||
42 | ===== | ||
43 | |||
44 | |||
45 | This file contains some random information, that I like to have online | ||
46 | instead of in a manual that can get lost. Ever misplace your Linux | ||
47 | kernel sources? And the manual of one of the boards in your computer? | ||
48 | |||
49 | |||
50 | Addresses and interrupts | ||
51 | ======================== | ||
52 | |||
53 | Address dip switch settings: | ||
54 | The dip switch sets bits 2-9 of the IO address. | ||
55 | |||
56 | 9 8 7 6 5 4 3 2 | ||
57 | +-----------------+ | ||
58 | 0 | X X X X X X X | | ||
59 | | | = IoBase = 0x100 | ||
60 | 1 | X | | ||
61 | +-----------------+ ------ RS232 connectors ----> | ||
62 | |||
63 | | | | | ||
64 | edge connector | ||
65 | | | | | ||
66 | V V V | ||
67 | |||
68 | Base address 0x100 caused a conflict in one of my computers once. I | ||
69 | haven't the foggiest why. My Specialix card is now at 0x180. My | ||
70 | other computer runs just fine with the Specialix card at 0x100.... | ||
71 | The card occupies 4 addresses, but actually only two are really used. | ||
72 | |||
73 | The PCI version doesn't have any dip switches. The BIOS assigns | ||
74 | an IO address. | ||
75 | |||
76 | The driver now still autoprobes at 0x100, 0x180, 0x250 and 0x260. If | ||
77 | that causes trouble for you, please report that. I'll remove | ||
78 | autoprobing then. | ||
79 | |||
80 | The driver will tell the card what IRQ to use, so you don't have to | ||
81 | change any jumpers to change the IRQ. Just use a command line | ||
82 | argument (irq=xx) to the insmod program to set the interrupt. | ||
83 | |||
84 | The BIOS assigns the IRQ on the PCI version. You have no say in what | ||
85 | IRQ to use in that case. | ||
86 | |||
87 | If your specialix cards are not at the default locations, you can use | ||
88 | the kernel command line argument "specialix=io0,irq0,io1,irq1...". | ||
89 | Here "io0" is the io address for the first card, and "irq0" is the | ||
90 | irq line that the first card should use. And so on. | ||
91 | |||
92 | Examples. | ||
93 | |||
94 | You use the driver as a module and have three cards at 0x100, 0x250 | ||
95 | and 0x180. And some way or another you want them detected in that | ||
96 | order. Moreover irq 12 is taken (e.g. by your PS/2 mouse). | ||
97 | |||
98 | insmod specialix.o iobase=0x100,0x250,0x180 irq=9,11,15 | ||
99 | |||
100 | The same three cards, but now in the kernel would require you to | ||
101 | add | ||
102 | |||
103 | specialix=0x100,9,0x250,11,0x180,15 | ||
104 | |||
105 | to the command line. This would become | ||
106 | |||
107 | append="specialix=0x100,9,0x250,11,0x180,15" | ||
108 | |||
109 | in your /etc/lilo.conf file if you use lilo. | ||
110 | |||
111 | The Specialix driver is slightly odd: It allows you to have the second | ||
112 | or third card detected without having a first card. This has | ||
113 | advantages and disadvantages. A slot that isn't filled by an ISA card, | ||
114 | might be filled if a PCI card is detected. Thus if you have an ISA | ||
115 | card at 0x250 and a PCI card, you would get: | ||
116 | |||
117 | sx0: specialix IO8+ Board at 0x100 not found. | ||
118 | sx1: specialix IO8+ Board at 0x180 not found. | ||
119 | sx2: specialix IO8+ board detected at 0x250, IRQ 12, CD1865 Rev. B. | ||
120 | sx3: specialix IO8+ Board at 0x260 not found. | ||
121 | sx0: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B. | ||
122 | |||
123 | This would happen if you don't give any probe hints to the driver. | ||
124 | If you would specify: | ||
125 | |||
126 | specialix=0x250,11 | ||
127 | |||
128 | you'd get the following messages: | ||
129 | |||
130 | sx0: specialix IO8+ board detected at 0x250, IRQ 11, CD1865 Rev. B. | ||
131 | sx1: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B. | ||
132 | |||
133 | ISA probing is aborted after the IO address you gave is exhausted, and | ||
134 | the PCI card is now detected as the second card. The ISA card is now | ||
135 | also forced to IRQ11.... | ||
136 | |||
137 | |||
138 | Baud rates | ||
139 | ========== | ||
140 | |||
141 | The rev 1.2 and below boards use a CL-CD1864. These chips can only | ||
142 | do 64kbit. The rev 1.3 and newer boards use a CL-CD1865. These chips | ||
143 | are officially capable of 115k2. | ||
144 | |||
145 | The Specialix card uses a 25MHz crystal (in times two mode, which in | ||
146 | fact is a divided by two mode). This is not enough to reach the rated | ||
147 | 115k2 on all ports at the same time. With this clock rate you can only | ||
148 | do 37% of this rate. This means that at 115k2 on all ports you are | ||
149 | going to lose characters (The chip cannot handle that many incoming | ||
150 | bits at this clock rate.) (Yes, you read that correctly: there is a | ||
151 | limit to the number of -=bits=- per second that the chip can handle.) | ||
152 | |||
153 | If you near the "limit" you will first start to see a graceful | ||
154 | degradation in that the chip cannot keep the transmitter busy at all | ||
155 | times. However with a central clock this slow, you can also get it to | ||
156 | miss incoming characters. The driver will print a warning message when | ||
157 | you are outside the official specs. The messages usually show up in | ||
158 | the file /var/log/messages . | ||
159 | |||
160 | The specialix card cannot reliably do 115k2. If you use it, you have | ||
161 | to do "extensive testing" (*) to verify if it actually works. | ||
162 | |||
163 | When "mgetty" communicates with my modem at 115k2 it reports: | ||
164 | got: +++[0d]ATQ0V1H0[0d][0d][8a]O[cb][0d][8a] | ||
165 | ^^^^ ^^^^ ^^^^ | ||
166 | |||
167 | The three characters that have the "^^^" under them have suffered a | ||
168 | bit error in the highest bit. In conclusion: I've tested it, and found | ||
169 | that it simply DOESN'T work for me. I also suspect that this is also | ||
170 | caused by the baud rate being just a little bit out of tune. | ||
171 | |||
172 | I upgraded the crystal to 66Mhz on one of my Specialix cards. Works | ||
173 | great! Contact me for details. (Voids warranty, requires a steady hand | ||
174 | and more such restrictions....) | ||
175 | |||
176 | |||
177 | (*) Cirrus logic CD1864 databook, page 40. | ||
178 | |||
179 | |||
180 | Cables for the Specialix IO8+ | ||
181 | ============================= | ||
182 | |||
183 | The pinout of the connectors on the IO8+ is: | ||
184 | |||
185 | pin short direction long name | ||
186 | name | ||
187 | Pin 1 DCD input Data Carrier Detect | ||
188 | Pin 2 RXD input Receive | ||
189 | Pin 3 DTR/RTS output Data Terminal Ready/Ready To Send | ||
190 | Pin 4 GND - Ground | ||
191 | Pin 5 TXD output Transmit | ||
192 | Pin 6 CTS input Clear To Send | ||
193 | |||
194 | |||
195 | -- 6 5 4 3 2 1 -- | ||
196 | | | | ||
197 | | | | ||
198 | | | | ||
199 | | | | ||
200 | +----- -----+ | ||
201 | |__________| | ||
202 | clip | ||
203 | |||
204 | Front view of an RJ12 connector. Cable moves "into" the paper. | ||
205 | (the plug is ready to plug into your mouth this way...) | ||
206 | |||
207 | |||
208 | NULL cable. I don't know who is going to use these except for | ||
209 | testing purposes, but I tested the cards with this cable. (It | ||
210 | took quite a while to figure out, so I'm not going to delete | ||
211 | it. So there! :-) | ||
212 | |||
213 | |||
214 | This end goes This end needs | ||
215 | straight into the some twists in | ||
216 | RJ12 plug. the wiring. | ||
217 | IO8+ RJ12 IO8+ RJ12 | ||
218 | 1 DCD white - | ||
219 | - - 1 DCD | ||
220 | 2 RXD black 5 TXD | ||
221 | 3 DTR/RTS red 6 CTS | ||
222 | 4 GND green 4 GND | ||
223 | 5 TXD yellow 2 RXD | ||
224 | 6 CTS blue 3 DTR/RTS | ||
225 | |||
226 | |||
227 | Same NULL cable, but now sorted on the second column. | ||
228 | |||
229 | 1 DCD white - | ||
230 | - - 1 DCD | ||
231 | 5 TXD yellow 2 RXD | ||
232 | 6 CTS blue 3 DTR/RTS | ||
233 | 4 GND green 4 GND | ||
234 | 2 RXD black 5 TXD | ||
235 | 3 DTR/RTS red 6 CTS | ||
236 | |||
237 | |||
238 | |||
239 | This is a modem cable usable for hardware handshaking: | ||
240 | RJ12 DB25 DB9 | ||
241 | 1 DCD white 8 DCD 1 DCD | ||
242 | 2 RXD black 3 RXD 2 RXD | ||
243 | 3 DTR/RTS red 4 RTS 7 RTS | ||
244 | 4 GND green 7 GND 5 GND | ||
245 | 5 TXD yellow 2 TXD 3 TXD | ||
246 | 6 CTS blue 5 CTS 8 CTS | ||
247 | +---- 6 DSR 6 DSR | ||
248 | +---- 20 DTR 4 DTR | ||
249 | |||
250 | This is a modem cable usable for software handshaking: | ||
251 | It allows you to reset the modem using the DTR ioctls. | ||
252 | I (REW) have never tested this, "but xxxxxxxxxxxxx | ||
253 | says that it works." If you test this, please | ||
254 | tell me and I'll fill in your name on the xxx's. | ||
255 | |||
256 | RJ12 DB25 DB9 | ||
257 | 1 DCD white 8 DCD 1 DCD | ||
258 | 2 RXD black 3 RXD 2 RXD | ||
259 | 3 DTR/RTS red 20 DTR 4 DTR | ||
260 | 4 GND green 7 GND 5 GND | ||
261 | 5 TXD yellow 2 TXD 3 TXD | ||
262 | 6 CTS blue 5 CTS 8 CTS | ||
263 | +---- 6 DSR 6 DSR | ||
264 | +---- 4 RTS 7 RTS | ||
265 | |||
266 | I bought a 6 wire flat cable. It was colored as indicated. | ||
267 | Check that yours is the same before you trust me on this. | ||
268 | |||
269 | |||
270 | Hardware handshaking issues. | ||
271 | ============================ | ||
272 | |||
273 | The driver can be told to operate in two different ways. The default | ||
274 | behaviour is specialix.sx_rtscts = 0 where the pin behaves as DTR when | ||
275 | hardware handshaking is off. It behaves as the RTS hardware | ||
276 | handshaking signal when hardware handshaking is selected. | ||
277 | |||
278 | When you use this, you have to use the appropriate cable. The | ||
279 | cable will either be compatible with hardware handshaking or with | ||
280 | software handshaking. So switching on the fly is not really an | ||
281 | option. | ||
282 | |||
283 | I actually prefer to use the "specialix.sx_rtscts=1" option. | ||
284 | This makes the DTR/RTS pin always an RTS pin, and ioctls to | ||
285 | change DTR are always ignored. I have a cable that is configured | ||
286 | for this. | ||
287 | |||
288 | |||
289 | Ports and devices | ||
290 | ================= | ||
291 | |||
292 | Port 0 is the one furthest from the card-edge connector. | ||
293 | |||
294 | Devices: | ||
295 | |||
296 | You should make the devices as follows: | ||
297 | |||
298 | bash | ||
299 | cd /dev | ||
300 | for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \ | ||
301 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ||
302 | do | ||
303 | echo -n "$i " | ||
304 | mknod /dev/ttyW$i c 75 $i | ||
305 | mknod /dev/cuw$i c 76 $i | ||
306 | done | ||
307 | echo "" | ||
308 | |||
309 | If your system doesn't come with these devices preinstalled, bug your | ||
310 | linux-vendor about this. They have had ample time to get this | ||
311 | implemented by now. | ||
312 | |||
313 | You cannot have more than 4 boards in one computer. The card only | ||
314 | supports 4 different interrupts. If you really want this, contact me | ||
315 | about this and I'll give you a few tips (requires soldering iron).... | ||
316 | |||
317 | If you have enough PCI slots, you can probably use more than 4 PCI | ||
318 | versions of the card though.... | ||
319 | |||
320 | The PCI version of the card cannot adhere to the mechanical part of | ||
321 | the PCI spec because the 8 serial connectors are simply too large. If | ||
322 | it doesn't fit in your computer, bring back the card. | ||
323 | |||
324 | |||
325 | ------------------------------------------------------------------------ | ||
326 | |||
327 | |||
328 | Fixed bugs and restrictions: | ||
329 | - During initialization, interrupts are blindly turned on. | ||
330 | Having a shadow variable would cause an extra memory | ||
331 | access on every IO instruction. | ||
332 | - The interrupt (on the card) should be disabled when we | ||
333 | don't allocate the Linux end of the interrupt. This allows | ||
334 | a different driver/card to use it while all ports are not in | ||
335 | use..... (a la standard serial port) | ||
336 | == An extra _off variant of the sx_in and sx_out macros are | ||
337 | now available. They don't set the interrupt enable bit. | ||
338 | These are used during initialization. Normal operation uses | ||
339 | the old variant which enables the interrupt line. | ||
340 | - RTS/DTR issue needs to be implemented according to | ||
341 | specialix' spec. | ||
342 | I kind of like the "determinism" of the current | ||
343 | implementation. Compile time flag? | ||
344 | == Ok. Compile time flag! Default is how Specialix likes it. | ||
345 | == Now a config time flag! Gets saved in your config file. Neat! | ||
346 | - Can you set the IO address from the lilo command line? | ||
347 | If you need this, bug me about it, I'll make it. | ||
348 | == Hah! No bugging needed. Fixed! :-) | ||
349 | - Cirrus logic hasn't gotten back to me yet why the CD1865 can | ||
350 | and the CD1864 can't do 115k2. I suspect that this is | ||
351 | because the CD1864 is not rated for 33MHz operation. | ||
352 | Therefore the CD1864 versions of the card can't do 115k2 on | ||
353 | all ports just like the CD1865 versions. The driver does | ||
354 | not block 115k2 on CD1864 cards. | ||
355 | == I called the Cirrus Logic representative here in Holland. | ||
356 | The CD1864 databook is identical to the CD1865 databook, | ||
357 | except for an extra warning at the end. Similar Bit errors | ||
358 | have been observed in testing at 115k2 on both an 1865 and | ||
359 | a 1864 chip. I see no reason why I would prohibit 115k2 on | ||
360 | 1864 chips and not do it on 1865 chips. Actually there is | ||
361 | reason to prohibit it on BOTH chips. I print a warning. | ||
362 | If you use 115k2, you're on your own. | ||
363 | - A spiky CD may send spurious HUPs. Also in CLOCAL??? | ||
364 | -- A fix for this turned out to be counter productive. | ||
365 | Different fix? Current behaviour is acceptable? | ||
366 | -- Maybe the current implementation is correct. If anybody | ||
367 | gets bitten by this, please report, and it will get fixed. | ||
368 | |||
369 | -- Testing revealed that when in CLOCAL, the problem doesn't | ||
370 | occur. As warned for in the CD1865 manual, the chip may | ||
371 | send modem intr's on a spike. We could filter those out, | ||
372 | but that would be a cludge anyway (You'd still risk getting | ||
373 | a spurious HUP when two spikes occur.)..... | ||
374 | |||
375 | |||
376 | |||
377 | Bugs & restrictions: | ||
378 | - This is a difficult card to autoprobe. | ||
379 | You have to WRITE to the address register to even | ||
380 | read-probe a CD186x register. Disable autodetection? | ||
381 | -- Specialix: any suggestions? | ||
382 | |||
383 | |||
diff --git a/Documentation/serial/stallion.txt b/Documentation/serial/stallion.txt new file mode 100644 index 000000000000..5c4902d9a5be --- /dev/null +++ b/Documentation/serial/stallion.txt | |||
@@ -0,0 +1,392 @@ | |||
1 | * NOTE - This is an unmaintained driver. Lantronix, which bought Stallion | ||
2 | technologies, is not active in driver maintenance, and they have no information | ||
3 | on when or if they will have a 2.6 driver. | ||
4 | |||
5 | James Nelson <james4765@gmail.com> - 12-12-2004 | ||
6 | |||
7 | Stallion Multiport Serial Driver Readme | ||
8 | --------------------------------------- | ||
9 | |||
10 | Copyright (C) 1994-1999, Stallion Technologies. | ||
11 | |||
12 | Version: 5.5.1 | ||
13 | Date: 28MAR99 | ||
14 | |||
15 | |||
16 | |||
17 | 1. INTRODUCTION | ||
18 | |||
19 | There are two drivers that work with the different families of Stallion | ||
20 | multiport serial boards. One is for the Stallion smart boards - that is | ||
21 | EasyIO, EasyConnection 8/32 and EasyConnection 8/64-PCI, the other for | ||
22 | the true Stallion intelligent multiport boards - EasyConnection 8/64 | ||
23 | (ISA, EISA, MCA), EasyConnection/RA-PCI, ONboard and Brumby. | ||
24 | |||
25 | If you are using any of the Stallion intelligent multiport boards (Brumby, | ||
26 | ONboard, EasyConnection 8/64 (ISA, EISA, MCA), EasyConnection/RA-PCI) with | ||
27 | Linux you will need to get the driver utility package. This contains a | ||
28 | firmware loader and the firmware images necessary to make the devices operate. | ||
29 | |||
30 | The Stallion Technologies ftp site, ftp.stallion.com, will always have | ||
31 | the latest version of the driver utility package. | ||
32 | |||
33 | ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz | ||
34 | |||
35 | As of the printing of this document the latest version of the driver | ||
36 | utility package is 5.5.0. If a later version is now available then you | ||
37 | should use the latest version. | ||
38 | |||
39 | If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI | ||
40 | boards then you don't need this package, although it does have a serial stats | ||
41 | display program. | ||
42 | |||
43 | If you require DIP switch settings, EISA or MCA configuration files, or any | ||
44 | other information related to Stallion boards then have a look at Stallion's | ||
45 | web pages at http://www.stallion.com. | ||
46 | |||
47 | |||
48 | |||
49 | 2. INSTALLATION | ||
50 | |||
51 | The drivers can be used as loadable modules or compiled into the kernel. | ||
52 | You can choose which when doing a "config" on the kernel. | ||
53 | |||
54 | All ISA, EISA and MCA boards that you want to use need to be configured into | ||
55 | the driver(s). All PCI boards will be automatically detected when you load | ||
56 | the driver - so they do not need to be entered into the driver(s) | ||
57 | configuration structure. Note that kernel PCI support is required to use PCI | ||
58 | boards. | ||
59 | |||
60 | There are two methods of configuring ISA, EISA and MCA boards into the drivers. | ||
61 | If using the driver as a loadable module then the simplest method is to pass | ||
62 | the driver configuration as module arguments. The other method is to modify | ||
63 | the driver source to add configuration lines for each board in use. | ||
64 | |||
65 | If you have pre-built Stallion driver modules then the module argument | ||
66 | configuration method should be used. A lot of Linux distributions come with | ||
67 | pre-built driver modules in /lib/modules/X.Y.Z/misc for the kernel in use. | ||
68 | That makes things pretty simple to get going. | ||
69 | |||
70 | |||
71 | 2.1 MODULE DRIVER CONFIGURATION: | ||
72 | |||
73 | The simplest configuration for modules is to use the module load arguments | ||
74 | to configure any ISA, EISA or MCA boards. PCI boards are automatically | ||
75 | detected, so do not need any additional configuration at all. | ||
76 | |||
77 | If using EasyIO, EasyConnection 8/32 ISA or MCA, or EasyConnection 8/63-PCI | ||
78 | boards then use the "stallion" driver module, Otherwise if you are using | ||
79 | an EasyConnection 8/64 ISA, EISA or MCA, EasyConnection/RA-PCI, ONboard, | ||
80 | Brumby or original Stallion board then use the "istallion" driver module. | ||
81 | |||
82 | Typically to load up the smart board driver use: | ||
83 | |||
84 | modprobe stallion | ||
85 | |||
86 | This will load the EasyIO and EasyConnection 8/32 driver. It will output a | ||
87 | message to say that it loaded and print the driver version number. It will | ||
88 | also print out whether it found the configured boards or not. These messages | ||
89 | may not appear on the console, but typically are always logged to | ||
90 | /var/adm/messages or /var/log/syslog files - depending on how the klogd and | ||
91 | syslogd daemons are setup on your system. | ||
92 | |||
93 | To load the intelligent board driver use: | ||
94 | |||
95 | modprobe istallion | ||
96 | |||
97 | It will output similar messages to the smart board driver. | ||
98 | |||
99 | If not using an auto-detectable board type (that is a PCI board) then you | ||
100 | will also need to supply command line arguments to the modprobe command | ||
101 | when loading the driver. The general form of the configuration argument is | ||
102 | |||
103 | board?=<name>[,<ioaddr>[,<addr>][,<irq>]] | ||
104 | |||
105 | where: | ||
106 | |||
107 | board? -- specifies the arbitrary board number of this board, | ||
108 | can be in the range 0 to 3. | ||
109 | |||
110 | name -- textual name of this board. The board name is the common | ||
111 | board name, or any "shortened" version of that. The board | ||
112 | type number may also be used here. | ||
113 | |||
114 | ioaddr -- specifies the I/O address of this board. This argument is | ||
115 | optional, but should generally be specified. | ||
116 | |||
117 | addr -- optional second address argument. Some board types require | ||
118 | a second I/O address, some require a memory address. The | ||
119 | exact meaning of this argument depends on the board type. | ||
120 | |||
121 | irq -- optional IRQ line used by this board. | ||
122 | |||
123 | Up to 4 board configuration arguments can be specified on the load line. | ||
124 | Here is some examples: | ||
125 | |||
126 | modprobe stallion board0=easyio,0x2a0,5 | ||
127 | |||
128 | This configures an EasyIO board as board 0 at I/O address 0x2a0 and IRQ 5. | ||
129 | |||
130 | modprobe istallion board3=ec8/64,0x2c0,0xcc000 | ||
131 | |||
132 | This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at | ||
133 | memory address 0xcc000. | ||
134 | |||
135 | modprobe stallion board1=ec8/32-at,0x2a0,0x280,10 | ||
136 | |||
137 | This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0, | ||
138 | secondary address 0x280 and IRQ 10. | ||
139 | |||
140 | You will probably want to enter this module load and configuration information | ||
141 | into your system startup scripts so that the drivers are loaded and configured | ||
142 | on each system boot. Typically the start up script would be something like | ||
143 | /etc/modprobe.conf. | ||
144 | |||
145 | |||
146 | 2.2 STATIC DRIVER CONFIGURATION: | ||
147 | |||
148 | For static driver configuration you need to modify the driver source code. | ||
149 | Entering ISA, EISA and MCA boards into the driver(s) configuration structure | ||
150 | involves editing the driver(s) source file. It's pretty easy if you follow | ||
151 | the instructions below. Both drivers can support up to 4 boards. The smart | ||
152 | card driver (the stallion.c driver) supports any combination of EasyIO and | ||
153 | EasyConnection 8/32 boards (up to a total of 4). The intelligent driver | ||
154 | supports any combination of ONboards, Brumbys, Stallions and EasyConnection | ||
155 | 8/64 (ISA and EISA) boards (up to a total of 4). | ||
156 | |||
157 | To set up the driver(s) for the boards that you want to use you need to | ||
158 | edit the appropriate driver file and add configuration entries. | ||
159 | |||
160 | If using EasyIO or EasyConnection 8/32 ISA or MCA boards, | ||
161 | In drivers/char/stallion.c: | ||
162 | - find the definition of the stl_brdconf array (of structures) | ||
163 | near the top of the file | ||
164 | - modify this to match the boards you are going to install | ||
165 | (the comments before this structure should help) | ||
166 | - save and exit | ||
167 | |||
168 | If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA) | ||
169 | boards, | ||
170 | In drivers/char/istallion.c: | ||
171 | - find the definition of the stli_brdconf array (of structures) | ||
172 | near the top of the file | ||
173 | - modify this to match the boards you are going to install | ||
174 | (the comments before this structure should help) | ||
175 | - save and exit | ||
176 | |||
177 | Once you have set up the board configurations then you are ready to build | ||
178 | the kernel or modules. | ||
179 | |||
180 | When the new kernel is booted, or the loadable module loaded then the | ||
181 | driver will emit some kernel trace messages about whether the configured | ||
182 | boards were detected or not. Depending on how your system logger is set | ||
183 | up these may come out on the console, or just be logged to | ||
184 | /var/adm/messages or /var/log/syslog. You should check the messages to | ||
185 | confirm that all is well. | ||
186 | |||
187 | |||
188 | 2.3 SHARING INTERRUPTS | ||
189 | |||
190 | It is possible to share interrupts between multiple EasyIO and | ||
191 | EasyConnection 8/32 boards in an EISA system. To do this you must be using | ||
192 | static driver configuration, modifying the driver source code to add driver | ||
193 | configuration. Then a couple of extra things are required: | ||
194 | |||
195 | 1. When entering the board resources into the stallion.c file you need to | ||
196 | mark the boards as using level triggered interrupts. Do this by replacing | ||
197 | the "0" entry at field position 6 (the last field) in the board | ||
198 | configuration structure with a "1". (This is the structure that defines | ||
199 | the board type, I/O locations, etc. for each board). All boards that are | ||
200 | sharing an interrupt must be set this way, and each board should have the | ||
201 | same interrupt number specified here as well. Now build the module or | ||
202 | kernel as you would normally. | ||
203 | |||
204 | 2. When physically installing the boards into the system you must enter | ||
205 | the system EISA configuration utility. You will need to install the EISA | ||
206 | configuration files for *all* the EasyIO and EasyConnection 8/32 boards | ||
207 | that are sharing interrupts. The Stallion EasyIO and EasyConnection 8/32 | ||
208 | EISA configuration files required are supplied by Stallion Technologies | ||
209 | on the EASY Utilities floppy diskette (usually supplied in the box with | ||
210 | the board when purchased. If not, you can pick it up from Stallion's FTP | ||
211 | site, ftp.stallion.com). You will need to edit the board resources to | ||
212 | choose level triggered interrupts, and make sure to set each board's | ||
213 | interrupt to the same IRQ number. | ||
214 | |||
215 | You must complete both the above steps for this to work. When you reboot | ||
216 | or load the driver your EasyIO and EasyConnection 8/32 boards will be | ||
217 | sharing interrupts. | ||
218 | |||
219 | |||
220 | 2.4 USING HIGH SHARED MEMORY | ||
221 | |||
222 | The EasyConnection 8/64-EI, ONboard and Stallion boards are capable of | ||
223 | using shared memory addresses above the usual 640K - 1Mb range. The ONboard | ||
224 | ISA and the Stallion boards can be programmed to use memory addresses up to | ||
225 | 16Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI and | ||
226 | ONboard/E can be programmed for memory addresses up to 4Gb (the EISA bus | ||
227 | addressing limit). | ||
228 | |||
229 | The higher than 1Mb memory addresses are fully supported by this driver. | ||
230 | Just enter the address as you normally would for a lower than 1Mb address | ||
231 | (in the driver's board configuration structure). | ||
232 | |||
233 | |||
234 | |||
235 | 2.5 TROUBLE SHOOTING | ||
236 | |||
237 | If a board is not found by the driver but is actually in the system then the | ||
238 | most likely problem is that the I/O address is wrong. Change the module load | ||
239 | argument for the loadable module form. Or change it in the driver stallion.c | ||
240 | or istallion.c configuration structure and rebuild the kernel or modules, or | ||
241 | change it on the board. | ||
242 | |||
243 | On EasyIO and EasyConnection 8/32 boards the IRQ is software programmable, so | ||
244 | if there is a conflict you may need to change the IRQ used for a board. There | ||
245 | are no interrupts to worry about for ONboard, Brumby or EasyConnection 8/64 | ||
246 | (ISA, EISA and MCA) boards. The memory region on EasyConnection 8/64 and | ||
247 | ONboard boards is software programmable, but not on the Brumby boards. | ||
248 | |||
249 | |||
250 | |||
251 | 3. USING THE DRIVERS | ||
252 | |||
253 | 3.1 INTELLIGENT DRIVER OPERATION | ||
254 | |||
255 | The intelligent boards also need to have their "firmware" code downloaded | ||
256 | to them. This is done via a user level application supplied in the driver | ||
257 | utility package called "stlload". Compile this program wherever you dropped | ||
258 | the package files, by typing "make". In its simplest form you can then type | ||
259 | |||
260 | ./stlload -i cdk.sys | ||
261 | |||
262 | in this directory and that will download board 0 (assuming board 0 is an | ||
263 | EasyConnection 8/64 or EasyConnection/RA board). To download to an | ||
264 | ONboard, Brumby or Stallion do: | ||
265 | |||
266 | ./stlload -i 2681.sys | ||
267 | |||
268 | Normally you would want all boards to be downloaded as part of the standard | ||
269 | system startup. To achieve this, add one of the lines above into the | ||
270 | /etc/rc.d/rc.S or /etc/rc.d/rc.serial file. To download each board just add | ||
271 | the "-b <brd-number>" option to the line. You will need to download code for | ||
272 | every board. You should probably move the stlload program into a system | ||
273 | directory, such as /usr/sbin. Also, the default location of the cdk.sys image | ||
274 | file in the stlload down-loader is /usr/lib/stallion. Create that directory | ||
275 | and put the cdk.sys and 2681.sys files in it. (It's a convenient place to put | ||
276 | them anyway). As an example your /etc/rc.d/rc.S file might have the | ||
277 | following lines added to it (if you had 3 boards): | ||
278 | |||
279 | /usr/sbin/stlload -b 0 -i /usr/lib/stallion/cdk.sys | ||
280 | /usr/sbin/stlload -b 1 -i /usr/lib/stallion/2681.sys | ||
281 | /usr/sbin/stlload -b 2 -i /usr/lib/stallion/2681.sys | ||
282 | |||
283 | The image files cdk.sys and 2681.sys are specific to the board types. The | ||
284 | cdk.sys will only function correctly on an EasyConnection 8/64 board. Similarly | ||
285 | the 2681.sys image fill only operate on ONboard, Brumby and Stallion boards. | ||
286 | If you load the wrong image file into a board it will fail to start up, and | ||
287 | of course the ports will not be operational! | ||
288 | |||
289 | If you are using the modularized version of the driver you might want to put | ||
290 | the modprobe calls in the startup script as well (before the download lines | ||
291 | obviously). | ||
292 | |||
293 | |||
294 | 3.2 USING THE SERIAL PORTS | ||
295 | |||
296 | Once the driver is installed you will need to setup some device nodes to | ||
297 | access the serial ports. The simplest method is to use the /dev/MAKEDEV program. | ||
298 | It will automatically create device entries for Stallion boards. This will | ||
299 | create the normal serial port devices as /dev/ttyE# where# is the port number | ||
300 | starting from 0. A bank of 64 minor device numbers is allocated to each board, | ||
301 | so the first port on the second board is port 64,etc. A set of callout type | ||
302 | devices may also be created. They are created as the devices /dev/cue# where # | ||
303 | is the same as for the ttyE devices. | ||
304 | |||
305 | For the most part the Stallion driver tries to emulate the standard PC system | ||
306 | COM ports and the standard Linux serial driver. The idea is that you should | ||
307 | be able to use Stallion board ports and COM ports interchangeably without | ||
308 | modifying anything but the device name. Anything that doesn't work like that | ||
309 | should be considered a bug in this driver! | ||
310 | |||
311 | If you look at the driver code you will notice that it is fairly closely | ||
312 | based on the Linux serial driver (linux/drivers/char/serial.c). This is | ||
313 | intentional, obviously this is the easiest way to emulate its behavior! | ||
314 | |||
315 | Since this driver tries to emulate the standard serial ports as much as | ||
316 | possible, most system utilities should work as they do for the standard | ||
317 | COM ports. Most importantly "stty" works as expected and "setserial" can | ||
318 | also be used (excepting the ability to auto-configure the I/O and IRQ | ||
319 | addresses of boards). Higher baud rates are supported in the usual fashion | ||
320 | through setserial or using the CBAUDEX extensions. Note that the EasyIO and | ||
321 | EasyConnection (all types) support at least 57600 and 115200 baud. The newer | ||
322 | EasyConnection XP modules and new EasyIO boards support 230400 and 460800 | ||
323 | baud as well. The older boards including ONboard and Brumby support a | ||
324 | maximum baud rate of 38400. | ||
325 | |||
326 | If you are unfamiliar with how to use serial ports, then get the Serial-HOWTO | ||
327 | by Greg Hankins. It will explain everything you need to know! | ||
328 | |||
329 | |||
330 | |||
331 | 4. NOTES | ||
332 | |||
333 | You can use both drivers at once if you have a mix of board types installed | ||
334 | in a system. However to do this you will need to change the major numbers | ||
335 | used by one of the drivers. Currently both drivers use major numbers 24, 25 | ||
336 | and 28 for their devices. Change one driver to use some other major numbers, | ||
337 | and then modify the mkdevnods script to make device nodes based on those new | ||
338 | major numbers. For example, you could change the istallion.c driver to use | ||
339 | major numbers 60, 61 and 62. You will also need to create device nodes with | ||
340 | different names for the ports, for example ttyF# and cuf#. | ||
341 | |||
342 | The original Stallion board is no longer supported by Stallion Technologies. | ||
343 | Although it is known to work with the istallion driver. | ||
344 | |||
345 | Finding a free physical memory address range can be a problem. The older | ||
346 | boards like the Stallion and ONboard need large areas (64K or even 128K), so | ||
347 | they can be very difficult to get into a system. If you have 16 Mb of RAM | ||
348 | then you have no choice but to put them somewhere in the 640K -> 1Mb range. | ||
349 | ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on some | ||
350 | systems. If you have an original Stallion board, "V4.0" or Rev.O, then you | ||
351 | need a 64K memory address space, so again 0xd0000 and 0xe0000 are good. | ||
352 | Older Stallion boards are a much bigger problem. They need 128K of address | ||
353 | space and must be on a 128K boundary. If you don't have a VGA card then | ||
354 | 0xc0000 might be usable - there is really no other place you can put them | ||
355 | below 1Mb. | ||
356 | |||
357 | Both the ONboard and old Stallion boards can use higher memory addresses as | ||
358 | well, but you must have less than 16Mb of RAM to be able to use them. Usual | ||
359 | high memory addresses used include 0xec0000 and 0xf00000. | ||
360 | |||
361 | The Brumby boards only require 16Kb of address space, so you can usually | ||
362 | squeeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or in | ||
363 | the 0xd0000 range. EasyConnection 8/64 boards are even better, they only | ||
364 | require 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000 | ||
365 | are good. | ||
366 | |||
367 | If you are using an EasyConnection 8/64-EI or ONboard/E then usually the | ||
368 | 0xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither of | ||
369 | them can be used then the high memory support to use the really high address | ||
370 | ranges is the best option. Typically the 2Gb range is convenient for them, | ||
371 | and gets them well out of the way. | ||
372 | |||
373 | The ports of the EasyIO-8M board do not have DCD or DTR signals. So these | ||
374 | ports cannot be used as real modem devices. Generally, when using these | ||
375 | ports you should only use the cueX devices. | ||
376 | |||
377 | The driver utility package contains a couple of very useful programs. One | ||
378 | is a serial port statistics collection and display program - very handy | ||
379 | for solving serial port problems. The other is an extended option setting | ||
380 | program that works with the intelligent boards. | ||
381 | |||
382 | |||
383 | |||
384 | 5. DISCLAIMER | ||
385 | |||
386 | The information contained in this document is believed to be accurate and | ||
387 | reliable. However, no responsibility is assumed by Stallion Technologies | ||
388 | Pty. Ltd. for its use, nor any infringements of patents or other rights | ||
389 | of third parties resulting from its use. Stallion Technologies reserves | ||
390 | the right to modify the design of its products and will endeavour to change | ||
391 | the information in manuals and accompanying documentation accordingly. | ||
392 | |||
diff --git a/Documentation/serial/sx.txt b/Documentation/serial/sx.txt new file mode 100644 index 000000000000..cb4efa0fb5cc --- /dev/null +++ b/Documentation/serial/sx.txt | |||
@@ -0,0 +1,294 @@ | |||
1 | |||
2 | sx.txt -- specialix SX/SI multiport serial driver readme. | ||
3 | |||
4 | |||
5 | |||
6 | Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl) | ||
7 | |||
8 | Specialix pays for the development and support of this driver. | ||
9 | Please DO contact support@specialix.co.uk if you require | ||
10 | support. | ||
11 | |||
12 | This driver was developed in the BitWizard linux device | ||
13 | driver service. If you require a linux device driver for your | ||
14 | product, please contact devices@BitWizard.nl for a quote. | ||
15 | |||
16 | (History) | ||
17 | There used to be an SI driver by Simon Allan. This is a complete | ||
18 | rewrite from scratch. Just a few lines-of-code have been snatched. | ||
19 | |||
20 | (Sources) | ||
21 | Specialix document number 6210028: SX Host Card and Download Code | ||
22 | Software Functional Specification. | ||
23 | |||
24 | (Copying) | ||
25 | This program is free software; you can redistribute it and/or | ||
26 | modify it under the terms of the GNU General Public License as | ||
27 | published by the Free Software Foundation; either version 2 of | ||
28 | the License, or (at your option) any later version. | ||
29 | |||
30 | This program is distributed in the hope that it will be | ||
31 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
32 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
33 | PURPOSE. See the GNU General Public License for more details. | ||
34 | |||
35 | You should have received a copy of the GNU General Public | ||
36 | License along with this program; if not, write to the Free | ||
37 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, | ||
38 | USA. | ||
39 | |||
40 | (Addendum) | ||
41 | I'd appreciate it that if you have fixes, that you send them | ||
42 | to me first. | ||
43 | |||
44 | |||
45 | Introduction | ||
46 | ============ | ||
47 | |||
48 | This file contains some random information, that I like to have online | ||
49 | instead of in a manual that can get lost. Ever misplace your Linux | ||
50 | kernel sources? And the manual of one of the boards in your computer? | ||
51 | |||
52 | |||
53 | Theory of operation | ||
54 | =================== | ||
55 | |||
56 | An important thing to know is that the driver itself doesn't have the | ||
57 | firmware for the card. This means that you need the separate package | ||
58 | "sx_firmware". For now you can get the source at | ||
59 | |||
60 | ftp://ftp.bitwizard.nl/specialix/sx_firmware_<version>.tgz | ||
61 | |||
62 | The firmware load needs a "misc" device, so you'll need to enable the | ||
63 | "Support for user misc device modules" in your kernel configuration. | ||
64 | The misc device needs to be called "/dev/specialix_sxctl". It needs | ||
65 | misc major 10, and minor number 167 (assigned by HPA). The section | ||
66 | on creating device files below also creates this device. | ||
67 | |||
68 | After loading the sx.o module into your kernel, the driver will report | ||
69 | the number of cards detected, but because it doesn't have any | ||
70 | firmware, it will not be able to determine the number of ports. Only | ||
71 | when you then run "sx_firmware" will the firmware be downloaded and | ||
72 | the rest of the driver initialized. At that time the sx_firmware | ||
73 | program will report the number of ports installed. | ||
74 | |||
75 | In contrast with many other multi port serial cards, some of the data | ||
76 | structures are only allocated when the card knows the number of ports | ||
77 | that are connected. This means we won't waste memory for 120 port | ||
78 | descriptor structures when you only have 8 ports. If you experience | ||
79 | problems due to this, please report them: I haven't seen any. | ||
80 | |||
81 | |||
82 | Interrupts | ||
83 | ========== | ||
84 | |||
85 | A multi port serial card, would generate a horrendous amount of | ||
86 | interrupts if it would interrupt the CPU for every received | ||
87 | character. Even more than 10 years ago, the trick not to use | ||
88 | interrupts but to poll the serial cards was invented. | ||
89 | |||
90 | The SX card allow us to do this two ways. First the card limits its | ||
91 | own interrupt rate to a rate that won't overwhelm the CPU. Secondly, | ||
92 | we could forget about the cards interrupt completely and use the | ||
93 | internal timer for this purpose. | ||
94 | |||
95 | Polling the card can take up to a few percent of your CPU. Using the | ||
96 | interrupts would be better if you have most of the ports idle. Using | ||
97 | timer-based polling is better if your card almost always has work to | ||
98 | do. You save the separate interrupt in that case. | ||
99 | |||
100 | In any case, it doesn't really matter all that much. | ||
101 | |||
102 | The most common problem with interrupts is that for ISA cards in a PCI | ||
103 | system the BIOS has to be told to configure that interrupt as "legacy | ||
104 | ISA". Otherwise the card can pull on the interrupt line all it wants | ||
105 | but the CPU won't see this. | ||
106 | |||
107 | If you can't get the interrupt to work, remember that polling mode is | ||
108 | more efficient (provided you actually use the card intensively). | ||
109 | |||
110 | |||
111 | Allowed Configurations | ||
112 | ====================== | ||
113 | |||
114 | Some configurations are disallowed. Even though at a glance they might | ||
115 | seem to work, they are known to lockup the bus between the host card | ||
116 | and the device concentrators. You should respect the drivers decision | ||
117 | not to support certain configurations. It's there for a reason. | ||
118 | |||
119 | Warning: Seriously technical stuff ahead. Executive summary: Don't use | ||
120 | SX cards except configured at a 64k boundary. Skip the next paragraph. | ||
121 | |||
122 | The SX cards can theoretically be placed at a 32k boundary. So for | ||
123 | instance you can put an SX card at 0xc8000-0xd7fff. This is not a | ||
124 | "recommended configuration". ISA cards have to tell the bus controller | ||
125 | how they like their timing. Due to timing issues they have to do this | ||
126 | based on which 64k window the address falls into. This means that the | ||
127 | 32k window below and above the SX card have to use exactly the same | ||
128 | timing as the SX card. That reportedly works for other SX cards. But | ||
129 | you're still left with two useless 32k windows that should not be used | ||
130 | by anybody else. | ||
131 | |||
132 | |||
133 | Configuring the driver | ||
134 | ====================== | ||
135 | |||
136 | PCI cards are always detected. The driver auto-probes for ISA cards at | ||
137 | some sensible addresses. Please report if the auto-probe causes trouble | ||
138 | in your system, or when a card isn't detected. | ||
139 | |||
140 | I'm afraid I haven't implemented "kernel command line parameters" yet. | ||
141 | This means that if the default doesn't work for you, you shouldn't use | ||
142 | the compiled-into-the-kernel version of the driver. Use a module | ||
143 | instead. If you convince me that you need this, I'll make it for | ||
144 | you. Deal? | ||
145 | |||
146 | I'm afraid that the module parameters are a bit clumsy. If you have a | ||
147 | better idea, please tell me. | ||
148 | |||
149 | You can specify several parameters: | ||
150 | |||
151 | sx_poll: number of jiffies between timer-based polls. | ||
152 | |||
153 | Set this to "0" to disable timer based polls. | ||
154 | Initialization of cards without a working interrupt | ||
155 | will fail. | ||
156 | |||
157 | Set this to "1" if you want a polling driver. | ||
158 | (on Intel: 100 polls per second). If you don't use | ||
159 | fast baud rates, you might consider a value like "5". | ||
160 | (If you don't know how to do the math, use 1). | ||
161 | |||
162 | sx_slowpoll: Number of jiffies between timer-based polls. | ||
163 | Set this to "100" to poll once a second. | ||
164 | This should get the card out of a stall if the driver | ||
165 | ever misses an interrupt. I've never seen this happen, | ||
166 | and if it does, that's a bug. Tell me. | ||
167 | |||
168 | sx_maxints: Number of interrupts to request from the card. | ||
169 | The card normally limits interrupts to about 100 per | ||
170 | second to offload the host CPU. You can increase this | ||
171 | number to reduce latency on the card a little. | ||
172 | Note that if you give a very high number you can overload | ||
173 | your CPU as well as the CPU on the host card. This setting | ||
174 | is inaccurate and not recommended for SI cards (But it | ||
175 | works). | ||
176 | |||
177 | sx_irqmask: The mask of allowable IRQs to use. I suggest you set | ||
178 | this to 0 (disable IRQs all together) and use polling if | ||
179 | the assignment of IRQs becomes problematic. This is defined | ||
180 | as the sum of (1 << irq) 's that you want to allow. So | ||
181 | sx_irqmask of 8 (1 << 3) specifies that only irq 3 may | ||
182 | be used by the SX driver. If you want to specify to the | ||
183 | driver: "Either irq 11 or 12 is ok for you to use", then | ||
184 | specify (1 << 11) | (1 << 12) = 0x1800 . | ||
185 | |||
186 | sx_debug: You can enable different sorts of debug traces with this. | ||
187 | At "-1" all debugging traces are active. You'll get several | ||
188 | times more debugging output than you'll get characters | ||
189 | transmitted. | ||
190 | |||
191 | |||
192 | Baud rates | ||
193 | ========== | ||
194 | |||
195 | Theoretically new SXDCs should be capable of more than 460k | ||
196 | baud. However the line drivers usually give up before that. Also the | ||
197 | CPU on the card may not be able to handle 8 channels going at full | ||
198 | blast at that speed. Moreover, the buffers are not large enough to | ||
199 | allow operation with 100 interrupts per second. You'll have to realize | ||
200 | that the card has a 256 byte buffer, so you'll have to increase the | ||
201 | number of interrupts per second if you have more than 256*100 bytes | ||
202 | per second to transmit. If you do any performance testing in this | ||
203 | area, I'd be glad to hear from you... | ||
204 | |||
205 | (Psst Linux users..... I think the Linux driver is more efficient than | ||
206 | the driver for other OSes. If you can and want to benchmark them | ||
207 | against each other, be my guest, and report your findings...... :-) | ||
208 | |||
209 | |||
210 | Ports and devices | ||
211 | ================= | ||
212 | |||
213 | Port 0 is the top connector on the module closest to the host | ||
214 | card. Oh, the ports on the SXDCs and TAs are labelled from 1 to 8 | ||
215 | instead of from 0 to 7, as they are numbered by linux. I'm stubborn in | ||
216 | this: I know for sure that I wouldn't be able to calculate which port | ||
217 | is which anymore if I would change that.... | ||
218 | |||
219 | |||
220 | Devices: | ||
221 | |||
222 | You should make the device files as follows: | ||
223 | |||
224 | #!/bin/sh | ||
225 | # (I recommend that you cut-and-paste this into a file and run that) | ||
226 | cd /dev | ||
227 | t=0 | ||
228 | mknod specialix_sxctl c 10 167 | ||
229 | while [ $t -lt 64 ] | ||
230 | do | ||
231 | echo -n "$t " | ||
232 | mknod ttyX$t c 32 $t | ||
233 | mknod cux$t c 33 $t | ||
234 | t=`expr $t + 1` | ||
235 | done | ||
236 | echo "" | ||
237 | rm /etc/psdevtab | ||
238 | ps > /dev/null | ||
239 | |||
240 | |||
241 | This creates 64 devices. If you have more, increase the constant on | ||
242 | the line with "while". The devices start at 0, as is customary on | ||
243 | Linux. Specialix seems to like starting the numbering at 1. | ||
244 | |||
245 | If your system doesn't come with these devices pre-installed, bug your | ||
246 | linux-vendor about this. They should have these devices | ||
247 | "pre-installed" before the new millennium. The "ps" stuff at the end | ||
248 | is to "tell" ps that the new devices exist. | ||
249 | |||
250 | Officially the maximum number of cards per computer is 4. This driver | ||
251 | however supports as many cards in one machine as you want. You'll run | ||
252 | out of interrupts after a few, but you can switch to polled operation | ||
253 | then. At about 256 ports (More than 8 cards), we run out of minor | ||
254 | device numbers. Sorry. I suggest you buy a second computer.... (Or | ||
255 | switch to RIO). | ||
256 | |||
257 | ------------------------------------------------------------------------ | ||
258 | |||
259 | |||
260 | Fixed bugs and restrictions: | ||
261 | - Hangup processing. | ||
262 | -- Done. | ||
263 | |||
264 | - the write path in generic_serial (lockup / oops). | ||
265 | -- Done (Ugly: not the way I want it. Copied from serial.c). | ||
266 | |||
267 | - write buffer isn't flushed at close. | ||
268 | -- Done. I still seem to lose a few chars at close. | ||
269 | Sorry. I think that this is a firmware issue. (-> Specialix) | ||
270 | |||
271 | - drain hardware before changing termios | ||
272 | - Change debug on the fly. | ||
273 | - ISA free irq -1. (no firmware loaded). | ||
274 | - adding c8000 as a probe address. Added warning. | ||
275 | - Add a RAMtest for the RAM on the card.c | ||
276 | - Crash when opening a port "way" of the number of allowed ports. | ||
277 | (for example opening port 60 when there are only 24 ports attached) | ||
278 | - Sometimes the use-count strays a bit. After a few hours of | ||
279 | testing the use count is sometimes "3". If you are not like | ||
280 | me and can remember what you did to get it that way, I'd | ||
281 | appreciate an Email. Possibly fixed. Tell me if anyone still | ||
282 | sees this. | ||
283 | - TAs don't work right if you don't connect all the modem control | ||
284 | signals. SXDCs do. T225 firmware problem -> Specialix. | ||
285 | (Mostly fixed now, I think. Tell me if you encounter this!) | ||
286 | |||
287 | Bugs & restrictions: | ||
288 | |||
289 | - Arbitrary baud rates. Requires firmware update. (-> Specialix) | ||
290 | |||
291 | - Low latency (mostly firmware, -> Specialix) | ||
292 | |||
293 | |||
294 | |||
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt new file mode 100644 index 000000000000..8e65c4498c52 --- /dev/null +++ b/Documentation/serial/tty.txt | |||
@@ -0,0 +1,292 @@ | |||
1 | |||
2 | The Lockronomicon | ||
3 | |||
4 | Your guide to the ancient and twisted locking policies of the tty layer and | ||
5 | the warped logic behind them. Beware all ye who read on. | ||
6 | |||
7 | FIXME: still need to work out the full set of BKL assumptions and document | ||
8 | them so they can eventually be killed off. | ||
9 | |||
10 | |||
11 | Line Discipline | ||
12 | --------------- | ||
13 | |||
14 | Line disciplines are registered with tty_register_ldisc() passing the | ||
15 | discipline number and the ldisc structure. At the point of registration the | ||
16 | discipline must be ready to use and it is possible it will get used before | ||
17 | the call returns success. If the call returns an error then it won't get | ||
18 | called. Do not re-use ldisc numbers as they are part of the userspace ABI | ||
19 | and writing over an existing ldisc will cause demons to eat your computer. | ||
20 | After the return the ldisc data has been copied so you may free your own | ||
21 | copy of the structure. You must not re-register over the top of the line | ||
22 | discipline even with the same data or your computer again will be eaten by | ||
23 | demons. | ||
24 | |||
25 | In order to remove a line discipline call tty_unregister_ldisc(). | ||
26 | In ancient times this always worked. In modern times the function will | ||
27 | return -EBUSY if the ldisc is currently in use. Since the ldisc referencing | ||
28 | code manages the module counts this should not usually be a concern. | ||
29 | |||
30 | Heed this warning: the reference count field of the registered copies of the | ||
31 | tty_ldisc structure in the ldisc table counts the number of lines using this | ||
32 | discipline. The reference count of the tty_ldisc structure within a tty | ||
33 | counts the number of active users of the ldisc at this instant. In effect it | ||
34 | counts the number of threads of execution within an ldisc method (plus those | ||
35 | about to enter and exit although this detail matters not). | ||
36 | |||
37 | Line Discipline Methods | ||
38 | ----------------------- | ||
39 | |||
40 | TTY side interfaces: | ||
41 | |||
42 | open() - Called when the line discipline is attached to | ||
43 | the terminal. No other call into the line | ||
44 | discipline for this tty will occur until it | ||
45 | completes successfully. Can sleep. | ||
46 | |||
47 | close() - This is called on a terminal when the line | ||
48 | discipline is being unplugged. At the point of | ||
49 | execution no further users will enter the | ||
50 | ldisc code for this tty. Can sleep. | ||
51 | |||
52 | hangup() - Called when the tty line is hung up. | ||
53 | The line discipline should cease I/O to the tty. | ||
54 | No further calls into the ldisc code will occur. | ||
55 | Can sleep. | ||
56 | |||
57 | write() - A process is writing data through the line | ||
58 | discipline. Multiple write calls are serialized | ||
59 | by the tty layer for the ldisc. May sleep. | ||
60 | |||
61 | flush_buffer() - (optional) May be called at any point between | ||
62 | open and close, and instructs the line discipline | ||
63 | to empty its input buffer. | ||
64 | |||
65 | chars_in_buffer() - (optional) Report the number of bytes in the input | ||
66 | buffer. | ||
67 | |||
68 | set_termios() - (optional) Called on termios structure changes. | ||
69 | The caller passes the old termios data and the | ||
70 | current data is in the tty. Called under the | ||
71 | termios semaphore so allowed to sleep. Serialized | ||
72 | against itself only. | ||
73 | |||
74 | read() - Move data from the line discipline to the user. | ||
75 | Multiple read calls may occur in parallel and the | ||
76 | ldisc must deal with serialization issues. May | ||
77 | sleep. | ||
78 | |||
79 | poll() - Check the status for the poll/select calls. Multiple | ||
80 | poll calls may occur in parallel. May sleep. | ||
81 | |||
82 | ioctl() - Called when an ioctl is handed to the tty layer | ||
83 | that might be for the ldisc. Multiple ioctl calls | ||
84 | may occur in parallel. May sleep. | ||
85 | |||
86 | Driver Side Interfaces: | ||
87 | |||
88 | receive_buf() - Hand buffers of bytes from the driver to the ldisc | ||
89 | for processing. Semantics currently rather | ||
90 | mysterious 8( | ||
91 | |||
92 | write_wakeup() - May be called at any point between open and close. | ||
93 | The TTY_DO_WRITE_WAKEUP flag indicates if a call | ||
94 | is needed but always races versus calls. Thus the | ||
95 | ldisc must be careful about setting order and to | ||
96 | handle unexpected calls. Must not sleep. | ||
97 | |||
98 | The driver is forbidden from calling this directly | ||
99 | from the ->write call from the ldisc as the ldisc | ||
100 | is permitted to call the driver write method from | ||
101 | this function. In such a situation defer it. | ||
102 | |||
103 | |||
104 | Driver Access | ||
105 | |||
106 | Line discipline methods can call the following methods of the underlying | ||
107 | hardware driver through the function pointers within the tty->driver | ||
108 | structure: | ||
109 | |||
110 | write() Write a block of characters to the tty device. | ||
111 | Returns the number of characters accepted. The | ||
112 | character buffer passed to this method is already | ||
113 | in kernel space. | ||
114 | |||
115 | put_char() Queues a character for writing to the tty device. | ||
116 | If there is no room in the queue, the character is | ||
117 | ignored. | ||
118 | |||
119 | flush_chars() (Optional) If defined, must be called after | ||
120 | queueing characters with put_char() in order to | ||
121 | start transmission. | ||
122 | |||
123 | write_room() Returns the numbers of characters the tty driver | ||
124 | will accept for queueing to be written. | ||
125 | |||
126 | ioctl() Invoke device specific ioctl. | ||
127 | Expects data pointers to refer to userspace. | ||
128 | Returns ENOIOCTLCMD for unrecognized ioctl numbers. | ||
129 | |||
130 | set_termios() Notify the tty driver that the device's termios | ||
131 | settings have changed. New settings are in | ||
132 | tty->termios. Previous settings should be passed in | ||
133 | the "old" argument. | ||
134 | |||
135 | The API is defined such that the driver should return | ||
136 | the actual modes selected. This means that the | ||
137 | driver function is responsible for modifying any | ||
138 | bits in the request it cannot fulfill to indicate | ||
139 | the actual modes being used. A device with no | ||
140 | hardware capability for change (eg a USB dongle or | ||
141 | virtual port) can provide NULL for this method. | ||
142 | |||
143 | throttle() Notify the tty driver that input buffers for the | ||
144 | line discipline are close to full, and it should | ||
145 | somehow signal that no more characters should be | ||
146 | sent to the tty. | ||
147 | |||
148 | unthrottle() Notify the tty driver that characters can now be | ||
149 | sent to the tty without fear of overrunning the | ||
150 | input buffers of the line disciplines. | ||
151 | |||
152 | stop() Ask the tty driver to stop outputting characters | ||
153 | to the tty device. | ||
154 | |||
155 | start() Ask the tty driver to resume sending characters | ||
156 | to the tty device. | ||
157 | |||
158 | hangup() Ask the tty driver to hang up the tty device. | ||
159 | |||
160 | break_ctl() (Optional) Ask the tty driver to turn on or off | ||
161 | BREAK status on the RS-232 port. If state is -1, | ||
162 | then the BREAK status should be turned on; if | ||
163 | state is 0, then BREAK should be turned off. | ||
164 | If this routine is not implemented, use ioctls | ||
165 | TIOCSBRK / TIOCCBRK instead. | ||
166 | |||
167 | wait_until_sent() Waits until the device has written out all of the | ||
168 | characters in its transmitter FIFO. | ||
169 | |||
170 | send_xchar() Send a high-priority XON/XOFF character to the device. | ||
171 | |||
172 | |||
173 | Flags | ||
174 | |||
175 | Line discipline methods have access to tty->flags field containing the | ||
176 | following interesting flags: | ||
177 | |||
178 | TTY_THROTTLED Driver input is throttled. The ldisc should call | ||
179 | tty->driver->unthrottle() in order to resume | ||
180 | reception when it is ready to process more data. | ||
181 | |||
182 | TTY_DO_WRITE_WAKEUP If set, causes the driver to call the ldisc's | ||
183 | write_wakeup() method in order to resume | ||
184 | transmission when it can accept more data | ||
185 | to transmit. | ||
186 | |||
187 | TTY_IO_ERROR If set, causes all subsequent userspace read/write | ||
188 | calls on the tty to fail, returning -EIO. | ||
189 | |||
190 | TTY_OTHER_CLOSED Device is a pty and the other side has closed. | ||
191 | |||
192 | TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into | ||
193 | smaller chunks. | ||
194 | |||
195 | |||
196 | Locking | ||
197 | |||
198 | Callers to the line discipline functions from the tty layer are required to | ||
199 | take line discipline locks. The same is true of calls from the driver side | ||
200 | but not yet enforced. | ||
201 | |||
202 | Three calls are now provided | ||
203 | |||
204 | ldisc = tty_ldisc_ref(tty); | ||
205 | |||
206 | takes a handle to the line discipline in the tty and returns it. If no ldisc | ||
207 | is currently attached or the ldisc is being closed and re-opened at this | ||
208 | point then NULL is returned. While this handle is held the ldisc will not | ||
209 | change or go away. | ||
210 | |||
211 | tty_ldisc_deref(ldisc) | ||
212 | |||
213 | Returns the ldisc reference and allows the ldisc to be closed. Returning the | ||
214 | reference takes away your right to call the ldisc functions until you take | ||
215 | a new reference. | ||
216 | |||
217 | ldisc = tty_ldisc_ref_wait(tty); | ||
218 | |||
219 | Performs the same function as tty_ldisc_ref except that it will wait for an | ||
220 | ldisc change to complete and then return a reference to the new ldisc. | ||
221 | |||
222 | While these functions are slightly slower than the old code they should have | ||
223 | minimal impact as most receive logic uses the flip buffers and they only | ||
224 | need to take a reference when they push bits up through the driver. | ||
225 | |||
226 | A caution: The ldisc->open(), ldisc->close() and driver->set_ldisc | ||
227 | functions are called with the ldisc unavailable. Thus tty_ldisc_ref will | ||
228 | fail in this situation if used within these functions. Ldisc and driver | ||
229 | code calling its own functions must be careful in this case. | ||
230 | |||
231 | |||
232 | Driver Interface | ||
233 | ---------------- | ||
234 | |||
235 | open() - Called when a device is opened. May sleep | ||
236 | |||
237 | close() - Called when a device is closed. At the point of | ||
238 | return from this call the driver must make no | ||
239 | further ldisc calls of any kind. May sleep | ||
240 | |||
241 | write() - Called to write bytes to the device. May not | ||
242 | sleep. May occur in parallel in special cases. | ||
243 | Because this includes panic paths drivers generally | ||
244 | shouldn't try and do clever locking here. | ||
245 | |||
246 | put_char() - Stuff a single character onto the queue. The | ||
247 | driver is guaranteed following up calls to | ||
248 | flush_chars. | ||
249 | |||
250 | flush_chars() - Ask the kernel to write put_char queue | ||
251 | |||
252 | write_room() - Return the number of characters tht can be stuffed | ||
253 | into the port buffers without overflow (or less). | ||
254 | The ldisc is responsible for being intelligent | ||
255 | about multi-threading of write_room/write calls | ||
256 | |||
257 | ioctl() - Called when an ioctl may be for the driver | ||
258 | |||
259 | set_termios() - Called on termios change, serialized against | ||
260 | itself by a semaphore. May sleep. | ||
261 | |||
262 | set_ldisc() - Notifier for discipline change. At the point this | ||
263 | is done the discipline is not yet usable. Can now | ||
264 | sleep (I think) | ||
265 | |||
266 | throttle() - Called by the ldisc to ask the driver to do flow | ||
267 | control. Serialization including with unthrottle | ||
268 | is the job of the ldisc layer. | ||
269 | |||
270 | unthrottle() - Called by the ldisc to ask the driver to stop flow | ||
271 | control. | ||
272 | |||
273 | stop() - Ldisc notifier to the driver to stop output. As with | ||
274 | throttle the serializations with start() are down | ||
275 | to the ldisc layer. | ||
276 | |||
277 | start() - Ldisc notifier to the driver to start output. | ||
278 | |||
279 | hangup() - Ask the tty driver to cause a hangup initiated | ||
280 | from the host side. [Can sleep ??] | ||
281 | |||
282 | break_ctl() - Send RS232 break. Can sleep. Can get called in | ||
283 | parallel, driver must serialize (for now), and | ||
284 | with write calls. | ||
285 | |||
286 | wait_until_sent() - Wait for characters to exit the hardware queue | ||
287 | of the driver. Can sleep | ||
288 | |||
289 | send_xchar() - Send XON/XOFF and if possible jump the queue with | ||
290 | it in order to get fast flow control responses. | ||
291 | Cannot sleep ?? | ||
292 | |||