提交 fde8be29 编写于 作者: G Gabor Juhos 提交者: Greg Kroah-Hartman

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: NGabor Juhos <juhosg@openwrt.org>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 36b3c070
...@@ -25,6 +25,8 @@ Optional properties: ...@@ -25,6 +25,8 @@ Optional properties:
accesses to the UART (e.g. TI davinci). accesses to the UART (e.g. TI davinci).
- used-by-rtas : set to indicate that the port is in use by the OpenFirmware - used-by-rtas : set to indicate that the port is in use by the OpenFirmware
RTAS and should not be registered. RTAS and should not be registered.
- no-loopback-test: set to indicate that the port does not implements loopback
test mode
Example: Example:
......
...@@ -105,6 +105,10 @@ static int __devinit of_platform_serial_setup(struct platform_device *ofdev, ...@@ -105,6 +105,10 @@ static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
port->uartclk = clk; port->uartclk = clk;
port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
| UPF_FIXED_PORT | UPF_FIXED_TYPE; | UPF_FIXED_PORT | UPF_FIXED_TYPE;
if (of_find_property(np, "no-loopback-test", NULL))
port->flags |= UPF_SKIP_TEST;
port->dev = &ofdev->dev; port->dev = &ofdev->dev;
if (type == PORT_TEGRA) if (type == PORT_TEGRA)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册