* [PATCH 0/2] serial: introduce DSR handling property
@ 2016-11-22 17:14 ` Christoph Fritz
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Fritz @ 2016-11-22 17:14 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Jiri Slaby,
Geert Uytterhoeven, Arnd Bergmann
Cc: u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
This patchset introduces device-tree property "disable-dsr" including
documentation and usage.
Christoph Fritz (2):
doc: DT: add generic serial property to disable DSR
serial: imx: make DSR irq handling conditional
Documentation/devicetree/bindings/serial/serial.txt | 2 ++
drivers/tty/serial/imx.c | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] serial: introduce DSR handling property
@ 2016-11-22 17:14 ` Christoph Fritz
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Fritz @ 2016-11-22 17:14 UTC (permalink / raw)
To: linux-arm-kernel
This patchset introduces device-tree property "disable-dsr" including
documentation and usage.
Christoph Fritz (2):
doc: DT: add generic serial property to disable DSR
serial: imx: make DSR irq handling conditional
Documentation/devicetree/bindings/serial/serial.txt | 2 ++
drivers/tty/serial/imx.c | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] doc: DT: add generic serial property to disable DSR
2016-11-22 17:14 ` Christoph Fritz
@ 2016-11-22 17:14 ` Christoph Fritz
-1 siblings, 0 replies; 8+ messages in thread
From: Christoph Fritz @ 2016-11-22 17:14 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Jiri Slaby,
Geert Uytterhoeven, Arnd Bergmann
Cc: u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Introduce a generic serial property to disable DSR events which
can be necessary for buggy hardware.
Signed-off-by: Christoph Fritz <chf.fritz-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
Documentation/devicetree/bindings/serial/serial.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/serial.txt b/Documentation/devicetree/bindings/serial/serial.txt
index fd970f7..26e274e 100644
--- a/Documentation/devicetree/bindings/serial/serial.txt
+++ b/Documentation/devicetree/bindings/serial/serial.txt
@@ -25,6 +25,8 @@ Optional properties:
Note that this property is mutually-exclusive with "cts-gpios" and
"rts-gpios" above.
+ - disable-dsr: The presence of this property disables DSR events reporting.
+
Examples:
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] doc: DT: add generic serial property to disable DSR
@ 2016-11-22 17:14 ` Christoph Fritz
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Fritz @ 2016-11-22 17:14 UTC (permalink / raw)
To: linux-arm-kernel
Introduce a generic serial property to disable DSR events which
can be necessary for buggy hardware.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
Documentation/devicetree/bindings/serial/serial.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/serial.txt b/Documentation/devicetree/bindings/serial/serial.txt
index fd970f7..26e274e 100644
--- a/Documentation/devicetree/bindings/serial/serial.txt
+++ b/Documentation/devicetree/bindings/serial/serial.txt
@@ -25,6 +25,8 @@ Optional properties:
Note that this property is mutually-exclusive with "cts-gpios" and
"rts-gpios" above.
+ - disable-dsr: The presence of this property disables DSR events reporting.
+
Examples:
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] serial: imx: make DSR irq handling conditional
2016-11-22 17:14 ` Christoph Fritz
@ 2016-11-22 17:14 ` Christoph Fritz
-1 siblings, 0 replies; 8+ messages in thread
From: Christoph Fritz @ 2016-11-22 17:14 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Jiri Slaby,
Geert Uytterhoeven, Arnd Bergmann
Cc: u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
This patch makes use of device-tree property disable-dsr. Disabling
DSR can be necessary on i.MX6SX to quirk buggy hardware, for more
info see commit 276b891e3879 ("ARM: dts: imx6sx: document SION
necessity of ENET1_REF_CLK1").
Signed-off-by: Christoph Fritz <chf.fritz-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
drivers/tty/serial/imx.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 0df2b1c..bd85a69a4 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -207,6 +207,7 @@ struct imx_port {
unsigned int dte_mode:1;
unsigned int irda_inv_rx:1;
unsigned int irda_inv_tx:1;
+ unsigned int dsr:1;
unsigned short trcv_delay; /* transceiver delay */
struct clk *clk_ipg;
struct clk *clk_per;
@@ -1219,7 +1220,8 @@ static int imx_startup(struct uart_port *port)
/*
* Finally, clear and enable interrupts
*/
- writel(USR1_RTSD | USR1_DTRD, sport->port.membase + USR1);
+ temp = USR1_RTSD | (sport->dsr ? USR1_DTRD : 0);
+ writel(temp, sport->port.membase + USR1);
writel(USR2_ORE, sport->port.membase + USR2);
if (sport->dma_is_inited && !sport->dma_is_enabled)
@@ -1259,7 +1261,7 @@ static int imx_startup(struct uart_port *port)
* now, too.
*/
temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP |
- UCR3_DTRDEN | UCR3_RI | UCR3_DCD;
+ (sport->dsr ? UCR3_DTRDEN : 0) | UCR3_RI | UCR3_DCD;
if (sport->dte_mode)
temp &= ~(UCR3_RI | UCR3_DCD);
@@ -1987,6 +1989,9 @@ static int serial_imx_probe_dt(struct imx_port *sport,
if (of_get_property(np, "fsl,dte-mode", NULL))
sport->dte_mode = 1;
+ if (!of_property_read_bool(np, "disable-dsr"))
+ sport->dsr = 1;
+
return 0;
}
#else
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] serial: imx: make DSR irq handling conditional
@ 2016-11-22 17:14 ` Christoph Fritz
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Fritz @ 2016-11-22 17:14 UTC (permalink / raw)
To: linux-arm-kernel
This patch makes use of device-tree property disable-dsr. Disabling
DSR can be necessary on i.MX6SX to quirk buggy hardware, for more
info see commit 276b891e3879 ("ARM: dts: imx6sx: document SION
necessity of ENET1_REF_CLK1").
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
drivers/tty/serial/imx.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 0df2b1c..bd85a69a4 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -207,6 +207,7 @@ struct imx_port {
unsigned int dte_mode:1;
unsigned int irda_inv_rx:1;
unsigned int irda_inv_tx:1;
+ unsigned int dsr:1;
unsigned short trcv_delay; /* transceiver delay */
struct clk *clk_ipg;
struct clk *clk_per;
@@ -1219,7 +1220,8 @@ static int imx_startup(struct uart_port *port)
/*
* Finally, clear and enable interrupts
*/
- writel(USR1_RTSD | USR1_DTRD, sport->port.membase + USR1);
+ temp = USR1_RTSD | (sport->dsr ? USR1_DTRD : 0);
+ writel(temp, sport->port.membase + USR1);
writel(USR2_ORE, sport->port.membase + USR2);
if (sport->dma_is_inited && !sport->dma_is_enabled)
@@ -1259,7 +1261,7 @@ static int imx_startup(struct uart_port *port)
* now, too.
*/
temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP |
- UCR3_DTRDEN | UCR3_RI | UCR3_DCD;
+ (sport->dsr ? UCR3_DTRDEN : 0) | UCR3_RI | UCR3_DCD;
if (sport->dte_mode)
temp &= ~(UCR3_RI | UCR3_DCD);
@@ -1987,6 +1989,9 @@ static int serial_imx_probe_dt(struct imx_port *sport,
if (of_get_property(np, "fsl,dte-mode", NULL))
sport->dte_mode = 1;
+ if (!of_property_read_bool(np, "disable-dsr"))
+ sport->dsr = 1;
+
return 0;
}
#else
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] serial: introduce DSR handling property
2016-11-22 17:14 ` Christoph Fritz
@ 2016-11-22 19:09 ` Uwe Kleine-König
-1 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2016-11-22 19:09 UTC (permalink / raw)
To: Christoph Fritz
Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Jiri Slaby,
Geert Uytterhoeven, Arnd Bergmann,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Tue, Nov 22, 2016 at 06:14:09PM +0100, Christoph Fritz wrote:
> This patchset introduces device-tree property "disable-dsr" including
> documentation and usage.
>
> Christoph Fritz (2):
> doc: DT: add generic serial property to disable DSR
I'd add the documentation for all handshaking lines, not only dsr. And
I'd call it disable-hw-dsr, otherwise
{
disable-dsr;
dsr-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
}
looks strange. (Not 100% sure this would make sense, but I think it
does.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] serial: introduce DSR handling property
@ 2016-11-22 19:09 ` Uwe Kleine-König
0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2016-11-22 19:09 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 22, 2016 at 06:14:09PM +0100, Christoph Fritz wrote:
> This patchset introduces device-tree property "disable-dsr" including
> documentation and usage.
>
> Christoph Fritz (2):
> doc: DT: add generic serial property to disable DSR
I'd add the documentation for all handshaking lines, not only dsr. And
I'd call it disable-hw-dsr, otherwise
{
disable-dsr;
dsr-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
}
looks strange. (Not 100% sure this would make sense, but I think it
does.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-11-22 19:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 17:14 [PATCH 0/2] serial: introduce DSR handling property Christoph Fritz
2016-11-22 17:14 ` Christoph Fritz
[not found] ` <1479834851-32442-1-git-send-email-chf.fritz-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-11-22 17:14 ` [PATCH 1/2] doc: DT: add generic serial property to disable DSR Christoph Fritz
2016-11-22 17:14 ` Christoph Fritz
2016-11-22 17:14 ` [PATCH 2/2] serial: imx: make DSR irq handling conditional Christoph Fritz
2016-11-22 17:14 ` Christoph Fritz
2016-11-22 19:09 ` [PATCH 0/2] serial: introduce DSR handling property Uwe Kleine-König
2016-11-22 19:09 ` Uwe Kleine-König
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.