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

Re: [Xen-devel] [PATCH] pl011: assert RTS signal in case the receiver uses flow control



On 09/02/2013 03:51 PM, Andre Przywara wrote:
> Although we do not support hardware flow control in the Xen driver
> for the PL011 UART, the other end may be configured to use it.
> In this case it waits in vain for the RTS signal to be asserted by
> the host and will never transmit any characters.
> This fixes the UART input on Calxeda Midway, which uses hardware
> flow control for the serial-over-LAN functionality.
> 
> Signed-off-by: Andre Przywara <andre.przywara@xxxxxxxxxx>
> ---
>  xen/drivers/char/pl011.c         | 4 ++--
>  xen/include/asm-arm/pl011-uart.h | 4 ++++
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
> index 3ec6e10..e340961 100644
> --- a/xen/drivers/char/pl011.c
> +++ b/xen/drivers/char/pl011.c
> @@ -120,8 +120,8 @@ static void __init pl011_init_preirq(struct serial_port 
> *port)
>      pl011_write(uart, IMSC, 0);
>      pl011_write(uart, ICR, ALLI);
>  
> -    /* Enable the UART for RX and TX; no flow ctrl */
> -    pl011_write(uart, CR, RXE | TXE | UARTEN);
> +    /* Enable the UART for RX and TX; assert RTS in case the other end cares 
> */
> +    pl011_write(uart, CR, RTS | RXE | TXE | UARTEN);
>  }

Instead of overriding CR can we read CR and enable the necessary bit?
It seems that Linux doesn't set RTS but keep the level from the previous
register value.

BTW, this patch works on the versatile express :).

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.