aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/of_serial.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2013-03-25 09:51:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 19:36:48 -0400
commitb0b8c84cf58d2486d48f486b5c47af7a7a33a497 (patch)
tree6ac36520e3535d9bac0bb1bf20a2945e5879d471 /drivers/tty/serial/of_serial.c
parent44a459fd83376d08b0dea776354761ebb1bacde1 (diff)
serial: of_serial: Handle auto-flow-control property
Automatic Flow Control capability is not tied to this property. This is only one way of detecting it. The property is limited to be used only with 8250 driver. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/of_serial.c')
-rw-r--r--drivers/tty/serial/of_serial.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 267711b5cb4d..39c7ea4cb14f 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -14,7 +14,6 @@
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/serial_core.h> 16#include <linux/serial_core.h>
17#include <linux/serial_8250.h>
18#include <linux/serial_reg.h> 17#include <linux/serial_reg.h>
19#include <linux/of_address.h> 18#include <linux/of_address.h>
20#include <linux/of_irq.h> 19#include <linux/of_irq.h>
@@ -22,6 +21,8 @@
22#include <linux/nwpserial.h> 21#include <linux/nwpserial.h>
23#include <linux/clk.h> 22#include <linux/clk.h>
24 23
24#include "8250/8250.h"
25
25struct of_serial_info { 26struct of_serial_info {
26 struct clk *clk; 27 struct clk *clk;
27 int type; 28 int type;
@@ -171,11 +172,17 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
171#ifdef CONFIG_SERIAL_8250 172#ifdef CONFIG_SERIAL_8250
172 case PORT_8250 ... PORT_MAX_8250: 173 case PORT_8250 ... PORT_MAX_8250:
173 { 174 {
174 /* For now the of bindings don't support the extra
175 8250 specific bits */
176 struct uart_8250_port port8250; 175 struct uart_8250_port port8250;
177 memset(&port8250, 0, sizeof(port8250)); 176 memset(&port8250, 0, sizeof(port8250));
178 port8250.port = port; 177 port8250.port = port;
178
179 if (port.fifosize)
180 port8250.capabilities = UART_CAP_FIFO;
181
182 if (of_property_read_bool(ofdev->dev.of_node,
183 "auto-flow-control"))
184 port8250.capabilities |= UART_CAP_AFE;
185
179 ret = serial8250_register_8250_port(&port8250); 186 ret = serial8250_register_8250_port(&port8250);
180 break; 187 break;
181 } 188 }