Google
  Web www.spinics.net

Re: [PATCH] pxa serial auto flow control

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


Robert Jarzmik <robert.jarzmik@xxxxxxx> writes:

> Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> writes:
>
> I'll make some tests this week-end. I'll put my GPS chip in AFE=1, RTS=1, see
> it's data, and then toggle RTS=0. If data stops, I reactivate RTS=1 several
> seconds later. If I see all the frames that were blocked in the meantime, then
> the mecanism works, in the fashion I described in the reply to Uli.
>
> Then I'll repost the patch, without the RTS bit activation when setting AFE (as
> Uli suggested).
I made the tests.
It is granted that asserting MCTRL.RTS=0 deasserts RTS signal even if AFE is
set, and that regardless of uart fifo's state of filling. The test described
above gives me back all the frames that were on hold while RTS was low.

So I'd want to push, as Uli suggested, the same patch without the RTS bit. Can I
push toward the patch system ?

--
Robert

>From 89c9d77989baf161322aa659aa4f2a963535ed99 Mon Sep 17 00:00:00 2001
From: Robert Jarzmik <robert.jarzmik@xxxxxxx>
Date: Sat, 30 Aug 2008 12:11:01 +0200
Subject: [PATCH] Add hardware CTSRTS flow control to pxa serial driver

Adds hardware CTSRTS control for pxa serial devices through
termios controls.

Signed-off-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>

PATCH FOLLOWS
KernelVersion:2.6.27-rc2
---
 drivers/serial/pxa.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index f7a0d37..abc00be 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -534,6 +534,11 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
 
 	serial_out(up, UART_IER, up->ier);
 
+	if (termios->c_cflag & CRTSCTS)
+		up->mcr |= UART_MCR_AFE;
+	else
+		up->mcr &= ~UART_MCR_AFE;
+
 	serial_out(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
 	serial_out(up, UART_DLL, quot & 0xff);		/* LS of divisor */
 	serial_out(up, UART_DLM, quot >> 8);		/* MS of divisor */
-- 
1.5.6.3

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux Arm]     [Fedora ARM]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux Book List]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Google PageRank Checking tool