serial: 8250_uniphier: add auto-flow-control support

Add selective auto-flow-control support for UniPhier serial driver.

Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dai Okamura 2018-09-28 11:05:09 +09:00 committed by Greg Kroah-Hartman
parent aca70d19c8
commit aad2d4952d
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,9 @@ Required properties:
- interrupts: a single interrupt specifier.
- clocks: phandle to the input clock.
Optional properties:
-auto-flow-control: enable automatic flow control support.
Example:
aliases {
serial0 = &serial0;

View File

@ -222,6 +222,9 @@ static int uniphier_uart_probe(struct platform_device *pdev)
up.port.flags = UPF_FIXED_PORT | UPF_FIXED_TYPE;
up.capabilities = UART_CAP_FIFO;
if (of_property_read_bool(dev->of_node, "auto-flow-control"))
up.capabilities |= UART_CAP_AFE;
up.port.serial_in = uniphier_serial_in;
up.port.serial_out = uniphier_serial_out;
up.dl_read = uniphier_serial_dl_read;