Linux – can’t initialise/detect 16550A UART at unusual io port address

driverslinuxlinux-kernel

I've got a board based on the Vortex86DX CPU which is an x86 based microcontroller. It has five 16550A UARTS, four (COM1-COM4) of which are at the usual io port addresses (0x3f8, 0x2f8, 0x3e8, 0x2e8) but the fifth (COM9) is at 0x010, irq 9.

Vortex86DX

The first four UARTS are detected, I have no problem with them. The problem is that I can't get the fifth one (COM9) to work in Linux. COM9 works in a stand alone DOS application, but I can't even detect it from Linux.

What I've done so far:

Result: the kernel failed to probe the UART at address 0x010

So I wrote an io port probing utility to directly read from io port 0x010, and I could not detect any 16550A registers in the 0x010 to 0x017 region. It appears there is nothing there. I have been trying to write and read back data from the scratch register (offset +7), but I get nothing at address 0x017.

The datasheet for the CPU doesn't say much. It indicates there is a control bit in a Southbridge register that does "something" for COM9. I wrote a PCI utility that wrote to this bit, but it didn't seem to enable the COM port or change anything when I did the io port probing.

Any help would be appreciated at this point!

Best Answer

I don't see why you've gone to all the trouble to change the kernel source code to add support for this nonstandard serial I/O port and IRQ. The setserial(8) program should be able to configure it for you. Something like this:

# setserial ttyS4 address 0x10 irq 9

See the Linux Serial HOWTO for more details.

Related Question