Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error with setserial and multiport serial board

28 views
Skip to first unread message

Ned Konz

unread,
Jun 29, 2001, 4:32:17 PM6/29/01
to
I'm trying to configure an on-board serial subsystem on an Octagon PC-500
embedded board. I'm using Linux 2.2.19, and have a Debian system.

COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1) are the normal PC-ish setup, and
work fine:

/dev/ttyS0 io=0x3f8 irq=4
/dev/ttyS1 io=0x2f8 irq=3

COM3, COM4, and COM4 (/dev/ttyS2 /dev/ttyS3 /dev/ttyS4) share IRQ15, and
also provide an interrupt pending port at 0x338 in which there is a bit set
to 1 for every UART requesting service:

bit 3 = COM3
bit 2 = COM4
bit 1 = COM5

I am trying to use the following script to initialize the port setup:

setserial /dev/ttyS0 port 0x03f8 irq 4 ^fourport
setserial /dev/ttyS1 port 0x02f8 irq 3 ^fourport
setserial /dev/ttyS2 port 0x03e8 irq 15 ^fourport
setserial /dev/ttyS3 port 0x02e8 irq 15 ^fourport
setserial /dev/ttyS2 set_multiport port1 0x338 match1 7 mask1 0

But when I run the line
setserial /dev/ttyS2 set_multiport port1 0x338 match1 7 mask1 0
I get the following error message:
Cannot get multiport config: Invalid argument

The same thing happens when I go:
setserial /dev/ttyS2 get_multiport

Looking at the ioctl calls from setserial using strace, I see:
open("/dev/ttyS2", O_RDWR|O_NONBLOCK) = 4
ioctl(4, TIOCGSERIAL, 0xbffffab0) = 0
ioctl(4, TIOCSSERIAL, 0xbffffa74) = 0
ioctl(4, TIOCSERGETMULTI, 0xbffff994) = -1 EINVAL (Invalid argument)

My kernel serial configuration looks like:

CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_SERIAL_EXTENDED=y
CONFIG_SERIAL_MANY_PORTS=y
CONFIG_SERIAL_SHARE_IRQ=y
# CONFIG_SERIAL_DETECT_IRQ is not set
CONFIG_SERIAL_MULTIPORT=y
# CONFIG_HUB6 is not set
# CONFIG_SERIAL_NONSTANDARD is not set

I'm not passing in any serial flags on the Linux boot command line.

Can anyone shed some light on this?

Thanks in advance,
Ned Konz

0 new messages