diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-07-17 12:08:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-17 12:16:39 -0400 |
commit | fde8be29239bf4a4118d918df1b2b8ef7266b1a2 (patch) | |
tree | cef130bf413458dd2ffb750d451d701965225543 /drivers/tty/serial/of_serial.c | |
parent | 36b3c070d2346c890d690d71f6eab02f8c511137 (diff) |
tty: of_serial: add no-loopback-test property
The loopback test mode is not implemented in all
NS16550 compatible UARTs. The 8250 driver uses the
UPF_SKIP_TEST flag to indicate this, however it is
not possible to set this flag via device-tree.
Add a new 'no-loopback-test' property, and modify
the of_serial driver to set the UPF_SKIP_TEST flag
if the property is present.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index ffc7879e85a4..df443b908ca3 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c | |||
@@ -105,6 +105,10 @@ static int __devinit of_platform_serial_setup(struct platform_device *ofdev, | |||
105 | port->uartclk = clk; | 105 | port->uartclk = clk; |
106 | port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP | 106 | port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP |
107 | | UPF_FIXED_PORT | UPF_FIXED_TYPE; | 107 | | UPF_FIXED_PORT | UPF_FIXED_TYPE; |
108 | |||
109 | if (of_find_property(np, "no-loopback-test", NULL)) | ||
110 | port->flags |= UPF_SKIP_TEST; | ||
111 | |||
108 | port->dev = &ofdev->dev; | 112 | port->dev = &ofdev->dev; |
109 | 113 | ||
110 | if (type == PORT_TEGRA) | 114 | if (type == PORT_TEGRA) |