summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch')
-rw-r--r--recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch b/recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch
new file mode 100644
index 0000000000..e60088794f
--- /dev/null
+++ b/recipes/linux/linux-2.6.27+2.6.28-rc6/afeb9260/0003-RS-485-mode-of-USART1.patch
@@ -0,0 +1,41 @@
+From 5374be6a8f2644e33e436b1864188442e1b2c156 Mon Sep 17 00:00:00 2001
+From: Sergey Lapin <slapin@ossfans.org>
+Date: Fri, 4 Jul 2008 01:53:23 +0400
+Subject: [PATCH] RS-485 mode of USART1
+
+Signed-off-by: Sergey Lapin <slapin@ossfans.org>
+---
+ drivers/serial/atmel_serial.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
+index 1fee12c..20ced47 100644
+--- a/drivers/serial/atmel_serial.c
++++ b/drivers/serial/atmel_serial.c
+@@ -233,8 +233,12 @@ static void atmel_set_mctrl(struct uart_port *port, u_int mctrl)
+ mode = UART_GET_MR(port) & ~ATMEL_US_CHMODE;
+ if (mctrl & TIOCM_LOOP)
+ mode |= ATMEL_US_CHMODE_LOC_LOOP;
+- else
++ else {
++ if (port->mapbase == AT91SAM9260_BASE_US1)
++ mode |= ATMEL_US_USMODE_RS485;
++
+ mode |= ATMEL_US_CHMODE_NORMAL;
++ }
+ UART_PUT_MR(port, mode);
+ }
+
+@@ -1094,6 +1098,9 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
+ /* disable receiver and transmitter */
+ UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS);
+
++ if (port->mapbase == AT91SAM9260_BASE_US1)
++ mode |= ATMEL_US_USMODE_RS485;
++
+ /* set the parity, stop bits and data size */
+ UART_PUT_MR(port, mode);
+
+--
+1.5.4.1
+