aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/serial/computone.txt
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/computone.txt
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/computone.txt')
-rw-r--r--Documentation/serial/computone.txt522
1 files changed, 522 insertions, 0 deletions
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