public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* Hardware flowcontrol on XR17D154
@ 2011-08-30 10:17 Søren holm
  2011-08-30 10:34 ` Alan Cox
  0 siblings, 1 reply; 11+ messages in thread
From: Søren holm @ 2011-08-30 10:17 UTC (permalink / raw)
  To: linux-serial

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

Hi

I have hacked hardware flowcontrol into 8250.c for the XR17D154. I have 
attached the patch. The fix just uses another address for the EFR-register.

I would like to have some adwise as to how to do this the right way. 

Thanks.
-- 
Søren Holm

[-- Attachment #2: xr17d154_hwflow.patch --]
[-- Type: text/x-patch, Size: 1245 bytes --]

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index b3b881b..ba28eb8 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -301,7 +301,7 @@ static const struct serial8250_config uart_config[] = {
 		.fifo_size	= 64,
 		.tx_loadsz	= 64,
 		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
-		.flags		= UART_CAP_FIFO | UART_CAP_AFE,
+		.flags		= UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR,
 	},
 };
 
@@ -2420,7 +2420,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
 			efr |= UART_EFR_CTS;
 
 		serial_outp(up, UART_LCR, UART_LCR_CONF_MODE_B);
-		serial_outp(up, UART_EFR, efr);
+		serial_outp(up, UART_EFR2, efr);
 	}
 
 #ifdef CONFIG_ARCH_OMAP
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 3ecb71a..56b2569 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -150,6 +150,7 @@
  * LCR=0xBF (or DLAB=1 for 16C660)
  */
 #define UART_EFR	2	/* I/O: Extended Features Register */
+#define UART_EFR2	9	/* I/O: Extended Features Register for Exari XR17D154 */
 #define UART_EFR_CTS		0x80 /* CTS flow control */
 #define UART_EFR_RTS		0x40 /* RTS flow control */
 #define UART_EFR_SCD		0x20 /* Special character detect */

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-09-03 10:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-30 10:17 Hardware flowcontrol on XR17D154 Søren holm
2011-08-30 10:34 ` Alan Cox
2011-08-30 11:27   ` Søren holm
2011-08-30 12:32     ` Alan Cox
2011-08-30 13:14       ` Søren holm
2011-09-02 10:20       ` Søren holm
2011-09-02 12:28         ` Alan Cox
2011-09-02 20:52           ` [PATCH] serial: Support the EFR-register of XR1715x uarts Søren Holm
2011-09-02 20:55           ` Søren Holm
2011-09-03 10:47             ` Alan Cox
2011-09-02 21:11           ` Hardware flowcontrol on XR17D154 Søren holm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox