All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] serial: uartps: Add modem support
@ 2019-04-01 16:37 shubhrajyoti.datta
  2019-04-01 16:37 ` [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem shubhrajyoti.datta
  2019-04-01 16:37 ` [PATCH 2/2] serial: uartps: " shubhrajyoti.datta
  0 siblings, 2 replies; 5+ messages in thread
From: shubhrajyoti.datta @ 2019-04-01 16:37 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 nomodem.
To add support for same.
 

Shubhrajyoti Datta (2):
  dt-bindings: xilinx-uartps: Add support for nomodem
  serial: uartps: Add support for nomodem

 Documentation/devicetree/bindings/serial/cdns,uart.txt |  4 ++++
 drivers/tty/serial/xilinx_uartps.c                     | 12 ++++++++++++
 2 files changed, 16 insertions(+)

-- 
2.1.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem
  2019-04-01 16:37 [PATCH 0/2] serial: uartps: Add modem support shubhrajyoti.datta
@ 2019-04-01 16:37 ` shubhrajyoti.datta
  2019-04-01 17:09   ` Greg KH
  2019-04-01 16:37 ` [PATCH 2/2] serial: uartps: " shubhrajyoti.datta
  1 sibling, 1 reply; 5+ messages in thread
From: shubhrajyoti.datta @ 2019-04-01 16:37 UTC (permalink / raw)
  To: devicetree
  Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial, Shubhrajyoti Datta

From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Vivado has a configurationo for selecting the modem control.
Add a dt binding to check for the same.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
index 227bb77..3e96619 100644
--- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
+++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
@@ -12,6 +12,10 @@ Required properties:
   See ../clocks/clock-bindings.txt for details.
 
 
+Optional properties:
+- xlnx,nomodem: The presence of this property indicates that the
+    UART does not support modem lines for RTS/CTS hardware flow control.
+
 Example:
 	uart@e0000000 {
 		compatible = "cdns,uart-r1p8";
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] serial: uartps: Add support for nomodem
  2019-04-01 16:37 [PATCH 0/2] serial: uartps: Add modem support shubhrajyoti.datta
  2019-04-01 16:37 ` [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem shubhrajyoti.datta
@ 2019-04-01 16:37 ` shubhrajyoti.datta
  1 sibling, 0 replies; 5+ messages in thread
From: shubhrajyoti.datta @ 2019-04-01 16:37 UTC (permalink / raw)
  To: devicetree
  Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial, Shubhrajyoti Datta

From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Having modem control is configurable. Add support for the same by
adding a nomodem property.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 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..3138d7e 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 nomodem;
 };
 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->nomodem)
+		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->nomodem)
+		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->nomodem = of_property_read_bool(pdev->dev.of_node,
+							"xlnx,uart-nomodem");
 	return 0;
 
 err_out_pm_disable:
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem
  2019-04-01 16:37 ` [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem shubhrajyoti.datta
@ 2019-04-01 17:09   ` Greg KH
  2019-04-02  7:11     ` Shubhrajyoti Datta
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2019-04-01 17:09 UTC (permalink / raw)
  To: shubhrajyoti.datta
  Cc: devicetree, michal.simek, jslaby, robh+dt, linux-serial,
	Shubhrajyoti Datta

On Mon, Apr 01, 2019 at 10:07:19PM +0530, shubhrajyoti.datta@gmail.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> 
> Vivado has a configurationo for selecting the modem control.
> Add a dt binding to check for the same.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
>  Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> index 227bb77..3e96619 100644
> --- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
> +++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> @@ -12,6 +12,10 @@ Required properties:
>    See ../clocks/clock-bindings.txt for details.
>  
>  
> +Optional properties:
> +- xlnx,nomodem: The presence of this property indicates that the
> +    UART does not support modem lines for RTS/CTS hardware flow control.

Shouldn't that be something like "noflowcontrol" or "nortscts"?  "modem"
has nothing to do with rts/cts flow control, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem
  2019-04-01 17:09   ` Greg KH
@ 2019-04-02  7:11     ` Shubhrajyoti Datta
  0 siblings, 0 replies; 5+ messages in thread
From: Shubhrajyoti Datta @ 2019-04-02  7:11 UTC (permalink / raw)
  To: Greg KH
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Michal Simek, jslaby, Rob Herring, linux-serial,
	Shubhrajyoti Datta

Hi Greg ,

Thanks for the review.

On Mon, Apr 1, 2019 at 11:09 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Apr 01, 2019 at 10:07:19PM +0530, shubhrajyoti.datta@gmail.com wrote:
> > From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> >
> > Vivado has a configurationo for selecting the modem control.
> > Add a dt binding to check for the same.
> >
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > ---
> >  Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > index 227bb77..3e96619 100644
> > --- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > +++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > @@ -12,6 +12,10 @@ Required properties:
> >    See ../clocks/clock-bindings.txt for details.
> >
> >
> > +Optional properties:
> > +- xlnx,nomodem: The presence of this property indicates that the
> > +    UART does not support modem lines for RTS/CTS hardware flow control.
>
> Shouldn't that be something like "noflowcontrol" or "nortscts"?  "modem"
> has nothing to do with rts/cts flow control, right?

Updated in the v2.

Thanks
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-02  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01 16:37 [PATCH 0/2] serial: uartps: Add modem support shubhrajyoti.datta
2019-04-01 16:37 ` [PATCH 1/2] dt-bindings: xilinx-uartps: Add support for nomodem shubhrajyoti.datta
2019-04-01 17:09   ` Greg KH
2019-04-02  7:11     ` Shubhrajyoti Datta
2019-04-01 16:37 ` [PATCH 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.