[PATCH] amba-pl011: support hardware flow control
Jamie Lokier
jamie at shareable.org
Wed Feb 10 05:12:02 EST 2010
Russell King - ARM Linux wrote:
> On Wed, Feb 10, 2010 at 01:16:37AM +0000, Jamie Lokier wrote:
> > Russell King - ARM Linux wrote:
> > > This means that when the kernel's buffers fill up, the kernel calls
> > > down to the serial core layer to throttle the input. This then
> > > calls into the set_mctrl function to de-assert RTS. However, because
> > > the hardware ignores the requested software state, the RTS signal
> > > is not de-asserted, and the remote end continues sending data.
> > >
> > > So, enabling hardware auto-RTS is bad news - you will lose data if
> > > the application stops reading data.
> >
> > Surely the driver can just stop reading from the UART when the
> > kernel's buffers are full and hardware-RTS is enabled. Then the
> > hardware will deassert RTS itself.
>
> I'll let you work out how to implement that.
You have a point.
What do you think of the other suggestion, switching between
software-RTS+deasserted and hardware-RTS in response to set_mctrl
calls from the generic serial layer - effectively hardware-RTS with
ability for kernel to force it deasserted?
-- Jamie
More information about the linux-arm-kernel
mailing list