URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [drivers/] [char/] [README.stallion] - Rev 1765
Compare with Previous | Blame | View Log
Stallion Multiport Serial Driver Readme---------------------------------------Copyright (C) 1994-1998, Stallion Technologies (support@stallion.com).Version: 5.4.4Date: 20MAR981. INTRODUCTIONThis is a Linux driver for some of the Stallion Technologies range ofmultiport serial boards. There are really two drivers in this package.One is for the Stallion smart boards, the other for the true Stallionintelligent multiport boards.The drivers included in this package are intended as a replacement forthose shipped with Linux kernel versions in the 2.0.X series. For laterversions of the kernel (2.1.0 and above) use the driver source suppliedwith the kernel. The drivers in this package specifically add supportfor the most recent releases of Stallion hardware - which are not supportedin the Stallion drivers supplied in the 2.0.X kernels. The drivers in thispackage do not support kernel versions earlier than 2.0.0.The other utilities supplied in this package can be used with Stalliondrivers on any version of the kernel.If you have any trouble getting Stallion boards to work in Linux systems,please contact Stallion Technologies support department via email or phone.Contact information for Stallion Technologies offices is included in thefile "Offices" contained in this distribution.Please note the disclaimers set out in the GNU general public licenseincluded with this driver package.All host driver source is included in this package, and is copyrighted underthe GNU GPL. The board "firmware" code in this package is copyright StallionTechnologies (the files cdk.sys and 2681.sys).1.1 SMART MULTIPORT BOARD DRIVERThis driver supports the EasyIO and EasyConnection 8/32 range of boards.These boards are not classic intelligent multiport boards, but are hostbased multiport boards that use Cirrus Logic CL-CD1400 UART's, or onnewer versions of the hardware use the Signetics 26C198 UART. Both ofthese are high performance UART's with built in FIFO's, automatic flowcontrol and a host of other features.The EasyIO range of cards comes in 4 forms, the EasyIO-4, EasyIO-8,EasyIO-8M and EasyIO-8-PCI. The first three are ISA based boards whilethe last is a PCI bus board. All of these are non-expandable, low cost,multiport boards with 4 or 8 RS-232C ports. Each ISA EasyIO board requires 8bytes of I/O address space and 1 interrupt. The PCI EasyIO board uses 64bytes of I/O address space and 1 interrupt. On EISA and PCI systems it ispossible to share 1 interrupt between multiple boards. The EasyIO-4 has 10pin RJ connectors, and the EasyIO-8 comes with a dongle cable with either 10pin RJ connectors or DB-25 connectors. The EasyIO-8M has 6 pin RJ connectors.The EasyConnection 8/32 family of boards is a relatively low cost modularrange of multiport serial boards. The EasyConnection 8/32 boards can beconfigured to have from 8 to 32 serial ports by plugging in external serialport modules that contain either 8 or 16 ports each. There is a wide rangeof external modules available that offer: DB-25 connectors, RJ-45 connectors(both with RS-232 D and E compatible drivers), and also RS-422 and RS-485ports. The EasyConnection 8/32 boards come in ISA, PCI and MCA bus versions.The board takes the form of a host adapter card, with an external connectorcable that plugs into the external modules. The external modules just cliptogether to add ports (BTW, they are NOT hot pluggable). Each ISAEasyConnection 8/32 board requires two separate I/O address ranges, one twobytes in size and a secondary region of 32 bytes. Each PCI EasyConnection8/32 requires two regions of I/O address space, normally these will beautomatically allocated by the system BIOS at power on time. Each MCAEasyConnection board requires one I/O address region 64 bytes in size. Allboard types also require one interrupt. On EISA systems multiple boards canshare one interrupt. The secondary I/O range of the ISA board (the 32 byterange) can be shared between multiple boards on any bus type.The EasyConnection 8/64-PCI family is similar to the EasyConnection 8/32-PCIboard, and uses the same external modules. It is supported by the smartboard driver - not the intelligent board driver. It uses 2 regions of I/Oaddress space, both 64 bytes in size, and 1 interrupt.1.2 INTELLIGENT MULTIPORT BOARD DRIVERThis driver is for Stallion's range of true intelligent multiport boards.It supports the EasyConnection 8/64, ONboard and Brumby families of multiportboards. The EasyConnection 8/64 and ONboard boards come in ISA, EISA andMicrochannel bus versions. The Brumby boards are only available in ISAversions. This driver can also work with the original Stallion board, butthese are no longer supported by Stallion Technologies.The EasyConnection 8/64 family of boards is a medium cost, high performance,modular range of intelligent multiport serial boards. The EasyConnection 8/64boards can be configured to have from 8 to 64 serial ports by plugging inexternal serial port modules that contain either 8 or 16 ports each (thesemodules are the same used by the EasyConnection 8/32 board). There is a widerange of external modules available that offer: DB-25 connectors, RJ-45connectors (both with RS-232 D and E compatible drivers), and also RS-422 andRS-485 ports. The board takes the form of a host adapter card, with an externalconnector cable that plugs into the external modules. The external modulesjust clip together to add ports (BTW, they are NOT hot pluggable). EachEasyConnection 8/64 board requires 4 bytes of I/O address space and a regionof memory space. The size of the memory region required depends on the exactboard type. The EISA version requires 64 Kbytes of address space (that canreside anywhere in the 4 Gigabyte physical address space). The ISA and MCAboards require 4 Kbytes of address space (which must reside in the lower1 Mbyte of physical address space - typically in the c8000 to e0000 range).No interrupts are required. The physical memory region of multipleEasyConnection 8/64 boards can be shared, but each board must have a separateI/O address.The ONboard family of boards are traditional intelligent multiport serialboards. They are Stallion's older range of boards with a limited expansioncapability. They come in 4, 8, 12, 16 and 32 port versions. The board usesthe same base card (which has 4 ports on it) and is expanded to more ports viaa mezzanine board that attaches directly onto the base card. External panelsplug into the ONboard providing RS-232C ports with DB-25 plugs. An RS-422DB-25 dual interface panel is also available. The ISA and microchannelONboards require 16 bytes of I/O address space and 64K bytes of memoryspace. The memory space can be anywhere in the 16 Mbyte ISA bus addressrange. No interrupt is required. The EISA ONboard requires 64 Kbytes ofmemory space that can be anywhere in the 4 Gigabyte physical address space.All ONboard boards can share their memory region with other ONboards (orEasyConnection 8/64 boards).The Brumby family of boards are traditional, low cost intelligent multiportserial boards. They are non-expandable and come in 4, 8 and 16 port versions.They are only available for the ISA bus. The serial ports are all on DB-25"dongle" cables that attach to the rear of the board. Each Brumby boardrequires 16 bytes of I/O address space and 16 Kbytes of memory space. Nointerrupts are required.The original Stallion boards are old. They went out of production some yearsback and are no longer supported. They offer limited expandability and areavailable in 8 or 16 port configurations. An external panel houses 16 RS-232Cports with DB-9 connectors. They require 16 bytes of I/O address space, andeither 64K or 128K of memory space. No interrupt is required.That's the boards supported by the second driver. The ONboard, Brumby andStallion boards are Stallion's older range of intelligent multiports - sothere are lots of them around. They only support a maximum baud rate of38400. The EasyConnection 8/64 is a true high performance intelligentmultiport board, having much greater throughput than any of Stallion'solder boards. It also supports speeds up to 460800 baud.1.3 HOW TO GET BOARDSStallion Technologies has offices all over the world, as well as many moredistributors and resellers. To find out about local availability pleasecontact the nearest Stallion office and they can give you all the informationyou need. Look in the "Offices" file in the driver package for a current listof Stallion Technologies offices.Another good source of information about the Stallion range of boards andlocal availability is on the Stallion Web page. Check it out athttp://www.stallion.com.2. INSTALLATIONThis version of the driver is intended for kernel versions 2.0.0 and later.It will not work on earlier kernel versions, due to kernel interface changes.(Note that older versions of these drivers do work on older kernels.)If you are using a more recent development kernel (versions 2.1.X andgreater) you should use the Stallion drivers supplied with that kernel,they are more up to date.The drivers can be used as loadable modules or compiled into the kernel.Depending on which form of driver loading you decide to use, the installationprocedure will be a little different.All ISA, EISA and MCA boards that you want to use need to be entered intothe driver(s) configuration structures. PCI boards will be automaticallydetected when you load the driver - so they do not need to be entered intothe driver(s) configuration structure. (Note that kernel PCI BIOS32 supportis required to use PCI boards.)Entering ISA, EISA and MCA boards into the driver(s) configuration structureinvolves editing the driver(s) source file. It's pretty easy if you followthe instructions below. Both drivers can support up to 4 boards. The smartcard driver supports any combination of EasyIO, EasyConnection 8/32 andEasyConnection 8/64-PCI boards (up to a total of 4). The intelligent driversupports any combination of ONboards, Brumbys, Stallions andEasyConnection 8/64 boards (up to a total of 4).2.1 LOADABLE MODULE DRIVERSYou will need the gcc compiler and make installed on your system to make thedriver modules. You will also need to have the kernel source on the system,and have at least done a "make config" and "make dep" on it. (If you haven'tdone this before then you may want to read the kernel source README file,usually found in /usr/src/linux.)To build the driver modules:1. Setup the driver configuration for the boards. If using EasyIO orEasyConnection 8/32 ISA or MCA boards, do:vi stallion.c- find the definition of the stl_brdconf array (of structures)near the top of the file- modify this to match the boards you are going to install(the comments before this structure should help)- save and exitIf using ONboard, Brumby, Stallion or EasyConnection 8/64 boards then do:vi istallion.c- find the definition of the stli_brdconf array (of structures)near the top of the file- modify this to match the boards you are going to install(the comments before this structure should help)- save and exit2. cp stallion.h cd1400.h sc26198.h /usr/include/linux/include/linuxcp istallion.h cdk.h comstats.h /usr/include/linux/include/linux3. make modulesThis will compile the driver modules, as stallion and istallion.The stallion module is the EasyIO, EasyConnection 8/32 andEasyConnection 8/64-PCI driver, the istallion module is the ONboard,Brumby, Stallion and EasyConnection 8/64 driver.To load up the smart board driver use:insmod ./stallionThis will load the EasyIO and EasyConnection 8/32 driver. It will output amessage to say that it loaded and print the driver version number. Itwill also print out whether it found the configured boards or not. (Thesemessages may appear in your /var/adm/messages file depending on how theklogd and syslogd daemons are setup on your system).To load the intelligent board driver use:insmod ./istallionIt will output similar messages to the smart board driver.2.2 STATIC DRIVERS (KERNEL LINKED)You will need to build a new kernel to link in the Stallion drivers. The firstthing you need is to have the full kernel source. Most people will have this.The following assumes that the kernel source is in /usr/src/linux.To install the drivers:1. cp stallion.c istallion.c /usr/src/linux/drivers/charcp stallion.h cd1400.h sc26198.h /usr/include/linux/include/linuxcp istallion.h cdk.h comstats.h /usr/include/linux/include/linux2. cd /usr/src/linux/drivers/char3. Setup the driver configuration for the boards. If using EasyIO,EasyConnection 8/32 or EasyConnection 8/64-PCI boards, do:vi stallion.c- find the definition of the stl_brdconf array (of structures)near the top of the file- modify this to match the boards you are going to install(the comments before this structure should help)- save and exitIf using ONboard, Brumby, Stallion or EasyConnection 8/64 boards then do:vi istallion.c- find the definition of the stli_brdconf array (of structures)near the top of the file- modify this to match the boards you are going to install(the comments before this structure should help)- save and exit4. cd /usr/src/linux5. build a new kernel - if you haven't done this before you may want toread the README file in /usr/src/linux.Once you have a new kernel built, reboot to start it up. On startup thedriver will output a message to say it is operational (with the driverversion number). It will also print out if it could find the boards listedin its configuration structure or not.2.3 INTELLIGENT DRIVER OPERATIONThe intelligent boards also need to have their "firmware" code downloadedto them. This is done via a user level application supplied in the driverpackage called "stlload". Compile this program where ever you dropped thepackage files, by typing "make". In its simplest form you can then type./stlload -i cdk.sysin this directory and that will download board 0 (assuming board 0 is anEasyConnection 8/64 board). To download to an ONboard, Brumby or Stallion do:./stlload -i 2681.sysNormally you would want all boards to be downloaded as part of the standardsystem startup. To achieve this, add one of the lines above into the/etc/rc.d/rc.S or /etc/rc.d/rc.serial file. To download each board just addthe "-b <brd-number>" option to the line. You will need to download code forevery board. You should probably move the stlload program into a systemdirectory, such as /usr/sbin. Also, the default location of the cdk.sys imagefile in the stlload down-loader is /usr/lib/stallion. Create that directoryand put the cdk.sys and 2681.sys files in it. (It's a convenient place to putthem anyway). As an example your /etc/rc.d/rc.S file might have thefollowing lines added to it (if you had 3 boards):/usr/sbin/stlload -b 0 -i /usr/lib/stallion/cdk.sys/usr/sbin/stlload -b 1 -i /usr/lib/stallion/2681.sys/usr/sbin/stlload -b 2 -i /usr/lib/stallion/2681.sysThe image files cdk.sys and 2681.sys are specific to the board types. Thecdk.sys will only function correctly on an EasyConnection 8/64 board. Similarlythe 2681.sys image fill only operate on ONboard, Brumby and Stallion boards.If you load the wrong image file into a board it will fail to start up, andof course the ports will not be operational!If you are using the module version of the driver you might want to put theinsmod calls in the startup script as well (before the download linesobviously).2.4 SHARING INTERRUPTSAs mentioned in the introduction, it is possible to share interrupts betweenmultiple EasyIO and EasyConnection 8/32 boards in an EISA system. To do thisyou will need to do a couple of things:1. When entering the board resources into the stallion.c file you need tomark the boards as using level triggered interrupts. Do this by replacingthe "0" entry at field position 6 (the last field) in the boardconfiguration structure with a "1". (This is the structure that definesthe board type, I/O locations, etc. for each board). All boards that aresharing an interrupt must be set this way, and each board should have thesame interrupt number specified here as well. Now build the module orkernel as you would normally.2. When physically installing the boards into the system you must enterthe system EISA configuration utility. You will need to install the EISAconfiguration files for *all* the EasyIO and EasyConnection 8/32 boardsthat are sharing interrupts. The Stallion EasyIO and EasyConnection 8/32EISA configuration files required are supplied by Stallion Technologieson the DOS Utilities floppy (usually supplied in the box with the boardwhen purchased. If not, you can pick it up from Stallion's FTP siteftp.stallion.com or web site http://www.stallion.com). You will need toedit the board resources to choose level triggered interrupts, and makesure to set each board's interrupt to the same IRQ number.You must complete both the above steps for this to work. When you rebootor load the driver your EasyIO and EasyConnection 8/32 boards will besharing interrupts.2.5 USING HIGH SHARED MEMORYThe EasyConnection 8/64-EI, ONboard and Stallion boards are capable ofusing shared memory addresses above the usual 640K - 1Mb range. The ONboardISA and the Stallion boards can be programmed to use memory addresses up to16Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI andONboard/E can be programmed for memory addresses up to 4Gb (the EISA busaddressing limit).The istallion driver offers direct support for these higher memory regions.To use them just enter the high memory address as if it were a low memoryaddress (in the driver board configuration structure).2.6 LINUX KERNEL VERSIONS 2.1.XThere may be some minor differences between the driver source code in thispackage and that in the Linux kernel source. This will be due to changesneeded in the drivers so that they work correctly on newer kernels. Thedriver source included in this package is intended for use with 2.0.Xseries kernels. If you have a kernel version 2.1.0 or later then use thesource provided with the kernel - it will be more up to date. StallionTechnologies regularly submits the latest driver source to be included inthe new kernel source releases.2.7 TROUBLE SHOOTINGIf a board is not found by the driver but is actually in the system then themost likely problem is that the I/O address is wrong. Change it in the driverstallion.c or istallion.c configuration structure and rebuild the kernelor modules, or change it on the board. On EasyIO and EasyConnection 8/32boards the IRQ is software programmable, so if there is a conflict you mayneed to change the IRQ used for a board in the stallion.c configurationstructure. There are no interrupts to worry about for ONboard, Brumby,Stallion or EasyConnection 8/64 boards. The memory region on EasyConnection8/64 and ONboard boards is software programmable, but not on the Brumbys orStallions.3. USING THE DRIVERSOnce the driver is installed you will need to setup some device nodes toaccess the serial ports. Use the supplied "mkdevnods" script to automaticallycreate all required device entries for one board. This will create the normalserial port devices as /dev/ttyE# where # is the port number starting from 0.A set of callout type devices is also created. They are created as the devices/dev/cue# where # is the same as for the ttyE devices.A bank of 64 minor device numbers is allocated to each board. To createdevice nodes for ports on multiple boards supply a number of boards argumentto the "mkdevnods" script. For example to create nodes for four boards use"mkdevnods 4". This means that the first port on the second board is port 64,the first port on the third board is 128, etc.For the most part the Stallion driver tries to emulate the standard PC systemCOM ports and the standard Linux serial driver. The idea is that you shouldbe able to use Stallion board ports and COM ports interchangeably withoutmodifying anything but the device name. Anything that doesn't work like thatshould be considered a bug in this driver!If you look at the driver code you will notice that it is fairly closelybased on the Linux serial driver (linux/drivers/char/serial.c). This isintentional, obviously this is the easiest way to emulate its behavior!Since this driver tries to emulate the standard serial ports as much aspossible, most system utilities should work as they do for the standardCOM ports. Most importantly "stty" works as expected and "setserial" can bealso be used (excepting the ability to auto-configure the I/O and IRQaddresses of boards). Higher baud rates are supported in the usual fashionthrough setserial or using the CBAUDEX extensions. Note that the EasyIO andEasyConnection (all types) support 57600 and 115200 baud, and the newer XPversions also support 230400 and 460800 baud. The older boards includingONboard, Brumby and the original Stallion support a maximum baud rate of38400.This driver should work with anything that works on standard Linux serialports. Having said that, it has been used on at least the following types of"things" under Linux:a) standard dumb terminals (using agetty, getty)b) serial mice (under X)c) modems (using cu, uucp, minicom, seyon, uugetty)d) slip and ppp connectionsIf you are unfamiliar with how to use serial ports, then get the Serial-HOWTOby Greg Hankins. It will explain everything you need to know!4. NOTESThe major device numbers used by this driver are conformant with the LinuxDevice Registry, so they shouldn't clash with any other devices. Also thedevice naming scheme is the "standard" used by most Linux serial portdevices.You can use both drivers at once if you have a mix of board types installedin a system. However to do this you will need to change the major numbersused by one of the drivers. Currently both drivers use major numbers 24, 25and 28 for their devices. Change one driver to use some other major numbers,and then modify the mkdevnods script to make device nodes based on those newmajor numbers. For example, you could change the istallion.c driver to usemajor numbers 60, 61 and 62. You will also need to create device nodes withdifferent names for the ports, for example ttyF# and cuf#.Finding a free physical memory address range can be a problem. The olderboards like the Stallion and ONboard need large areas (64K or even 128K), sothey can be very difficult to get into a system. If you have 16 Mb of RAMthen you have no choice but to put them somewhere in the 640K -> 1Mb range.ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on somesystems. If you have an original Stallion board, "V4.0" or Rev.O,then you need a 64K memory address space, so again 0xd0000 and 0xe0000 aregood. Older Stallion boards are a much bigger problem. They need 128K ofaddress space and must be on a 128K boundary. If you don't have a VGA cardthen 0xc0000 might be usable - there is really no other place you can putthem below 1Mb.Both the ONboard and old Stallion boards can use higher memory addresses aswell, but you must have less than 16Mb of RAM to be able to use them. Usualhigh memory addresses used include 0xec0000 and 0xf00000.The Brumby boards only require 16Kb of address space, so you can usuallysqueeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or inthe 0xd0000 range. EasyConnection 8/64 boards are even better, they onlyrequire 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000are good.If you are using an EasyConnection 8/64-EI or ONboard/E then usually the0xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither ofthem can be used then the high memory support to use the really high addressranges is the best option. Typically the 2Gb range is convenient for them,and gets them well out of the way.There is a new utility program included called "stlstty". Most peoplewill not need to use this. If you have an ONboard/16 which has partialsignals on the upper 12 ports then this program can be used to set theupper ports to have modem control instead of hardware flow control. Usethe "mapcts maprts" flag options to this utility on the port(s) that youwish to do this mapping on, eg./stlstty maprts mapcts < /dev/cue0This enables RTS to act like DTR and CTS to act like DCD on the specifiedport.The ports of the EasyIO-8M board do not have DCD or DTR signals. So theseports cannot be used as real modem devices. Generally when using theseports you should only use the cueX devices.There is another new utility in this package that reports statistics onthe serial ports. You will need to have the curses libray installed onyour system to build it.To build the statistics display program type:make stlstatsOnce compiled simply run it (you will need to be root) and it will displaya port sumary for the first board and panel installed. Use the digits toselect different board numbers, or 'n' to cycle through the panels on aboard. To look at detailed port information then hit 'p', that will displaydetailed port 0 information. Use the digits and letters 'a' through 'f' toselect the different ports (on this board and panel).5. ACKNOWLEDGEMENTSThis driver is loosely based on code written by Theodore T'so, LinusTorvalds, and others, so a big thanks to them all.6. DISCLAIMERThe information contained in this document is believed to be accurate andreliable. However, no responsibility is assumed by Stallion TechnologiesPty. Ltd. for its use, nor any infringements of patents or other rightsof third parties resulting from its use. Stallion Technologies reservesthe right to modify the design of its products and will endeavour to changethe information in manuals and accompanying documentation accordingly.
