Option 1: using the setserial command line utility – Impulse 7804e User Manual

Page 15

Advertising
background image

©Sealevel Systems, Inc.
SL9219 - 06/2011

7804e Manual

15

Linux already supports the direct use of 16CXXX UART based devices with drivers included in
the kernel sources. Some of Sealevel's async serial devices do not currently have their
vendor/product IDs included in this driver. It is necessary to either manually identify the UARTs
to the driver or to modify the driver by adding the vendor/product IDs.

This procedure is the ONLY method of accessing a PC/104 or ISA device by using
standard device drivers.

Since the <IO_ADDRESS> and <IRQ_NUMBER> are static in the case of PC/104 and ISA, a
distribution's start-up scripts can easily be modified to enable driver attachment (this
assumes that no new plug-and-play serial devices will be added later on, as they will be
overwritten until the start-up scripts are modified).

A recent change in the way the serial driver attaches to <MINOR> numbers may prevent
more than 4 to 32 serial ports to be attached to the driver at any time. If the total
number of required ports in the system is more than 4 and less than 32, setting the
kernel boot parameter 8250.nr_uarts=n increases the number of ports appropriately,
and this Option 1 is still viable. If the number of required ports is greater than 32, the
compiled kernel configuration parameter CONFIG_SERIAL_8250_NR_UARTS can be
changed so that it is updated when the kernel is recompiled. This means if this is a PCI
device, it may be prudent to go ahead and enable Plug-and-Play capability.


The setserial program is an open source utility to aide in the configuration of the 8250
async serial port driver. It is included with most Linux distributions or available through
that distributions package management system (check distribution documentation).
Alternatively the source code can be found at the

project's website

.


Once the setserial utility is available, it is necessary to determine the IO addresses and IRQ
line for each of the devices UARTs. If this is an ISA or PC/104 device, these options are
configured manually with jumpers on the board. If this is a PCI, PCI Express, or PC/104+
device, these are assigned through a combination of BIOS and OS. To determine what IO
address and IRQ line has been assigned, use the lspci command as demonstrated. The d
switch filters results to any devices with IDs VENDOR:PRODUCT. By leaving the PRODUCT ID
blank, ALL Sealevel devices attached to the PCI bus will be displayed. The vvv option tells
the command to be as verbose as possible giving us all the information we will need.

$ lspci -d 135e: -vvv

00:0f.0 Serial controller: Sealevel Systems Inc Unknown device 7203

(rev 01) (prog-if 02 16550])
Subsystem: Sealevel Systems Inc Unknown device 7203
Flags: medium devsel, IRQ 11
Memory at ee000000 (32-bit, non-prefetchable) [size=128]
I/O ports at b000 [size=128]
I/O ports at a800 [size=8]
I/O ports at a400 [size=8]

00:11.0 Serial controller: Sealevel Systems Inc Unknown device
7803 (rev 01) (prog-if 02 16550])
Subsystem: Sealevel Systems Inc Unknown device 7803
Flags: medium devsel, IRQ 10

Advertising