initial commit with v2.6.9
[linux-2.6.9-moxart.git] / Documentation / digiboard.txt
blob9ccd612b0175f0f4942c965dde40d61a2a99ef18
1 The Linux Digiboard Driver
2 --------------------------
4 The Digiboard Driver for Linux supports the following boards:
6  DigiBoard PC/Xi, PC/Xe, PC/Xeve(which is the newer, smaller Xe with
7  a 8K window which is also known as PC/Xe(8K) and has no memory/irq
8  switches) You can use up to 4 cards with this driver and it should work
9  on other architectures than intel also.
11 A version of this driver has been taken by Digiboard to make a driver
12 software package which supports also PC/Xem cards and newer PCI cards
13 but it doesn't support the old PC/Xi cards and it isn't yet ported to
14 linux-2.1.x and may not be usable on other architectures than intel now.
15 It is available from ftp.digi.com/ftp.digiboard.com. You can write me if
16 you need an patch for this driver.
18 Bernhard Kaindl (bkaindl@netway.at)  6. April 1997.
20 Configuring the Driver
21 ----------------------
23 The driver can be built direct into the kernel or as a module.
24 The pcxx driver can be configured using the command line feature while
25 loading the kernel with LILO or LOADLIN or, if built as a module,
26 with arguments to insmod and modprobe or with parameters in
27 /etc/modprobe.conf for modprobe and kerneld.
29 After configuring the driver you need to create the device special files
30 as described in "Device file creation:" below and set the appropriate
31 permissions for your application.
33 As Module
34 ---------
36 modprobe pcxx io=<io> \
37   membase=<membase> \
38   memsize=<memsize> \
39   numports=<numports>  \
40   altpin=<altpin> \
41   verbose=<verbose>
43 or, if several cards are installed
45 modprobe pcxx io=<io-1>,<io-2>,... \
46   membase=<membase-1>,<membase-2>,... \
47   memsize=<memsize-1>,<memsize-2>,... \
48   numports=<numports-1>,<numports-2>,... \
49   altpin=<altpin-1>,<altpin-2>,... \
50   verbose=<verbose>
52 where <io-N> is the io address of the Nth card and <membase-N> is the
53 memory base address of the Nth card, etc.
55 The parameters can be specified in any order. For example, the numports
56 parameter can precede the membase parameter, or vice versa. If several
57 cards are installed the ordering within the comma separated parameter
58 lists must be consistent, of course.
60 io       - I/O port address of that card.
61 membase  - Memory start address of that card.
62 memsize  - Memory size of that card, in kilobytes. If given, this value
63            is compared against the card to verify configuration and
64            hinder the driver from using a misconfigured card. If the parameter
65            does not match the board it is disabled with a memory size error.
66 numports - Number of ports on this card. This is the number of devices to
67            assign to this card or reserve if disabled.
68 altpin   - 1: swap DCD and DSR for 8-pin RJ-45 with modems.
69            0: don't swap DCD and DSR.
70            other values count as 1.
71 verbose  - 1: give nice verbose output during initialisation of the driver,
72               possibly helpful during board configuration.
73            0: normal terse output.
75 Only the parameters which differ from the defaults need to be specified.
76 If the io= parameter is not given, the default config is used. This is
78   io=0x200 membase=0xD0000 numports=16 altpin=0
80 Only applicable parameters need be specified. For example to configure
81 2 boards, first one at 0x200 with 8 ports, rest defaults, second one at
82 0x120, memory at 0xD80000, altpin enabled, rest defaults, you can do this
83 by using these parameters:
85   modprobe pcxx io=0x200,0x120 numports=8,8 membase=,0xD80000 altpin=,1
87 To disable a temporary unusable board without changing the mapping of the
88 devices following that board, you can empty the io-value for that board:
90   modprobe pcxx io=,0x120 numports=8,8 membase=,0xD80000 altpin=,1
92 The remaining board still uses ttyD8-ttyD15 and cud8-cud15.
94 Example line for /etc/modprobe.conf for use with kerneld and as default
95 parameters for modprobe:
97 options pcxx           io=0x200 numports=8
99 For kmod to work you will likely need to add these two lines to your
100 /etc/modprobe.conf:
102 alias char-major-22    pcxx
103 alias char-major-23    pcxx
106 Boot-time configuration when linked into the kernel
107 ---------------------------------------------------
109 Per board to be configured, pass a digi= command-line parameter to the
110 kernel using lilo or loadlin. It consists of a string of comma separated
111 identifiers or integers.  The 6 values in order are:
113 Card status:      Enable      - use that board
114                   Disable     - don't actually use that board.
116 Card type:        PC/Xi       - the old ones with 64/128/256/512K RAM.
117                   PC/Xe       - PC/Xe(old ones with 64k mem range).
118                   PC/Xeve     - PC/Xe(new ones with 8k mem range).
120 Note: This is for documentation only, the type is detected from the board.
122 Altpin setting:   Enable      - swap DCD and DSR for 8-pin RJ-45 with modems.
123                   Disable     - don't swap DCD and DSR.
125 Number of ports:  1 ... 16    - Number of ports on this card. This is the
126                                 number of devices to assign to this card.
128 I/O port address: eg. 200     - I/O Port address where the card is configured.
130 Memory base addr: eg. 80000   - Memory address where the board's memory starts.
132 This is an example for a line which you can insert into you lilo.conf:
134    append="digi=Enable,PC/Xi,Disable,4,120,D0000"
136 there is an alternate form, in which you must use decimal values only:
138    append="digi=1,0,0,16,512,851968"
140 If you don't give a digi= command line, the compiled-in defaults of
141 board 1: io=0x200, membase=0xd0000, altpin=off and numports=16 are used.
143 If you have the resources (io&mem) free for use, configure your board to
144 these settings and you should be set up fine even if yours has not got 16 
145 ports.
148 Sources of Information
149 ----------------------
151 Please contact digi directly digilnux@dgii.com. Forward any information of
152 general interest to me so that I can include it on the webpage.
154 Web page: http://lameter.com/digi
156 Christoph Lameter (christoph@lameter.com) Aug 14, 2000.
158 Device file creation
159 --------------------
161 Currently the Linux MAKEDEV command does not support generating the Digiboard
162 Devices. 
164 The /dev/cud devices behave like the /dev/cua devices
165 and the ttyD devices are like the /dev/ttyS devices.
167 Use the following script to generate the devices:
169 ------------------ mkdigidev begin
170 #!/bin/sh
172 # Script to create Digiboard Devices
173 # Christoph Lameter, April 16, 1996
175 # Usage:
176 # mkdigidev [<number of devices>]
179 DIGI_MAJOR=23
180 DIGICU_MAJOR=22
182 BOARDS=$1
184 if [ "$BOARDS" = "" ]; then
185 BOARDS=1
188 boardnum=0
189 while [ $boardnum -lt $BOARDS ];
191   for c in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15;
192   do
193         name=`expr $boardnum \* 16 + $c`
194         mknod /dev/cud$name c $DIGICU_MAJOR $name
195         mknod /dev/ttyD$name c $DIGI_MAJOR $name
196   done
197   boardnum=`expr $boardnum + 1`
198 done
199 ------------------ mkdigidev end
201 or apply the following patch to /dev/MAKEDEV and do a 
202 sh /dev/MAKEDEV digi
204 ----- MAKEDEV Patch
205 --- /dev/MAKEDEV        Sun Aug 13 15:48:23 1995
206 +++ MAKEDEV     Tue Apr 16 17:53:27 1996
207 @@ -120,7 +120,7 @@
208         while [ $# -ne 0 ]
209         do
210                 case "$1" in
211 -                       mem|tty|ttyp|cua|cub)   ;;
212 +                       mem|tty|ttyp|cua|cub|cud)       ;;
213                         hd)     echo hda hdb hdc hdd ;;
214                         xd)     echo xda xdb ;;
215                         fd)     echo fd0 fd1 ;;
216 @@ -140,6 +140,7 @@
217                         dcf)            echo dcf ;;
218                         pcmcia) ;; # taken care of by its own driver
219                         ttyC)   echo cyclades ;;
220 +                       ttyD)   echo digi ;;
221                         *)      echo "$0: don't know what \"$1\" is" >&2 ;;
222                 esac
223                 shift
224 @@ -208,6 +209,15 @@
225                 do
226                         makedev ttyC$i c $major1 `expr 32 + $i` $tty
227                         makedev cub$i c $major2 `expr 32 + $i` $dialout
228 +               done
229 +               ;;
230 +       digi)
231 +               major1=`Major ttyD` || continue
232 +               major2=`Major cud` || continue
233 +               for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
234 +               do
235 +                       makedev ttyD$i c $major1 `expr 32 + $i` $tty
236 +                       makedev cud$i c $major2 `expr 32 + $i` $dialout
237                 done
238                 ;;
239         par[0-2])
240 ----- End Makedev patch
242 -----------------------------------------------------------------------------
244 Changes v1.5.5:
246 The ability to use the kernel's command line to pass in the configuration for 
247 boards.  Using LILO's APPEND command, a string of comma separated identifiers 
248 or integers can be used.  The 6 values in order are:
250    Enable/Disable this card,
251    Type of card: PC/Xi(0), PC/Xe(1), PC/Xeve(2), PC/Xem(3)
252    Enable/Disable alternate pin arrangement,
253    Number of ports on this card,
254    I/O Port where card is configured (in HEX if using string identifiers),
255    Base of memory window (in HEX if using string identifiers), 
257 Samples:
258    append="digi=E,PC/Xi,D,16,200,D0000"
259    append="digi=1,0,0,16,512,(whatever D0000 is in base 10 :)
261 Drivers' minor device numbers are conserved. This means that instead of
262 each board getting a block of 16 minors pre-assigned, it gets however
263 many it should, with the next card following directly behind it.  A
264 system with 4 2-port PC/Xi boards will use minor numbers 0-7.
265 This conserves some memory, and removes a few hard coded constants.
267 NOTE!! NOTE!! NOTE!!
268 The definition of PC/Xem as a valid board type is the BEGINNING of support
269 for this device.  The driver does not currently recognise the board, nor
270 does it want to initialize it.  At least not the EISA version.
272 Mike McLagan <mike.mclagan@linux.org> 5, April 1996.