* [PATCHv3 0/2] serial: uartps: Make flowcontrol configurable
@ 2019-04-09 7:45 shubhrajyoti.datta
2019-04-09 7:45 ` [PATCHv3 1/2] dt-bindings: xilinx-uartps: Add support for cts-override shubhrajyoti.datta
2019-04-09 7:45 ` [PATCHv3 2/2] serial: uartps: " shubhrajyoti.datta
0 siblings, 2 replies; 4+ messages in thread
From: shubhrajyoti.datta @ 2019-04-09 7:45 UTC (permalink / raw)
To: devicetree
Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial, Shubhrajyoti Datta
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Add support for making flow control configurable.
To add support for same.
changes from v2:
Update the name of the binding
Shubhrajyoti Datta (2):
dt-bindings: xilinx-uartps: Add support for cts-override
serial: uartps: Add support for cts-override
Documentation/devicetree/bindings/serial/cdns,uart.txt | 5 +++++
drivers/tty/serial/xilinx_uartps.c | 12 ++++++++++++
2 files changed, 17 insertions(+)
--
2.1.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCHv3 1/2] dt-bindings: xilinx-uartps: Add support for cts-override
2019-04-09 7:45 [PATCHv3 0/2] serial: uartps: Make flowcontrol configurable shubhrajyoti.datta
@ 2019-04-09 7:45 ` shubhrajyoti.datta
2019-04-26 14:04 ` Rob Herring
2019-04-09 7:45 ` [PATCHv3 2/2] serial: uartps: " shubhrajyoti.datta
1 sibling, 1 reply; 4+ messages in thread
From: shubhrajyoti.datta @ 2019-04-09 7:45 UTC (permalink / raw)
To: devicetree
Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial, Shubhrajyoti Datta
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Flow control is configurable in xilinx-uartps
Add a dt binding to check for the same.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
v2:
Change the node binding name as suggested Rob.
Documentation/devicetree/bindings/serial/cdns,uart.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
index 227bb77..4efc560 100644
--- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
+++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
@@ -12,6 +12,11 @@ Required properties:
See ../clocks/clock-bindings.txt for details.
+Optional properties:
+- cts-override : Override the CTS modem status signal. This signal will
+ always be reported as active instead of being obtained from the modem status
+ register. Define this if your serial port does not use this pin
+
Example:
uart@e0000000 {
compatible = "cdns,uart-r1p8";
--
2.1.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCHv3 2/2] serial: uartps: Add support for cts-override
2019-04-09 7:45 [PATCHv3 0/2] serial: uartps: Make flowcontrol configurable shubhrajyoti.datta
2019-04-09 7:45 ` [PATCHv3 1/2] dt-bindings: xilinx-uartps: Add support for cts-override shubhrajyoti.datta
@ 2019-04-09 7:45 ` shubhrajyoti.datta
1 sibling, 0 replies; 4+ messages in thread
From: shubhrajyoti.datta @ 2019-04-09 7:45 UTC (permalink / raw)
To: devicetree
Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial, Shubhrajyoti Datta
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Having flow is configurable. Add support for the same by
checking for cts-override.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
v3:
Update the name to cts-override.
drivers/tty/serial/xilinx_uartps.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 9a7f943..75e1027 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -193,6 +193,7 @@ struct cdns_uart {
int id;
struct notifier_block clk_rate_change_nb;
u32 quirks;
+ bool cts_override;
};
struct cdns_platform_data {
u32 quirks;
@@ -1004,6 +1005,11 @@ static void cdns_uart_config_port(struct uart_port *port, int flags)
*/
static unsigned int cdns_uart_get_mctrl(struct uart_port *port)
{
+ struct cdns_uart *cdns_uart_data = port->private_data;
+
+ if (cdns_uart_data->cts_override)
+ return 0;
+
return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
}
@@ -1011,6 +1017,10 @@ static void cdns_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
{
u32 val;
u32 mode_reg;
+ struct cdns_uart *cdns_uart_data = port->private_data;
+
+ if (cdns_uart_data->cts_override)
+ return;
val = readl(port->membase + CDNS_UART_MODEMCR);
mode_reg = readl(port->membase + CDNS_UART_MR);
@@ -1669,6 +1679,8 @@ static int cdns_uart_probe(struct platform_device *pdev)
console_port = NULL;
#endif
+ cdns_uart_data->cts_override = of_property_read_bool(pdev->dev.of_node,
+ "cts-override");
return 0;
err_out_pm_disable:
--
2.1.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCHv3 1/2] dt-bindings: xilinx-uartps: Add support for cts-override
2019-04-09 7:45 ` [PATCHv3 1/2] dt-bindings: xilinx-uartps: Add support for cts-override shubhrajyoti.datta
@ 2019-04-26 14:04 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-04-26 14:04 UTC (permalink / raw)
To: Shubhrajyoti Datta
Cc: devicetree, Michal Simek, Greg Kroah-Hartman, Jiri Slaby,
open list:SERIAL DRIVERS, Shubhrajyoti Datta
On Tue, Apr 9, 2019 at 2:45 AM <shubhrajyoti.datta@gmail.com> wrote:
>
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>
> Flow control is configurable in xilinx-uartps
> Add a dt binding to check for the same.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
> v2:
> Change the node binding name as suggested Rob.
>
> Documentation/devicetree/bindings/serial/cdns,uart.txt | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-26 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 7:45 [PATCHv3 0/2] serial: uartps: Make flowcontrol configurable shubhrajyoti.datta
2019-04-09 7:45 ` [PATCHv3 1/2] dt-bindings: xilinx-uartps: Add support for cts-override shubhrajyoti.datta
2019-04-26 14:04 ` Rob Herring
2019-04-09 7:45 ` [PATCHv3 2/2] serial: uartps: " shubhrajyoti.datta
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.