Loading...
HAYES ESP DRIVERS VERSION 1.0 Features: - Uses the enhanced mode of the ESP card, allowing a wider range of interrupts and features than compatibilty mode - Uses DMA to transfer data to and from the ESP's FIFOs, reducing CPU load - Supports primary and secondary ports The driver can be compiled as a module. The module will be called 'esp.o'. The IRQs to use can be specified by using the irq= option. The format is: irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380] The address in brackets is the base address of the card. The IRQ of nonexistant cards can be set to 0. If and IRQ of a card that does exist is set to 0, the driver will attempt to guess at the correct IRQ. For example, to set the IRQ of the card at address 0x300 to 12, the insmod command would be: insmod esp irq=0,0,0,0,0,0,12,0 The custom divisor can be set by using the divisor= option. The format is the same as for the irq= option. Each divisor value is a series of hex digits, with each digit representing the divisor to use for a corresponding port. The divisor value is constructed RIGHT TO LEFT. Specifying a nonzero divisor value will automatically set the spd_cust flag. To calculate the divisor to use for a certain baud rate, divide the port's base baud (921600) by the desired rate. For example, to set the divisor of the primary port at 0x300 to 4 and the divisor of the secondary port at 0x308 to 8, the insmod command would be: insmod esp divisor=0,0,0,0,0,0,0x84,0 The dma= option can be used to set the DMA channel. The channel can be either 1 or 3. For example, to set the dma channel to 3, the insmod command would be: insmod esp dma=3 The trigger= option can be used to set the FIFO trigger levels. This specifies when the ESP card should send an interrupt. Larger values will decrease the number of interrupts; however, a value too high may result in data loss. Valid values are 1 through 1015, with 768 being the default. For example, to set the trigger levels to 512 bytes, the insmod command would be: insmod esp trigger=512 Multiple options can be listed on the insmod command line by separating each option with a space. For example: insmod esp dma=3 trigger=512 The esp module can be automatically loaded when needed. To cause this to happen, add the following lines to /etc/conf.modules (replacing the last line with options for your configuration): alias char-major-57 esp alias char-major-58 esp options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0 You may also need to run 'depmod -a'. Devices must be created manually. To create the devices, note the output from the module after it is inserted. The output will appear in the location where kernel messages usually appear (usually /var/adm/messages). Create two devices for each 'tty' mentioned, one with major of 57 and the other with major of 58. The minor number should be the same as the tty number reported. The commands would be (replace ? with the tty number): mknod /dev/ttyP? c 57 ? mknod /dev/cup? c 58 ? For example, if the following line appears: Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port ...two devices should be created: mknod /dev/ttyP8 c 57 8 mknod /dev/cup8 c 58 8 You may need to set the permissions on the devices: chmod 666 /dev/ttyP* chmod 666 /dev/cup* The ESP module and the serial module should not conflict (they can be used at the same time). After the ESP module has been loaded the ports on the ESP card will no longer be accessable by the serial driver. If I/O errors are experienced when accessing the port, check for IRQ and DMA conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and DMAs currently in use). Enjoy! Andrew J. Robinson <arobinso@nyx.net> |