aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/serial
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-11-13 16:33:24 -0500
committerRandy Dunlap <randy.dunlap@oracle.com>2008-11-14 12:28:53 -0500
commit31c00fc15ebd35c1647775dbfc167a15d46657fd (patch)
tree6d8ff2a6607c94a791ccc56fd8eb625e4fdcc01a /Documentation/serial
parent3edac25f2e8ac8c2a84904c140e1aeb434e73e75 (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-INDEX24
-rw-r--r--Documentation/serial/README.cycladesZ8
-rw-r--r--Documentation/serial/computone.txt522
-rw-r--r--Documentation/serial/digiepca.txt98
-rw-r--r--Documentation/serial/hayes-esp.txt154
-rw-r--r--Documentation/serial/moxa-smartio523
-rw-r--r--Documentation/serial/riscom8.txt36
-rw-r--r--Documentation/serial/rocket.txt189
-rw-r--r--Documentation/serial/specialix.txt383
-rw-r--r--Documentation/serial/stallion.txt392
-rw-r--r--Documentation/serial/sx.txt294
-rw-r--r--Documentation/serial/tty.txt292
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 @@
100-INDEX
2 - this file.
3README.cycladesZ
4 - info on Cyclades-Z firmware loading.
5computone.txt
6 - info on Computone Intelliport II/Plus Multiport Serial Driver.
7digiepca.txt
8 - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
9hayes-esp.txt
10 - info on using the Hayes ESP serial driver.
11moxa-smartio
12 - file with info on installing/using Moxa multiport serial driver.
13riscom8.txt
14 - notes on using the RISCom/8 multi-port serial driver.
15rocket.txt
16 - info on the Comtrol RocketPort multiport serial driver.
17specialix.txt
18 - info on hardware/driver for specialix IO8+ multiport serial card.
19stallion.txt
20 - info on using the Stallion multiport serial driver.
21sx.txt
22 - info on the Specialix SX/SI multiport serial driver.
23tty.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
2The Cyclades-Z must have firmware loaded onto the card before it will
3operate. This operation should be performed during system startup,
4
5The firmware, loader program and the latest device driver code are
6available 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 @@
1NOTE: This is an unmaintained driver. It is not guaranteed to work due to
2changes made in the tty layer in 2.6. If you wish to take over maintenance of
3this driver, contact Michael Warfield <mhw@wittsend.com>.
4
5Changelog:
6----------
711-01-2001: Original Document
8
910-29-2004: Minor misspelling & format fix, update status of driver.
10 James Nelson <james4765@gmail.com>
11
12Computone Intelliport II/Plus Multiport Serial Driver
13-----------------------------------------------------
14
15Release Notes For Linux Kernel 2.2 and higher.
16These notes are for the drivers which have already been integrated into the
17kernel and have been tested on Linux kernels 2.0, 2.2, 2.3, and 2.4.
18
19Version: 1.2.14
20Date: 11/01/2001
21Historical Author: Andrew Manison <amanison@america.net>
22Primary Author: Doug McNash
23Support: support@computone.com
24Fixes and Updates: Mike Warfield <mhw@wittsend.com>
25
26This file assumes that you are using the Computone drivers which are
27integrated into the kernel sources. For updating the drivers or installing
28drivers into kernels which do not already have Computone drivers, please
29refer to the instructions in the README.computone file in the driver patch.
30
31
321. INTRODUCTION
33
34This driver supports the entire family of Intelliport II/Plus controllers
35with the exception of the MicroChannel controllers. It does not support
36products previous to the Intelliport II.
37
38This driver was developed on the v2.0.x Linux tree and has been tested up
39to v2.4.14; it will probably not work with earlier v1.X kernels,.
40
41
422. QUICK INSTALLATION
43
44Hardware - 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
60Software -
61
62Module installation:
63
64a) Determine free irq/address to use if any (configure BIOS if need be)
65b) 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.
68c) 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.
73d) Run "make modules"
74e) Run "make modules_install"
75f) Run "/sbin/depmod -a"
76g) install driver using `modprobe ip2 <options>` (options listed below)
77h) run ip2mkdev (either the script below or the binary version)
78
79
80Kernel installation:
81
82a) Determine free irq/address to use if any (configure BIOS if need be)
83b) 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.
86c) 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)
89d) Run "make zImage" or whatever target you prefer.
90e) mv /usr/src/linux/arch/i386/boot/zImage to /boot.
91f) 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.
93g) Reboot using this kernel
94h) run ip2mkdev (either the script below or the binary version)
95
96Kernel command line options:
97
98When compiling the driver into the kernel, io and irq may be
99compiled into the driver by editing ip2.c and setting the values for
100io and irq in the appropriate array. An alternative is to specify
101a command line parameter to the kernel at boot up.
102
103 ip2=io0,irq0,io1,irq1,io2,irq2,io3,irq3
104
105Note that this order is very different from the specifications for the
106modload parameters which have separate IRQ and IO specifiers.
107
108The 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
115You 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
127This can be added to and "append" option in lilo.conf similar to this:
128
129 append="ip2=1,0,1,0"
130
131
1323. INSTALLATION
133
134Previously, the driver sources were packaged with a set of patch files
135to update the character drivers' makefile and configuration file, and other
136kernel source files. A build script (ip2build) was included which applies
137the patches if needed, and build any utilities needed.
138What you receive may be a single patch file in conventional kernel
139patch format build script. That form can also be applied by
140running patch -p1 < ThePatchFile. Otherwise run ip2build.
141
142The driver can be installed as a module (recommended) or built into the
143kernel. This is selected as for other drivers through the `make config`
144command from the root of the Linux source tree. If the driver is built
145into the kernel you will need to edit the file ip2.c to match the boards
146you are installing. See that file for instructions. If the driver is
147installed as a module the configuration can also be specified on the
148modprobe command line as follows:
149
150 modprobe ip2 irq=irq1,irq2,irq3,irq4 io=addr1,addr2,addr3,addr4
151
152where irqnum is one of the valid Intelliport II interrupts (3,4,5,7,10,11,
15312,15) and addr1-4 are the base addresses for up to four controllers. If
154the irqs are not specified the driver uses the default in ip2.c (which
155selects polled mode). If no base addresses are specified the defaults in
156ip2.c are used. If you are autoloading the driver module with kerneld or
157kmod the base addresses and interrupt number must also be set in ip2.c
158and recompile or just insert and options line in /etc/modprobe.conf or both.
159The options line is equivalent to the command line and takes precedence over
160what 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
168The equivalent in ip2.c:
169
170static int io[IP2_MAX_BOARDS]= { 1, 0x328, 0, 0 };
171static int irq[IP2_MAX_BOARDS] = { 1, 10, -1, -1 };
172
173The equivalent for the kernel command line (in lilo.conf):
174
175 append="ip2=1,1,0x328,10"
176
177
178Note: 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
182Specifying an invalid or in-use irq will default the driver into
183running in polled mode for that card. If all irq entries are 0 then
184all cards will operate in polled mode.
185
186If you select the driver as part of the kernel run :
187
188 make zlilo (or whatever you do to create a bootable kernel)
189
190If you selected a module run :
191
192 make modules && make modules_install
193
194The utility ip2mkdev (see 5 and 7 below) creates all the device nodes
195required by the driver. For a device to be created it must be configured
196in the driver and the board must be installed. Only devices corresponding
197to real IntelliPort II ports are created. With multiple boards and expansion
198boxes this will leave gaps in the sequence of device names. ip2mkdev uses
199Linux tty naming conventions: ttyF0 - ttyF255 for normal devices, and
200cuf0 - cuf255 for callout devices.
201
202
2034. USING THE DRIVERS
204
205As noted above, the driver implements the ports in accordance with Linux
206conventions, and the devices should be interchangeable with the standard
207serial devices. (This is a key point for problem reporting: please make
208sure that what you are trying do works on the ttySx/cuax ports first; then
209tell us what went wrong with the ip2 ports!)
210
211Higher speeds can be obtained using the setserial utility which remaps
21238,400 bps (extb) to 57,600 bps, 115,200 bps, or a custom speed.
213Intelliport II installations using the PowerPort expansion module can
214use the custom speed setting to select the highest speeds: 153,600 bps,
215230,400 bps, 307,200 bps, 460,800bps and 921,600 bps. The base for
216custom baud rate configuration is fixed at 921,600 for cards/expansion
217modules with ST654's and 115200 for those with Cirrus CD1400's. This
218corresponds to the maximum bit rates those chips are capable.
219For example if the baud base is 921600 and the baud divisor is 18 then
220the custom rate is 921600/18 = 51200 bps. See the setserial man page for
221complete details. Of course if stty accepts the higher rates now you can
222use that as well as the standard ioctls().
223
224
2255. ip2mkdev and assorted utilities...
226
227Several utilities, including the source for a binary ip2mkdev utility are
228available under .../drivers/char/ip2. These can be build by changing to
229that directory and typing "make" after the kernel has be built. If you do
230not wish to compile the binary utilities, the shell script below can be
231cut out and run as "ip2mkdev" to create the necessary device files. To
232use the ip2mkdev script, you must have procfs enabled and the proc file
233system mounted on /proc.
234
235
2366. NOTES
237
238This is a release version of the driver, but it is impossible to test it
239in all configurations of Linux. If there is any anomalous behaviour that
240does not match the standard serial port's behaviour please let us know.
241
242
2437. ip2mkdev shell script
244
245Previously, this script was simply attached here. It is now attached as a
246shar archive to make it easier to extract the script from the documentation.
247To create the ip2mkdev shell script change to a convenient directory (/tmp
248works just fine) and run the following command:
249
250 unshar Documentation/serial/computone.txt
251 (This file)
252
253You should now have a file ip2mkdev in your current working directory with
254permissions set to execute. Running that script with then create the
255necessary devices for the Computone boards, interfaces, and ports which
256are 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#
274save_IFS="${IFS}"
275IFS="${IFS}:"
276gettext_dir=FAILED
277locale_dir=FAILED
278first_param="$1"
279for dir in $PATH
280do
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
295done
296IFS="$save_IFS"
297if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
298then
299 echo=echo
300else
301 TEXTDOMAINDIR=$locale_dir
302 export TEXTDOMAINDIR
303 TEXTDOMAIN=sharutils
304 export TEXTDOMAIN
305 echo="$gettext_dir/gettext -s"
306fi
307if 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"'
309elif 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"'
311elif 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"'
313else
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
319fi
320rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
321#
322if mkdir _sh17581; then
323 $echo 'x -' 'creating lock directory'
324else
325 $echo 'failed to create lock directory'
326 exit 1
327fi
328# ============= ip2mkdev ==============
329if test -f 'ip2mkdev' && test "$first_param" != -c; then
330 $echo 'x -' SKIPPING 'ip2mkdev' '(file already exists)'
331else
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#
359X
360if 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!
363X cd /dev
364X echo "Creating symbolic links to devfs devices"
365X for i in `ls ip2` ; do
366X if test ! -L ip2$i ; then
367X # Remove it incase it wasn't a symlink (old device)
368X rm -f ip2$i
369X ln -s ip2/$i ip2$i
370X fi
371X done
372X for i in `( cd tts ; ls F* )` ; do
373X if test ! -L tty$i ; then
374X # Remove it incase it wasn't a symlink (old device)
375X rm -f tty$i
376X ln -s tts/$i tty$i
377X fi
378X done
379X for i in `( cd cua ; ls F* )` ; do
380X DEVNUMBER=`expr $i : 'F\(.*\)'`
381X if test ! -L cuf$DEVNUMBER ; then
382X # Remove it incase it wasn't a symlink (old device)
383X rm -f cuf$DEVNUMBER
384X ln -s cua/$i cuf$DEVNUMBER
385X fi
386X done
387X exit 0
388fi
389X
390if test ! -f /proc/tty/drivers
391then
392X echo "\
393Unable to check driver status.
394Make sure proc file system is mounted."
395X
396X exit 255
397fi
398X
399if test ! -f /proc/tty/driver/ip2
400then
401X echo "\
402Unable to locate ip2 proc file.
403Attempting to load driver"
404X
405X if /sbin/insmod ip2
406X then
407X if test ! -f /proc/tty/driver/ip2
408X then
409X echo "\
410Unable to locate ip2 proc file after loading driver.
411Driver initialization failure or driver version error.
412"
413X exit 255
414X fi
415X else
416X echo "Unable to load ip2 driver."
417X exit 255
418X fi
419fi
420X
421# Ok... So we got the driver loaded and we can locate the procfs files.
422# Next we need our major numbers.
423X
424TTYMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/tt/!d' -e 's/.*tt[^ ]*[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers`
425CUAMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/cu/!d' -e 's/.*cu[^ ]*[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers`
426BRDMAJOR=`sed -e '/^Driver: /!d' -e 's/.*IMajor=\([0-9]*\)[ ]*.*/\1/' < /proc/tty/driver/ip2`
427X
428echo "\
429TTYMAJOR = $TTYMAJOR
430CUAMAJOR = $CUAMAJOR
431BRDMAJOR = $BRDMAJOR
432"
433X
434# Ok... Now we should know our major numbers, if appropriate...
435# Now we need our boards and start the device loops.
436X
437grep '^Board [0-9]:' /proc/tty/driver/ip2 | while read token number type alltherest
438do
439X # The test for blank "type" will catch the stats lead-in lines
440X # if they exist in the file
441X if test "$type" = "vacant" -o "$type" = "Vacant" -o "$type" = ""
442X then
443X continue
444X fi
445X
446X BOARDNO=`expr "$number" : '\([0-9]\):'`
447X PORTS=`expr "$alltherest" : '.*ports=\([0-9]*\)' | tr ',' ' '`
448X MINORS=`expr "$alltherest" : '.*minors=\([0-9,]*\)' | tr ',' ' '`
449X
450X if test "$BOARDNO" = "" -o "$PORTS" = ""
451X then
452# This may be a bug. We should at least get this much information
453X echo "Unable to process board line"
454X continue
455X fi
456X
457X if test "$MINORS" = ""
458X then
459# Silently skip this one. This board seems to have no boxes
460X continue
461X fi
462X
463X echo "board $BOARDNO: $type ports = $PORTS; port numbers = $MINORS"
464X
465X if test "$BRDMAJOR" != ""
466X then
467X BRDMINOR=`expr $BOARDNO \* 4`
468X STSMINOR=`expr $BRDMINOR + 1`
469X if test ! -c /dev/ip2ipl$BOARDNO ; then
470X mknod /dev/ip2ipl$BOARDNO c $BRDMAJOR $BRDMINOR
471X fi
472X if test ! -c /dev/ip2stat$BOARDNO ; then
473X mknod /dev/ip2stat$BOARDNO c $BRDMAJOR $STSMINOR
474X fi
475X fi
476X
477X if test "$TTYMAJOR" != ""
478X then
479X PORTNO=$BOARDBASE
480X
481X for PORTNO in $MINORS
482X do
483X if test ! -c /dev/ttyF$PORTNO ; then
484X # We got the hardware but no device - make it
485X mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO
486X fi
487X done
488X fi
489X
490X if test "$CUAMAJOR" != ""
491X then
492X PORTNO=$BOARDBASE
493X
494X for PORTNO in $MINORS
495X do
496X if test ! -c /dev/cuf$PORTNO ; then
497X # We got the hardware but no device - make it
498X mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO
499X fi
500X done
501X fi
502done
503X
504Xexit 0
505SHAR_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'
513cb5717134509f38bad9fde6b1f79b4a4 ip2mkdev
514SHAR_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
520fi
521rm -fr _sh17581
522exit 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 @@
1NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at
2http://www.digi.com for PCI cards. They no longer maintain this driver,
3and have no 2.6 driver for ISA cards.
4
5This driver requires a number of user-space tools. They can be acquired from
6http://www.digi.com, but only works with 2.4 kernels.
7
8
9The Digi Intl. epca driver.
10----------------------------
11The Digi Intl. epca driver for Linux supports the following boards:
12
13Digi PC/Xem, PC/Xr, PC/Xe, PC/Xi, PC/Xeve
14Digi EISA/Xem, PCI/Xem, PCI/Xr
15
16Limitations:
17------------
18Currently the driver only autoprobes for supported PCI boards.
19
20The Linux MAKEDEV command does not support generating the Digiboard
21Devices. Users executing digiConfig to setup EISA and PC series cards
22will have their device nodes automatically constructed (cud?? for ~CLOCAL,
23and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO
24prompt, or those users booting PCI cards may use buildDIGI to construct
25the necessary nodes.
26
27Notes:
28------
29This driver may be configured via LILO. For users who have already configured
30their driver using digiConfig, configuring from LILO will override previous
31settings. Multiple boards may be configured by issuing multiple LILO command
32lines. For examples see the bottom of this document.
33
34Device names start at 0 and continue up. Beware of this as previous Digi
35drivers started device names with 1.
36
37PCI boards are auto-detected and configured by the driver. PCI boards will
38be allocated device numbers (internally) beginning with the lowest PCI slot
39first. In other words a PCI card in slot 3 will always have higher device
40nodes than a PCI card in slot 1.
41
42LILO config examples:
43---------------------
44Using LILO's APPEND command, a string of comma separated identifiers or
45integers can be used to configure supported boards. The six values in order
46are:
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
56NOTE : PCI boards are auto-detected and configured. Do not attempt to
57configure PCI boards with the LILO append command. If you wish to override
58previous configuration data (As set by digiConfig), but you do not wish to
59configure any specific card (Example if there are PCI cards in the system)
60the following override command will accomplish this:
61-> append="digi=2"
62
63Samples:
64 append="digiepca=E,PC/Xe,D,16,200,D0000"
65 or
66 append="digi=1,0,0,16,512,851968"
67
68Supporting Tools:
69-----------------
70Supporting tools include digiDload, digiConfig, buildPCI, and ditty. See
71drivers/char/README.epca for more details. Note,
72this driver REQUIRES that digiDload be executed prior to it being used.
73Failure to do this will result in an ENODEV error.
74
75Documentation:
76--------------
77Complete documentation for this product may be found in the tool package.
78
79Sources of information and support:
80-----------------------------------
81Digi Intl. support site for this product:
82
83-> http://www.digi.com
84
85Acknowledgments:
86----------------
87Much of this work (And even text) was derived from a similar document
88supporting the original public domain DigiBoard driver Copyright (C)
891994,1995 Troy De Jongh. Many thanks to Christoph Lameter
90(christoph@lameter.com) and Mike McLagan (mike.mclagan@linux.org) who authored
91and contributed to the original document.
92
93Changelog:
94----------
9510-29-04: Update status of driver, remove dead links in document
96 James Nelson <james4765@gmail.com>
97
982000 (?) 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 @@
1HAYES ESP DRIVER VERSION 2.1
2
3A big thanks to the people at Hayes, especially Alan Adamson. Their support
4has enabled me to provide enhancements to the driver.
5
6Please report your experiences with this driver to me (arobinso@nyx.net). I
7am looking for both positive and negative feedback.
8
9*** IMPORTANT CHANGES FOR 2.1 ***
10Support for PIO mode. Five situations will cause PIO mode to be used:
111) A multiport card is detected. PIO mode will always be used. (8 port cards
12do not support DMA).
132) The DMA channel is set to an invalid value (anything other than 1 or 3).
143) The DMA buffer/channel could not be allocated. The port will revert to PIO
15mode until it is reopened.
164) Less than a specified number of bytes need to be transferred to/from the
17FIFOs. PIO mode will be used for that transfer only.
185) A port needs to do a DMA transfer and another port is already using the
19DMA channel. PIO mode will be used for that transfer only.
20
21Since the Hayes ESP seems to conflict with other cards (notably sound cards)
22when using DMA, DMA is turned off by default. To use DMA, it must be turned
23on explicitly, either with the "dma=" option described below or with
24setserial. A multiport card can be forced into DMA mode by using setserial;
25however, most multiport cards don't support DMA.
26
27The latest version of setserial allows the enhanced configuration of the ESP
28card to be viewed and modified.
29***
30
31This package contains the files needed to compile a module to support the Hayes
32ESP card. The drivers are basically a modified version of the serial drivers.
33
34Features:
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
43If the driver is compiled as a module, the IRQs to use can be specified by
44using the irq= option. The format is:
45
46irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380]
47
48The address in brackets is the base address of the card. The IRQ of
49nonexistent cards can be set to 0. If an IRQ of a card that does exist is set
50to 0, the driver will attempt to guess at the correct IRQ. For example, to set
51the IRQ of the card at address 0x300 to 12, the insmod command would be:
52
53insmod esp irq=0,0,0,0,0,0,12,0
54
55The custom divisor can be set by using the divisor= option. The format is the
56same as for the irq= option. Each divisor value is a series of hex digits,
57with each digit representing the divisor to use for a corresponding port. The
58divisor value is constructed RIGHT TO LEFT. Specifying a nonzero divisor value
59will automatically set the spd_cust flag. To calculate the divisor to use for
60a certain baud rate, divide the port's base baud (generally 921600) by the
61desired rate. For example, to set the divisor of the primary port at 0x300 to
624 and the divisor of the secondary port at 0x308 to 8, the insmod command would
63be:
64
65insmod esp divisor=0,0,0,0,0,0,0x84,0
66
67The dma= option can be used to set the DMA channel. The channel can be either
681 or 3. Specifying any other value will force the driver to use PIO mode.
69For example, to set the DMA channel to 3, the insmod command would be:
70
71insmod esp dma=3
72
73The rx_trigger= and tx_trigger= options can be used to set the FIFO trigger
74levels. They specify when the ESP card should send an interrupt. Larger
75values will decrease the number of interrupts; however, a value too high may
76result in data loss. Valid values are 1 through 1023, with 768 being the
77default. For example, to set the receive trigger level to 512 bytes and the
78transmit trigger level to 700 bytes, the insmod command would be:
79
80insmod esp rx_trigger=512 tx_trigger=700
81
82The flow_off= and flow_on= options can be used to set the hardware flow off/
83flow on levels. The flow on level must be lower than the flow off level, and
84the flow off level should be higher than rx_trigger. Valid values are 1
85through 1023, with 1016 being the default flow off level and 944 being the
86default flow on level. For example, to set the flow off level to 1000 bytes
87and the flow on level to 935 bytes, the insmod command would be:
88
89insmod esp flow_off=1000 flow_on=935
90
91The rx_timeout= option can be used to set the receive timeout value. This
92value indicates how long after receiving the last character that the ESP card
93should wait before signalling an interrupt. Valid values are 0 though 255,
94with 128 being the default. A value too high will increase latency, and a
95value too low will cause unnecessary interrupts. For example, to set the
96receive timeout to 255, the insmod command would be:
97
98insmod esp rx_timeout=255
99
100The pio_threshold= option sets the threshold (in number of characters) for
101using PIO mode instead of DMA mode. For example, if this value is 32,
102transfers of 32 bytes or less will always use PIO mode.
103
104insmod esp pio_threshold=32
105
106Multiple options can be listed on the insmod command line by separating each
107option with a space. For example:
108
109insmod esp dma=3 trigger=512
110
111The esp module can be automatically loaded when needed. To cause this to
112happen, add the following lines to /etc/modprobe.conf (replacing the last line
113with options for your configuration):
114
115alias char-major-57 esp
116alias char-major-58 esp
117options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0
118
119You may also need to run 'depmod -a'.
120
121Devices must be created manually. To create the devices, note the output from
122the module after it is inserted. The output will appear in the location where
123kernel messages usually appear (usually /var/adm/messages). Create two devices
124for each 'tty' mentioned, one with major of 57 and the other with major of 58.
125The minor number should be the same as the tty number reported. The commands
126would be (replace ? with the tty number):
127
128mknod /dev/ttyP? c 57 ?
129mknod /dev/cup? c 58 ?
130
131For example, if the following line appears:
132
133Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port
134
135...two devices should be created:
136
137mknod /dev/ttyP8 c 57 8
138mknod /dev/cup8 c 58 8
139
140You may need to set the permissions on the devices:
141
142chmod 666 /dev/ttyP*
143chmod 666 /dev/cup*
144
145The ESP module and the serial module should not conflict (they can be used at
146the same time). After the ESP module has been loaded the ports on the ESP card
147will no longer be accessible by the serial driver.
148
149If I/O errors are experienced when accessing the port, check for IRQ and DMA
150conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and
151DMAs currently in use).
152
153Enjoy!
154Andrew 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=============================================================================
6Date: 01/21/2008
7
8Content
9
101. Introduction
112. System Requirement
123. 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
204. Utilities
215. Setserial
226. Troubleshooting
23
24-----------------------------------------------------------------------------
251. 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-----------------------------------------------------------------------------
912. 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-----------------------------------------------------------------------------
983. 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-----------------------------------------------------------------------------
4254. 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-----------------------------------------------------------------------------
4595. 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-----------------------------------------------------------------------------
4806. 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
3SDL Communications is now SBS Technologies, and does not have any
4information on these ancient ISA cards on their website.
5
6James 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
12NOTE: English is not my native language.
13 I'm sorry for any mistakes in this text.
14
15Misc. notes for RISCom/8 serial driver, in no particular order :)
16
171) 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
222) The driver partially supports famous 'setserial' program, you can use almost
23 any of its options, excluding port & irq settings.
24
253) 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
284) I consider the current state of the driver as BETA.
29
305) SDL Communications WWW page is http://www.sdlcomm.com.
31
326) You can use the MAKEDEV program to create RISCom/8 /dev/ttyL* entries.
33
347) Minor numbers for first board are 0-7, for second 8-15, etc.
35
3622 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 @@
1Comtrol(tm) RocketPort(R)/RocketModem(TM) Series
2Device Driver for the Linux Operating System
3
4=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
5
6PRODUCT OVERVIEW
7----------------
8
9This driver provides a loadable kernel driver for the Comtrol RocketPort
10and RocketModem PCI boards. These boards provide, 2, 4, 8, 16, or 32
11high-speed serial ports or modems. This driver supports up to a combination
12of four RocketPort or RocketModems boards in one machine simultaneously.
13This file assumes that you are using the RocketPort driver which is
14integrated into the kernel sources.
15
16The driver can also be installed as an external module using the usual
17"make;make install" routine. This external module driver, obtainable
18from the Comtrol website listed below, is useful for updating the driver
19or installing it into kernels which do not have the driver configured
20into them. Installations instructions for the external module
21are in the included README and HW_INSTALL files.
22
23RocketPort ISA and RocketModem II PCI boards currently are only supported by
24this driver in module form.
25
26The RocketPort ISA board requires I/O ports to be configured by the DIP
27switches on the board. See the section "ISA Rocketport Boards" below for
28information on how to set the DIP switches.
29
30You pass the I/O port to the driver using the following module parameters:
31
32board1 : I/O port for the first ISA board
33board2 : I/O port for the second ISA board
34board3 : I/O port for the third ISA board
35board4 : I/O port for the fourth ISA board
36
37There is a set of utilities and scripts provided with the external driver
38( downloadable from http://www.comtrol.com ) that ease the configuration and
39setup of the ISA cards.
40
41The RocketModem II PCI boards require firmware to be loaded into the card
42before it will function. The driver has only been tested as a module for this
43board.
44
45=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
46
47INSTALLATION PROCEDURES
48-----------------------
49
50RocketPort/RocketModem PCI cards require no driver configuration, they are
51automatically detected and configured.
52
53The RocketPort driver can be installed as a module (recommended) or built
54into the kernel. This is selected, as for other drivers, through the `make config`
55command from the root of the Linux source tree during the kernel build process.
56
57The RocketPort/RocketModem serial ports installed by this driver are assigned
58device major number 46, and will be named /dev/ttyRx, where x is the port number
59starting at zero (ex. /dev/ttyR0, /devttyR1, ...). If you have multiple cards
60installed in the system, the mapping of port names to serial ports is displayed
61in the system log at /var/log/messages.
62
63If installed as a module, the module must be loaded. This can be done
64manually by entering "modprobe rocket". To have the module loaded automatically
65upon system boot, edit the /etc/modprobe.conf file and add the line
66"alias char-major-46 rocket".
67
68In order to use the ports, their device names (nodes) must be created with mknod.
69This is only required once, the system will retain the names once created. To
70create 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
77The Linux script MAKEDEV will create the first 16 ttyRx device names (nodes)
78for you:
79
80>/dev/MAKEDEV ttyR
81
82=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
83
84ISA Rocketport Boards
85---------------------
86
87You must assign and configure the I/O addresses used by the ISA Rocketport
88card before installing and using it. This is done by setting a set of DIP
89switches on the Rocketport board.
90
91
92SETTING THE I/O ADDRESS
93-----------------------
94
95Before installing RocketPort(R) or RocketPort RA boards, you must find
96a range of I/O addresses for it to use. The first RocketPort card
97requires a 68-byte contiguous block of I/O addresses, starting at one
98of the following: 0x100h, 0x140h, 0x180h, 0x200h, 0x240h, 0x280h,
990x300h, 0x340h, 0x380h. This I/O address must be reflected in the DIP
100switches of *all* of the Rocketport cards.
101
102The second, third, and fourth RocketPort cards require a 64-byte
103contiguous block of I/O addresses, starting at one of the following
104I/O addresses: 0x100h, 0x140h, 0x180h, 0x1C0h, 0x200h, 0x240h, 0x280h,
1050x2C0h, 0x300h, 0x340h, 0x380h, 0x3C0h. The I/O address used by the
106second, third, and fourth Rocketport cards (if present) are set via
107software control. The DIP switch settings for the I/O address must be
108set to the value of the first Rocketport cards.
109
110In order to distinguish each of the card from the others, each card
111must have a unique board ID set on the dip switches. The first
112Rocketport board must be set with the DIP switches corresponding to
113the first board, the second board must be set with the DIP switches
114corresponding to the second board, etc. IMPORTANT: The board ID is
115the only place where the DIP switch settings should differ between the
116various Rocketport boards in a system.
117
118The I/O address range used by any of the RocketPort cards must not
119conflict with any other cards in the system, including other
120RocketPort cards. Below, you will find a list of commonly used I/O
121address ranges which may be in use by other devices in your system.
122On a Linux system, "cat /proc/ioports" will also be helpful in
123identifying what I/O addresses are being used by devices on your
124system.
125
126Remember, the FIRST RocketPort uses 68 I/O addresses. So, if you set it
127for 0x100, it will occupy 0x100 to 0x143. This would mean that you
128CAN NOT set the second, third or fourth board for address 0x140 since
129the first 4 bytes of that range are used by the first board. You would
130need to set the second, third, or fourth board to one of the next available
131blocks such as 0x180.
132
133=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
134
135RocketPort 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
143DIP Switches DIP Switches
1447 8 6 5
145=================== ===================
146On 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
151DIP Switches I/O Address Range
1524 3 2 1 Used by the First Card
153=====================================
154On Off On Off 100-143
155On Off Off On 140-183
156On Off Off Off 180-1C3 <==== Default
157Off On On Off 200-243
158Off On Off On 240-283
159Off On Off Off 280-2C3
160Off Off On Off 300-343
161Off Off Off On 340-383
162Off Off Off Off 380-3C3
163
164=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
165
166REPORTING BUGS
167--------------
168
169For technical support, please provide the following
170information: Driver version, kernel release, distribution of
171kernel, and type of board you are using. Error messages and log
172printouts port configuration details are especially helpful.
173
174USA
175 Phone: (612) 494-4100
176 FAX: (612) 494-4199
177 email: support@comtrol.com
178
179Comtrol Europe
180 Phone: +44 (0) 1 869 323-220
181 FAX: +44 (0) 1 869 323-211
182 email: support@comtrol.co.uk
183
184Web: http://www.comtrol.com
185FTP: 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
41Intro
42=====
43
44
45This file contains some random information, that I like to have online
46instead of in a manual that can get lost. Ever misplace your Linux
47kernel sources? And the manual of one of the boards in your computer?
48
49
50Addresses and interrupts
51========================
52
53Address dip switch settings:
54The 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
68Base address 0x100 caused a conflict in one of my computers once. I
69haven't the foggiest why. My Specialix card is now at 0x180. My
70other computer runs just fine with the Specialix card at 0x100....
71The card occupies 4 addresses, but actually only two are really used.
72
73The PCI version doesn't have any dip switches. The BIOS assigns
74an IO address.
75
76The driver now still autoprobes at 0x100, 0x180, 0x250 and 0x260. If
77that causes trouble for you, please report that. I'll remove
78autoprobing then.
79
80The driver will tell the card what IRQ to use, so you don't have to
81change any jumpers to change the IRQ. Just use a command line
82argument (irq=xx) to the insmod program to set the interrupt.
83
84The BIOS assigns the IRQ on the PCI version. You have no say in what
85IRQ to use in that case.
86
87If your specialix cards are not at the default locations, you can use
88the kernel command line argument "specialix=io0,irq0,io1,irq1...".
89Here "io0" is the io address for the first card, and "irq0" is the
90irq line that the first card should use. And so on.
91
92Examples.
93
94You use the driver as a module and have three cards at 0x100, 0x250
95and 0x180. And some way or another you want them detected in that
96order. 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
100The same three cards, but now in the kernel would require you to
101add
102
103 specialix=0x100,9,0x250,11,0x180,15
104
105to the command line. This would become
106
107 append="specialix=0x100,9,0x250,11,0x180,15"
108
109in your /etc/lilo.conf file if you use lilo.
110
111The Specialix driver is slightly odd: It allows you to have the second
112or third card detected without having a first card. This has
113advantages and disadvantages. A slot that isn't filled by an ISA card,
114might be filled if a PCI card is detected. Thus if you have an ISA
115card at 0x250 and a PCI card, you would get:
116
117sx0: specialix IO8+ Board at 0x100 not found.
118sx1: specialix IO8+ Board at 0x180 not found.
119sx2: specialix IO8+ board detected at 0x250, IRQ 12, CD1865 Rev. B.
120sx3: specialix IO8+ Board at 0x260 not found.
121sx0: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B.
122
123This would happen if you don't give any probe hints to the driver.
124If you would specify:
125
126 specialix=0x250,11
127
128you'd get the following messages:
129
130sx0: specialix IO8+ board detected at 0x250, IRQ 11, CD1865 Rev. B.
131sx1: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B.
132
133ISA probing is aborted after the IO address you gave is exhausted, and
134the PCI card is now detected as the second card. The ISA card is now
135also forced to IRQ11....
136
137
138Baud rates
139==========
140
141The rev 1.2 and below boards use a CL-CD1864. These chips can only
142do 64kbit. The rev 1.3 and newer boards use a CL-CD1865. These chips
143are officially capable of 115k2.
144
145The Specialix card uses a 25MHz crystal (in times two mode, which in
146fact is a divided by two mode). This is not enough to reach the rated
147115k2 on all ports at the same time. With this clock rate you can only
148do 37% of this rate. This means that at 115k2 on all ports you are
149going to lose characters (The chip cannot handle that many incoming
150bits at this clock rate.) (Yes, you read that correctly: there is a
151limit to the number of -=bits=- per second that the chip can handle.)
152
153If you near the "limit" you will first start to see a graceful
154degradation in that the chip cannot keep the transmitter busy at all
155times. However with a central clock this slow, you can also get it to
156miss incoming characters. The driver will print a warning message when
157you are outside the official specs. The messages usually show up in
158the file /var/log/messages .
159
160The specialix card cannot reliably do 115k2. If you use it, you have
161to do "extensive testing" (*) to verify if it actually works.
162
163When "mgetty" communicates with my modem at 115k2 it reports:
164got: +++[0d]ATQ0V1H0[0d][0d][8a]O[cb][0d][8a]
165 ^^^^ ^^^^ ^^^^
166
167The three characters that have the "^^^" under them have suffered a
168bit error in the highest bit. In conclusion: I've tested it, and found
169that it simply DOESN'T work for me. I also suspect that this is also
170caused by the baud rate being just a little bit out of tune.
171
172I upgraded the crystal to 66Mhz on one of my Specialix cards. Works
173great! Contact me for details. (Voids warranty, requires a steady hand
174and more such restrictions....)
175
176
177(*) Cirrus logic CD1864 databook, page 40.
178
179
180Cables for the Specialix IO8+
181=============================
182
183The 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
270Hardware handshaking issues.
271============================
272
273The driver can be told to operate in two different ways. The default
274behaviour is specialix.sx_rtscts = 0 where the pin behaves as DTR when
275hardware handshaking is off. It behaves as the RTS hardware
276handshaking signal when hardware handshaking is selected.
277
278When you use this, you have to use the appropriate cable. The
279cable will either be compatible with hardware handshaking or with
280software handshaking. So switching on the fly is not really an
281option.
282
283I actually prefer to use the "specialix.sx_rtscts=1" option.
284This makes the DTR/RTS pin always an RTS pin, and ioctls to
285change DTR are always ignored. I have a cable that is configured
286for this.
287
288
289Ports and devices
290=================
291
292Port 0 is the one furthest from the card-edge connector.
293
294Devices:
295
296You should make the devices as follows:
297
298bash
299cd /dev
300for 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
302do
303 echo -n "$i "
304 mknod /dev/ttyW$i c 75 $i
305 mknod /dev/cuw$i c 76 $i
306done
307echo ""
308
309If your system doesn't come with these devices preinstalled, bug your
310linux-vendor about this. They have had ample time to get this
311implemented by now.
312
313You cannot have more than 4 boards in one computer. The card only
314supports 4 different interrupts. If you really want this, contact me
315about this and I'll give you a few tips (requires soldering iron)....
316
317If you have enough PCI slots, you can probably use more than 4 PCI
318versions of the card though....
319
320The PCI version of the card cannot adhere to the mechanical part of
321the PCI spec because the 8 serial connectors are simply too large. If
322it 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
2technologies, is not active in driver maintenance, and they have no information
3on when or if they will have a 2.6 driver.
4
5James Nelson <james4765@gmail.com> - 12-12-2004
6
7Stallion Multiport Serial Driver Readme
8---------------------------------------
9
10Copyright (C) 1994-1999, Stallion Technologies.
11
12Version: 5.5.1
13Date: 28MAR99
14
15
16
171. INTRODUCTION
18
19There are two drivers that work with the different families of Stallion
20multiport serial boards. One is for the Stallion smart boards - that is
21EasyIO, EasyConnection 8/32 and EasyConnection 8/64-PCI, the other for
22the true Stallion intelligent multiport boards - EasyConnection 8/64
23(ISA, EISA, MCA), EasyConnection/RA-PCI, ONboard and Brumby.
24
25If you are using any of the Stallion intelligent multiport boards (Brumby,
26ONboard, EasyConnection 8/64 (ISA, EISA, MCA), EasyConnection/RA-PCI) with
27Linux you will need to get the driver utility package. This contains a
28firmware loader and the firmware images necessary to make the devices operate.
29
30The Stallion Technologies ftp site, ftp.stallion.com, will always have
31the latest version of the driver utility package.
32
33ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz
34
35As of the printing of this document the latest version of the driver
36utility package is 5.5.0. If a later version is now available then you
37should use the latest version.
38
39If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI
40boards then you don't need this package, although it does have a serial stats
41display program.
42
43If you require DIP switch settings, EISA or MCA configuration files, or any
44other information related to Stallion boards then have a look at Stallion's
45web pages at http://www.stallion.com.
46
47
48
492. INSTALLATION
50
51The drivers can be used as loadable modules or compiled into the kernel.
52You can choose which when doing a "config" on the kernel.
53
54All ISA, EISA and MCA boards that you want to use need to be configured into
55the driver(s). All PCI boards will be automatically detected when you load
56the driver - so they do not need to be entered into the driver(s)
57configuration structure. Note that kernel PCI support is required to use PCI
58boards.
59
60There are two methods of configuring ISA, EISA and MCA boards into the drivers.
61If using the driver as a loadable module then the simplest method is to pass
62the driver configuration as module arguments. The other method is to modify
63the driver source to add configuration lines for each board in use.
64
65If you have pre-built Stallion driver modules then the module argument
66configuration method should be used. A lot of Linux distributions come with
67pre-built driver modules in /lib/modules/X.Y.Z/misc for the kernel in use.
68That makes things pretty simple to get going.
69
70
712.1 MODULE DRIVER CONFIGURATION:
72
73The simplest configuration for modules is to use the module load arguments
74to configure any ISA, EISA or MCA boards. PCI boards are automatically
75detected, so do not need any additional configuration at all.
76
77If using EasyIO, EasyConnection 8/32 ISA or MCA, or EasyConnection 8/63-PCI
78boards then use the "stallion" driver module, Otherwise if you are using
79an EasyConnection 8/64 ISA, EISA or MCA, EasyConnection/RA-PCI, ONboard,
80Brumby or original Stallion board then use the "istallion" driver module.
81
82Typically to load up the smart board driver use:
83
84 modprobe stallion
85
86This will load the EasyIO and EasyConnection 8/32 driver. It will output a
87message to say that it loaded and print the driver version number. It will
88also print out whether it found the configured boards or not. These messages
89may 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
91syslogd daemons are setup on your system.
92
93To load the intelligent board driver use:
94
95 modprobe istallion
96
97It will output similar messages to the smart board driver.
98
99If not using an auto-detectable board type (that is a PCI board) then you
100will also need to supply command line arguments to the modprobe command
101when loading the driver. The general form of the configuration argument is
102
103 board?=<name>[,<ioaddr>[,<addr>][,<irq>]]
104
105where:
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
123Up to 4 board configuration arguments can be specified on the load line.
124Here is some examples:
125
126 modprobe stallion board0=easyio,0x2a0,5
127
128This 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
132This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at
133memory address 0xcc000.
134
135 modprobe stallion board1=ec8/32-at,0x2a0,0x280,10
136
137This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0,
138secondary address 0x280 and IRQ 10.
139
140You will probably want to enter this module load and configuration information
141into your system startup scripts so that the drivers are loaded and configured
142on each system boot. Typically the start up script would be something like
143/etc/modprobe.conf.
144
145
1462.2 STATIC DRIVER CONFIGURATION:
147
148For static driver configuration you need to modify the driver source code.
149Entering ISA, EISA and MCA boards into the driver(s) configuration structure
150involves editing the driver(s) source file. It's pretty easy if you follow
151the instructions below. Both drivers can support up to 4 boards. The smart
152card driver (the stallion.c driver) supports any combination of EasyIO and
153EasyConnection 8/32 boards (up to a total of 4). The intelligent driver
154supports any combination of ONboards, Brumbys, Stallions and EasyConnection
1558/64 (ISA and EISA) boards (up to a total of 4).
156
157To set up the driver(s) for the boards that you want to use you need to
158edit the appropriate driver file and add configuration entries.
159
160If 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
168If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA)
169boards,
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
177Once you have set up the board configurations then you are ready to build
178the kernel or modules.
179
180When the new kernel is booted, or the loadable module loaded then the
181driver will emit some kernel trace messages about whether the configured
182boards were detected or not. Depending on how your system logger is set
183up 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
185confirm that all is well.
186
187
1882.3 SHARING INTERRUPTS
189
190It is possible to share interrupts between multiple EasyIO and
191EasyConnection 8/32 boards in an EISA system. To do this you must be using
192static driver configuration, modifying the driver source code to add driver
193configuration. Then a couple of extra things are required:
194
1951. 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
2042. 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
215You must complete both the above steps for this to work. When you reboot
216or load the driver your EasyIO and EasyConnection 8/32 boards will be
217sharing interrupts.
218
219
2202.4 USING HIGH SHARED MEMORY
221
222The EasyConnection 8/64-EI, ONboard and Stallion boards are capable of
223using shared memory addresses above the usual 640K - 1Mb range. The ONboard
224ISA and the Stallion boards can be programmed to use memory addresses up to
22516Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI and
226ONboard/E can be programmed for memory addresses up to 4Gb (the EISA bus
227addressing limit).
228
229The higher than 1Mb memory addresses are fully supported by this driver.
230Just enter the address as you normally would for a lower than 1Mb address
231(in the driver's board configuration structure).
232
233
234
2352.5 TROUBLE SHOOTING
236
237If a board is not found by the driver but is actually in the system then the
238most likely problem is that the I/O address is wrong. Change the module load
239argument for the loadable module form. Or change it in the driver stallion.c
240or istallion.c configuration structure and rebuild the kernel or modules, or
241change it on the board.
242
243On EasyIO and EasyConnection 8/32 boards the IRQ is software programmable, so
244if there is a conflict you may need to change the IRQ used for a board. There
245are 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
247ONboard boards is software programmable, but not on the Brumby boards.
248
249
250
2513. USING THE DRIVERS
252
2533.1 INTELLIGENT DRIVER OPERATION
254
255The intelligent boards also need to have their "firmware" code downloaded
256to them. This is done via a user level application supplied in the driver
257utility package called "stlload". Compile this program wherever you dropped
258the package files, by typing "make". In its simplest form you can then type
259
260 ./stlload -i cdk.sys
261
262in this directory and that will download board 0 (assuming board 0 is an
263EasyConnection 8/64 or EasyConnection/RA board). To download to an
264ONboard, Brumby or Stallion do:
265
266 ./stlload -i 2681.sys
267
268Normally you would want all boards to be downloaded as part of the standard
269system 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
271the "-b <brd-number>" option to the line. You will need to download code for
272every board. You should probably move the stlload program into a system
273directory, such as /usr/sbin. Also, the default location of the cdk.sys image
274file in the stlload down-loader is /usr/lib/stallion. Create that directory
275and put the cdk.sys and 2681.sys files in it. (It's a convenient place to put
276them anyway). As an example your /etc/rc.d/rc.S file might have the
277following 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
283The image files cdk.sys and 2681.sys are specific to the board types. The
284cdk.sys will only function correctly on an EasyConnection 8/64 board. Similarly
285the 2681.sys image fill only operate on ONboard, Brumby and Stallion boards.
286If you load the wrong image file into a board it will fail to start up, and
287of course the ports will not be operational!
288
289If you are using the modularized version of the driver you might want to put
290the modprobe calls in the startup script as well (before the download lines
291obviously).
292
293
2943.2 USING THE SERIAL PORTS
295
296Once the driver is installed you will need to setup some device nodes to
297access the serial ports. The simplest method is to use the /dev/MAKEDEV program.
298It will automatically create device entries for Stallion boards. This will
299create the normal serial port devices as /dev/ttyE# where# is the port number
300starting from 0. A bank of 64 minor device numbers is allocated to each board,
301so the first port on the second board is port 64,etc. A set of callout type
302devices may also be created. They are created as the devices /dev/cue# where #
303is the same as for the ttyE devices.
304
305For the most part the Stallion driver tries to emulate the standard PC system
306COM ports and the standard Linux serial driver. The idea is that you should
307be able to use Stallion board ports and COM ports interchangeably without
308modifying anything but the device name. Anything that doesn't work like that
309should be considered a bug in this driver!
310
311If you look at the driver code you will notice that it is fairly closely
312based on the Linux serial driver (linux/drivers/char/serial.c). This is
313intentional, obviously this is the easiest way to emulate its behavior!
314
315Since this driver tries to emulate the standard serial ports as much as
316possible, most system utilities should work as they do for the standard
317COM ports. Most importantly "stty" works as expected and "setserial" can
318also be used (excepting the ability to auto-configure the I/O and IRQ
319addresses of boards). Higher baud rates are supported in the usual fashion
320through setserial or using the CBAUDEX extensions. Note that the EasyIO and
321EasyConnection (all types) support at least 57600 and 115200 baud. The newer
322EasyConnection XP modules and new EasyIO boards support 230400 and 460800
323baud as well. The older boards including ONboard and Brumby support a
324maximum baud rate of 38400.
325
326If you are unfamiliar with how to use serial ports, then get the Serial-HOWTO
327by Greg Hankins. It will explain everything you need to know!
328
329
330
3314. NOTES
332
333You can use both drivers at once if you have a mix of board types installed
334in a system. However to do this you will need to change the major numbers
335used by one of the drivers. Currently both drivers use major numbers 24, 25
336and 28 for their devices. Change one driver to use some other major numbers,
337and then modify the mkdevnods script to make device nodes based on those new
338major numbers. For example, you could change the istallion.c driver to use
339major numbers 60, 61 and 62. You will also need to create device nodes with
340different names for the ports, for example ttyF# and cuf#.
341
342The original Stallion board is no longer supported by Stallion Technologies.
343Although it is known to work with the istallion driver.
344
345Finding a free physical memory address range can be a problem. The older
346boards like the Stallion and ONboard need large areas (64K or even 128K), so
347they can be very difficult to get into a system. If you have 16 Mb of RAM
348then you have no choice but to put them somewhere in the 640K -> 1Mb range.
349ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on some
350systems. If you have an original Stallion board, "V4.0" or Rev.O, then you
351need a 64K memory address space, so again 0xd0000 and 0xe0000 are good.
352Older Stallion boards are a much bigger problem. They need 128K of address
353space and must be on a 128K boundary. If you don't have a VGA card then
3540xc0000 might be usable - there is really no other place you can put them
355below 1Mb.
356
357Both the ONboard and old Stallion boards can use higher memory addresses as
358well, but you must have less than 16Mb of RAM to be able to use them. Usual
359high memory addresses used include 0xec0000 and 0xf00000.
360
361The Brumby boards only require 16Kb of address space, so you can usually
362squeeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or in
363the 0xd0000 range. EasyConnection 8/64 boards are even better, they only
364require 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000
365are good.
366
367If you are using an EasyConnection 8/64-EI or ONboard/E then usually the
3680xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither of
369them can be used then the high memory support to use the really high address
370ranges is the best option. Typically the 2Gb range is convenient for them,
371and gets them well out of the way.
372
373The ports of the EasyIO-8M board do not have DCD or DTR signals. So these
374ports cannot be used as real modem devices. Generally, when using these
375ports you should only use the cueX devices.
376
377The driver utility package contains a couple of very useful programs. One
378is a serial port statistics collection and display program - very handy
379for solving serial port problems. The other is an extended option setting
380program that works with the intelligent boards.
381
382
383
3845. DISCLAIMER
385
386The information contained in this document is believed to be accurate and
387reliable. However, no responsibility is assumed by Stallion Technologies
388Pty. Ltd. for its use, nor any infringements of patents or other rights
389of third parties resulting from its use. Stallion Technologies reserves
390the right to modify the design of its products and will endeavour to change
391the 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
45Introduction
46============
47
48This file contains some random information, that I like to have online
49instead of in a manual that can get lost. Ever misplace your Linux
50kernel sources? And the manual of one of the boards in your computer?
51
52
53Theory of operation
54===================
55
56An important thing to know is that the driver itself doesn't have the
57firmware 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
62The firmware load needs a "misc" device, so you'll need to enable the
63"Support for user misc device modules" in your kernel configuration.
64The misc device needs to be called "/dev/specialix_sxctl". It needs
65misc major 10, and minor number 167 (assigned by HPA). The section
66on creating device files below also creates this device.
67
68After loading the sx.o module into your kernel, the driver will report
69the number of cards detected, but because it doesn't have any
70firmware, it will not be able to determine the number of ports. Only
71when you then run "sx_firmware" will the firmware be downloaded and
72the rest of the driver initialized. At that time the sx_firmware
73program will report the number of ports installed.
74
75In contrast with many other multi port serial cards, some of the data
76structures are only allocated when the card knows the number of ports
77that are connected. This means we won't waste memory for 120 port
78descriptor structures when you only have 8 ports. If you experience
79problems due to this, please report them: I haven't seen any.
80
81
82Interrupts
83==========
84
85A multi port serial card, would generate a horrendous amount of
86interrupts if it would interrupt the CPU for every received
87character. Even more than 10 years ago, the trick not to use
88interrupts but to poll the serial cards was invented.
89
90The SX card allow us to do this two ways. First the card limits its
91own interrupt rate to a rate that won't overwhelm the CPU. Secondly,
92we could forget about the cards interrupt completely and use the
93internal timer for this purpose.
94
95Polling the card can take up to a few percent of your CPU. Using the
96interrupts would be better if you have most of the ports idle. Using
97timer-based polling is better if your card almost always has work to
98do. You save the separate interrupt in that case.
99
100In any case, it doesn't really matter all that much.
101
102The most common problem with interrupts is that for ISA cards in a PCI
103system the BIOS has to be told to configure that interrupt as "legacy
104ISA". Otherwise the card can pull on the interrupt line all it wants
105but the CPU won't see this.
106
107If you can't get the interrupt to work, remember that polling mode is
108more efficient (provided you actually use the card intensively).
109
110
111Allowed Configurations
112======================
113
114Some configurations are disallowed. Even though at a glance they might
115seem to work, they are known to lockup the bus between the host card
116and the device concentrators. You should respect the drivers decision
117not to support certain configurations. It's there for a reason.
118
119Warning: Seriously technical stuff ahead. Executive summary: Don't use
120SX cards except configured at a 64k boundary. Skip the next paragraph.
121
122The SX cards can theoretically be placed at a 32k boundary. So for
123instance you can put an SX card at 0xc8000-0xd7fff. This is not a
124"recommended configuration". ISA cards have to tell the bus controller
125how they like their timing. Due to timing issues they have to do this
126based on which 64k window the address falls into. This means that the
12732k window below and above the SX card have to use exactly the same
128timing as the SX card. That reportedly works for other SX cards. But
129you're still left with two useless 32k windows that should not be used
130by anybody else.
131
132
133Configuring the driver
134======================
135
136PCI cards are always detected. The driver auto-probes for ISA cards at
137some sensible addresses. Please report if the auto-probe causes trouble
138in your system, or when a card isn't detected.
139
140I'm afraid I haven't implemented "kernel command line parameters" yet.
141This means that if the default doesn't work for you, you shouldn't use
142the compiled-into-the-kernel version of the driver. Use a module
143instead. If you convince me that you need this, I'll make it for
144you. Deal?
145
146I'm afraid that the module parameters are a bit clumsy. If you have a
147better idea, please tell me.
148
149You 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
192Baud rates
193==========
194
195Theoretically new SXDCs should be capable of more than 460k
196baud. However the line drivers usually give up before that. Also the
197CPU on the card may not be able to handle 8 channels going at full
198blast at that speed. Moreover, the buffers are not large enough to
199allow operation with 100 interrupts per second. You'll have to realize
200that the card has a 256 byte buffer, so you'll have to increase the
201number of interrupts per second if you have more than 256*100 bytes
202per second to transmit. If you do any performance testing in this
203area, I'd be glad to hear from you...
204
205(Psst Linux users..... I think the Linux driver is more efficient than
206the driver for other OSes. If you can and want to benchmark them
207against each other, be my guest, and report your findings...... :-)
208
209
210Ports and devices
211=================
212
213Port 0 is the top connector on the module closest to the host
214card. Oh, the ports on the SXDCs and TAs are labelled from 1 to 8
215instead of from 0 to 7, as they are numbered by linux. I'm stubborn in
216this: I know for sure that I wouldn't be able to calculate which port
217is which anymore if I would change that....
218
219
220Devices:
221
222You 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)
226cd /dev
227t=0
228mknod specialix_sxctl c 10 167
229while [ $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`
235done
236echo ""
237rm /etc/psdevtab
238ps > /dev/null
239
240
241This creates 64 devices. If you have more, increase the constant on
242the line with "while". The devices start at 0, as is customary on
243Linux. Specialix seems to like starting the numbering at 1.
244
245If your system doesn't come with these devices pre-installed, bug your
246linux-vendor about this. They should have these devices
247"pre-installed" before the new millennium. The "ps" stuff at the end
248is to "tell" ps that the new devices exist.
249
250Officially the maximum number of cards per computer is 4. This driver
251however supports as many cards in one machine as you want. You'll run
252out of interrupts after a few, but you can switch to polled operation
253then. At about 256 ports (More than 8 cards), we run out of minor
254device numbers. Sorry. I suggest you buy a second computer.... (Or
255switch 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
4Your guide to the ancient and twisted locking policies of the tty layer and
5the warped logic behind them. Beware all ye who read on.
6
7FIXME: still need to work out the full set of BKL assumptions and document
8them so they can eventually be killed off.
9
10
11Line Discipline
12---------------
13
14Line disciplines are registered with tty_register_ldisc() passing the
15discipline number and the ldisc structure. At the point of registration the
16discipline must be ready to use and it is possible it will get used before
17the call returns success. If the call returns an error then it won't get
18called. Do not re-use ldisc numbers as they are part of the userspace ABI
19and writing over an existing ldisc will cause demons to eat your computer.
20After the return the ldisc data has been copied so you may free your own
21copy of the structure. You must not re-register over the top of the line
22discipline even with the same data or your computer again will be eaten by
23demons.
24
25In order to remove a line discipline call tty_unregister_ldisc().
26In ancient times this always worked. In modern times the function will
27return -EBUSY if the ldisc is currently in use. Since the ldisc referencing
28code manages the module counts this should not usually be a concern.
29
30Heed this warning: the reference count field of the registered copies of the
31tty_ldisc structure in the ldisc table counts the number of lines using this
32discipline. The reference count of the tty_ldisc structure within a tty
33counts the number of active users of the ldisc at this instant. In effect it
34counts the number of threads of execution within an ldisc method (plus those
35about to enter and exit although this detail matters not).
36
37Line Discipline Methods
38-----------------------
39
40TTY side interfaces:
41
42open() - 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
47close() - 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
52hangup() - 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
57write() - 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
61flush_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
65chars_in_buffer() - (optional) Report the number of bytes in the input
66 buffer.
67
68set_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
74read() - 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
79poll() - Check the status for the poll/select calls. Multiple
80 poll calls may occur in parallel. May sleep.
81
82ioctl() - 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
86Driver Side Interfaces:
87
88receive_buf() - Hand buffers of bytes from the driver to the ldisc
89 for processing. Semantics currently rather
90 mysterious 8(
91
92write_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
104Driver Access
105
106Line discipline methods can call the following methods of the underlying
107hardware driver through the function pointers within the tty->driver
108structure:
109
110write() 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
115put_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
119flush_chars() (Optional) If defined, must be called after
120 queueing characters with put_char() in order to
121 start transmission.
122
123write_room() Returns the numbers of characters the tty driver
124 will accept for queueing to be written.
125
126ioctl() Invoke device specific ioctl.
127 Expects data pointers to refer to userspace.
128 Returns ENOIOCTLCMD for unrecognized ioctl numbers.
129
130set_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
143throttle() 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
148unthrottle() 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
152stop() Ask the tty driver to stop outputting characters
153 to the tty device.
154
155start() Ask the tty driver to resume sending characters
156 to the tty device.
157
158hangup() Ask the tty driver to hang up the tty device.
159
160break_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
167wait_until_sent() Waits until the device has written out all of the
168 characters in its transmitter FIFO.
169
170send_xchar() Send a high-priority XON/XOFF character to the device.
171
172
173Flags
174
175Line discipline methods have access to tty->flags field containing the
176following interesting flags:
177
178TTY_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
182TTY_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
187TTY_IO_ERROR If set, causes all subsequent userspace read/write
188 calls on the tty to fail, returning -EIO.
189
190TTY_OTHER_CLOSED Device is a pty and the other side has closed.
191
192TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into
193 smaller chunks.
194
195
196Locking
197
198Callers to the line discipline functions from the tty layer are required to
199take line discipline locks. The same is true of calls from the driver side
200but not yet enforced.
201
202Three calls are now provided
203
204 ldisc = tty_ldisc_ref(tty);
205
206takes a handle to the line discipline in the tty and returns it. If no ldisc
207is currently attached or the ldisc is being closed and re-opened at this
208point then NULL is returned. While this handle is held the ldisc will not
209change or go away.
210
211 tty_ldisc_deref(ldisc)
212
213Returns the ldisc reference and allows the ldisc to be closed. Returning the
214reference takes away your right to call the ldisc functions until you take
215a new reference.
216
217 ldisc = tty_ldisc_ref_wait(tty);
218
219Performs the same function as tty_ldisc_ref except that it will wait for an
220ldisc change to complete and then return a reference to the new ldisc.
221
222While these functions are slightly slower than the old code they should have
223minimal impact as most receive logic uses the flip buffers and they only
224need to take a reference when they push bits up through the driver.
225
226A caution: The ldisc->open(), ldisc->close() and driver->set_ldisc
227functions are called with the ldisc unavailable. Thus tty_ldisc_ref will
228fail in this situation if used within these functions. Ldisc and driver
229code calling its own functions must be careful in this case.
230
231
232Driver Interface
233----------------
234
235open() - Called when a device is opened. May sleep
236
237close() - 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
241write() - 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
246put_char() - Stuff a single character onto the queue. The
247 driver is guaranteed following up calls to
248 flush_chars.
249
250flush_chars() - Ask the kernel to write put_char queue
251
252write_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
257ioctl() - Called when an ioctl may be for the driver
258
259set_termios() - Called on termios change, serialized against
260 itself by a semaphore. May sleep.
261
262set_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
266throttle() - 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
270unthrottle() - Called by the ldisc to ask the driver to stop flow
271 control.
272
273stop() - Ldisc notifier to the driver to stop output. As with
274 throttle the serializations with start() are down
275 to the ldisc layer.
276
277start() - Ldisc notifier to the driver to start output.
278
279hangup() - Ask the tty driver to cause a hangup initiated
280 from the host side. [Can sleep ??]
281
282break_ctl() - Send RS232 break. Can sleep. Can get called in
283 parallel, driver must serialize (for now), and
284 with write calls.
285
286wait_until_sent() - Wait for characters to exit the hardware queue
287 of the driver. Can sleep
288
289send_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