Re: Support for RS485 on 8250 clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-07-28, Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> wrote:
> Hello
>
> I have a device with a Fintek F81216A  LPC to 4 Uart device.
>
> One of the uarts is used as half duplex rs485 serial port. This means
> that it needs to be configured properly (logical level of rts, delays,
> etc...)
>
> I see that there is an API on the kernel to do this (TIOCGRS485),
> unfortunately the 8250 driver does not support it.

That's mostly due to how crappy the 8250 UART design is.

> 1) Is there any interest on supporting this kind of hardware on the
>    kernel?

Sure.  That would be brilliant.

Many years ago, I tried to do implement half-duplex support for the
8250 but failed.  It would work on one motherboard but not the next.
There didn't seem to be a reliable way to know when the last stop bit
had been sent: the tx shift register empty status didn't go active at
a predicatble point. On some implementations it went true before the
stop bit was sent.  On some afterwards.  On some, part way through the
stop bit.

Even if the tx shift register empty bit did work predictably, you have
to do a busy/wait polling loop because that status bit can't generate
an interrupt, so there's no way trigger the required action (shut off
RTS or start a delay timer to do the same).

> 2) Some driver that I could use for inspiration?

Not that I know of.

-- 
Grant Edwards               grant.b.edwards        Yow! Are we THERE yet?
                                  at               
                              gmail.com            

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux