Linux Serial subsystem development
 help / color / mirror / Atom feed
* Re: [PATCH 04/11] serial: sunsu: constify uart_ops structures
From: David Miller @ 2017-08-14  3:12 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: bhumirks, kernel-janitors, gregkh, jslaby, sparclinux,
	linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-5-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 13 Aug 2017 08:21:43 +0200

> These uart_ops structures are only stored in the ops field of a
> uart_port structure and this fields is const, so the uart_ops
> structures can also be const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH 03/11] serial: sunsab: constify uart_ops structures
From: David Miller @ 2017-08-14  3:12 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: bhumirks, kernel-janitors, gregkh, jslaby, sparclinux,
	linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-4-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 13 Aug 2017 08:21:42 +0200

> These uart_ops structures are only stored in the ops field of a
> uart_port structure and this fields is const, so the uart_ops
> structures can also be const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* [PATCH repost] serial: sh-sci: use of_property_read_bool()
From: Sergei Shtylyov @ 2017-08-13 19:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-serial
  Cc: linux-renesas-soc, linux-sh, Sergei Shtylyov

[-- Attachment #1: serial-sh-sci-use-of_property_read_bool.patch --]
[-- Type: text/plain, Size: 924 bytes --]

Use more compact of_property_read_bool() call for a boolean property
instead  of of_find_property() call in sci_parse_dt().

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.

Reposting as the previous posting dropped Greg's and Jiri's emails...

 drivers/tty/serial/sh-sci.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: tty/drivers/tty/serial/sh-sci.c
===================================================================
--- tty.orig/drivers/tty/serial/sh-sci.c
+++ tty/drivers/tty/serial/sh-sci.c
@@ -3073,8 +3073,7 @@ static struct plat_sci_port *sci_parse_d
 	p->type = SCI_OF_TYPE(match->data);
 	p->regtype = SCI_OF_REGTYPE(match->data);
 
-	if (of_find_property(np, "uart-has-rtscts", NULL))
-		sp->has_rtscts = true;
+	sp->has_rtscts = of_property_read_bool(np, "uart-has-rtscts");
 
 	return p;
 }


^ permalink raw reply

* [PATCH] serial: sh-sci: use of_property_read_bool()
From: Sergei Shtylyov @ 2017-08-13 19:07 UTC (permalink / raw)
  To: "open list:SERIAL DRIVERS"
  Cc: linux-renesas-soc, linux-sh, Sergei Shtylyov

[-- Attachment #1: serial-sh-sci-use-of_property_read_bool.patch --]
[-- Type: text/plain, Size: 852 bytes --]

Use more compact of_property_read_bool() call for a boolean property
instead  of of_find_property() call in sci_parse_dt().

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.

 drivers/tty/serial/sh-sci.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: tty/drivers/tty/serial/sh-sci.c
===================================================================
--- tty.orig/drivers/tty/serial/sh-sci.c
+++ tty/drivers/tty/serial/sh-sci.c
@@ -3073,8 +3073,7 @@ static struct plat_sci_port *sci_parse_d
 	p->type = SCI_OF_TYPE(match->data);
 	p->regtype = SCI_OF_REGTYPE(match->data);
 
-	if (of_find_property(np, "uart-has-rtscts", NULL))
-		sp->has_rtscts = true;
+	sp->has_rtscts = of_property_read_bool(np, "uart-has-rtscts");
 
 	return p;
 }

^ permalink raw reply

* [PATCH 11/11] serial: mux: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/mux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index 8a4be4b..940ea40 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -427,7 +427,7 @@ static int mux_console_setup(struct console *co, char *options)
 #define MUX_CONSOLE	NULL
 #endif
 
-static struct uart_ops mux_pops = {
+static const struct uart_ops mux_pops = {
 	.tx_empty =		mux_tx_empty,
 	.set_mctrl =		mux_set_mctrl,
 	.get_mctrl =		mux_get_mctrl,

^ permalink raw reply related

* [PATCH 10/11] serial: mpc52xx: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/mpc52xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index 4cacaad..791c4c7 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -1347,7 +1347,7 @@ static u8 mpc5125_psc_get_mr1(struct uart_port *port)
 }
 
 
-static struct uart_ops mpc52xx_uart_ops = {
+static const struct uart_ops mpc52xx_uart_ops = {
 	.tx_empty	= mpc52xx_uart_tx_empty,
 	.set_mctrl	= mpc52xx_uart_set_mctrl,
 	.get_mctrl	= mpc52xx_uart_get_mctrl,

^ permalink raw reply related

* [PATCH 09/11] serial: m32r_sio: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/m32r_sio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c
index 218b711..5b3bd95 100644
--- a/drivers/tty/serial/m32r_sio.c
+++ b/drivers/tty/serial/m32r_sio.c
@@ -854,7 +854,7 @@ static void m32r_sio_config_port(struct uart_port *port, int unused)
 	return 0;
 }
 
-static struct uart_ops m32r_sio_pops = {
+static const struct uart_ops m32r_sio_pops = {
 	.tx_empty	= m32r_sio_tx_empty,
 	.set_mctrl	= m32r_sio_set_mctrl,
 	.get_mctrl	= m32r_sio_get_mctrl,

^ permalink raw reply related

* [PATCH 08/11] serial: cpm_uart: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index f6bcc19..9ac142c 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -1123,7 +1123,7 @@ static void cpm_put_poll_char(struct uart_port *port,
 }
 #endif /* CONFIG_CONSOLE_POLL */
 
-static struct uart_ops cpm_uart_pops = {
+static const struct uart_ops cpm_uart_pops = {
 	.tx_empty	= cpm_uart_tx_empty,
 	.set_mctrl	= cpm_uart_set_mctrl,
 	.get_mctrl	= cpm_uart_get_mctrl,

^ permalink raw reply related

* [PATCH 07/11] serial: apbuart: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/apbuart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index 75eb083..dd60ed9 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -325,7 +325,7 @@ static int apbuart_verify_port(struct uart_port *port,
 	return ret;
 }
 
-static struct uart_ops grlib_apbuart_ops = {
+static const struct uart_ops grlib_apbuart_ops = {
 	.tx_empty = apbuart_tx_empty,
 	.set_mctrl = apbuart_set_mctrl,
 	.get_mctrl = apbuart_get_mctrl,

^ permalink raw reply related

* [PATCH 06/11] serial: 21285: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/21285.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c
index 9b208bd..804632b 100644
--- a/drivers/tty/serial/21285.c
+++ b/drivers/tty/serial/21285.c
@@ -334,7 +334,7 @@ static int serial21285_verify_port(struct uart_port *port, struct serial_struct
 	return ret;
 }
 
-static struct uart_ops serial21285_ops = {
+static const struct uart_ops serial21285_ops = {
 	.tx_empty	= serial21285_tx_empty,
 	.get_mctrl	= serial21285_get_mctrl,
 	.set_mctrl	= serial21285_set_mctrl,

^ permalink raw reply related

* [PATCH 05/11] serial: uuc_uart: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Timur Tabi
  Cc: bhumirks, kernel-janitors, Greg Kroah-Hartman, Jiri Slaby,
	linuxppc-dev, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/ucc_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 481eb29..55b7027 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1085,7 +1085,7 @@ static int qe_uart_verify_port(struct uart_port *port,
  *
  * Details on these functions can be found in Documentation/serial/driver
  */
-static struct uart_ops qe_uart_pops = {
+static const struct uart_ops qe_uart_pops = {
 	.tx_empty       = qe_uart_tx_empty,
 	.set_mctrl      = qe_uart_set_mctrl,
 	.get_mctrl      = qe_uart_get_mctrl,

^ permalink raw reply related

* [PATCH 04/11] serial: sunsu: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: David S. Miller
  Cc: bhumirks, kernel-janitors, Greg Kroah-Hartman, Jiri Slaby,
	sparclinux, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/sunsu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 5380407..95d34d7 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -958,7 +958,7 @@ static void sunsu_config_port(struct uart_port *port, int flags)
 	return uart_config[type].name;
 }
 
-static struct uart_ops sunsu_pops = {
+static const struct uart_ops sunsu_pops = {
 	.tx_empty	= sunsu_tx_empty,
 	.set_mctrl	= sunsu_set_mctrl,
 	.get_mctrl	= sunsu_get_mctrl,

^ permalink raw reply related

* [PATCH 03/11] serial: sunsab: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: David S. Miller
  Cc: bhumirks, kernel-janitors, Greg Kroah-Hartman, Jiri Slaby,
	sparclinux, linux-serial, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/sunsab.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index b5e3195..653a076 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -819,7 +819,7 @@ static int sunsab_verify_port(struct uart_port *port, struct serial_struct *ser)
 	return -EINVAL;
 }
 
-static struct uart_ops sunsab_pops = {
+static const struct uart_ops sunsab_pops = {
 	.tx_empty	= sunsab_tx_empty,
 	.set_mctrl	= sunsab_set_mctrl,
 	.get_mctrl	= sunsab_get_mctrl,

^ permalink raw reply related

* [PATCH 02/11] serial: owl: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: bhumirks, kernel-janitors, Jiri Slaby, Andreas Färber,
	linux-serial, linux-arm-kernel, linux-kernel
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/owl-uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c
index 683b054..b9c85936 100644
--- a/drivers/tty/serial/owl-uart.c
+++ b/drivers/tty/serial/owl-uart.c
@@ -473,7 +473,7 @@ static void owl_uart_config_port(struct uart_port *port, int flags)
 	}
 }
 
-static struct uart_ops owl_uart_ops = {
+static const struct uart_ops owl_uart_ops = {
 	.set_mctrl = owl_uart_set_mctrl,
 	.get_mctrl = owl_uart_get_mctrl,
 	.tx_empty = owl_uart_tx_empty,

^ permalink raw reply related

* [PATCH 01/11] serial: meson: constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Kevin Hilman, kernel-janitors, linux-kernel, linux-arm-kernel,
	linux-serial, Jiri Slaby, Carlo Caione, linux-amlogic, bhumirks
In-Reply-To: <1502605310-4314-1-git-send-email-Julia.Lawall@lip6.fr>

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/tty/serial/meson_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 42e4a4c..07c0f98 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -424,7 +424,7 @@ static void meson_uart_config_port(struct uart_port *port, int flags)
 	}
 }
 
-static struct uart_ops meson_uart_ops = {
+static const struct uart_ops meson_uart_ops = {
 	.set_mctrl      = meson_uart_set_mctrl,
 	.get_mctrl      = meson_uart_get_mctrl,
 	.tx_empty	= meson_uart_tx_empty,

^ permalink raw reply related

* [PATCH 00/11] constify uart_ops structures
From: Julia Lawall @ 2017-08-13  6:21 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: bhumirks, kernel-janitors, linux-kernel, linux-serial, Jiri Slaby,
	Greg Kroah-Hartman, linux-arm-kernel, linux-amlogic

These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.

Done with the help of Coccinelle.

---

 drivers/tty/serial/21285.c                  |    2 +-
 drivers/tty/serial/apbuart.c                |    2 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |    2 +-
 drivers/tty/serial/m32r_sio.c               |    2 +-
 drivers/tty/serial/meson_uart.c             |    2 +-
 drivers/tty/serial/mpc52xx_uart.c           |    2 +-
 drivers/tty/serial/mux.c                    |    2 +-
 drivers/tty/serial/owl-uart.c               |    2 +-
 drivers/tty/serial/sunsab.c                 |    2 +-
 drivers/tty/serial/sunsu.c                  |    2 +-
 drivers/tty/serial/ucc_uart.c               |    2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

^ permalink raw reply

* [GIT PULL] TTY/Serial fixes for 4.13-rc5
From: Greg KH @ 2017-08-13  2:20 UTC (permalink / raw)
  To: Linus Torvalds, Jiri Slaby
  Cc: Stephen Rothwell, Andrew Morton, linux-kernel, linux-serial

The following changes since commit 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9:

  Linux 4.13-rc2 (2017-07-23 16:15:17 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/ tags/tty-4.13-rc5

for you to fetch changes up to 9527b82ae3af1ebf465506868fb55e7f862cd9da:

  Revert "serial: Delete dead code for CIR serial ports" (2017-08-01 09:50:18 -0700)

----------------------------------------------------------------
tty/serial fixes for 4.13-rc5

Here are two tty serial driver fixes for 4.13-rc5.  One is a revert of a
-rc1 patch that turned out to not be a good idea, and the other is a fix
for the pl011 serial driver.

Both have been in linux-next with no reported issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

----------------------------------------------------------------
Sean Young (1):
      Revert "serial: Delete dead code for CIR serial ports"

Timur Tabi (1):
      tty: pl011: fix initialization order of QDF2400 E44

 drivers/acpi/spcr.c                 | 36 ++++++++++++++++++++++++++++++++++--
 drivers/tty/serial/8250/8250_core.c | 23 +++++++++++++++++------
 drivers/tty/serial/amba-pl011.c     | 37 +++++++++++++++++++------------------
 include/linux/acpi.h                |  1 +
 4 files changed, 71 insertions(+), 26 deletions(-)

^ permalink raw reply

* Re: [PATCH] serial: imx: Improve PIO prevention if TX DMA has been started
From: Clemens Gruber @ 2017-08-12 22:07 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-serial, Greg Kroah-Hartman, Fabio Estevam, linux-kernel,
	Ian Jamison
In-Reply-To: <20170812195451.2g65wifawouz4t7d@pengutronix.de>

On Sat, Aug 12, 2017 at 09:54:51PM +0200, Uwe Kleine-König wrote:
> On Sat, Aug 12, 2017 at 05:12:10PM +0200, Clemens Gruber wrote:
> > The imx_transmit_buffer function should return if TX DMA has already
> > been started and not just skip over the buffer PIO write loop. (Which
> > did fix the initial problem, but could have unintentional side-effects)
> > 
> > Tested on an i.MX6Q board with half-duplex RS-485 and with RS-232.
> > 
> > Cc: Ian Jamison <ian.dev@arkver.com>
> > Cc: Uwe-Kleine König <u.kleine-koenig@pengutronix.de>
> > Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a
> > DMA has been started")
> 
> AFAIK no newline in the Fixes: line.

Thanks. A checkpatch warning for this would be great.

> 
> > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > ---
> >  drivers/tty/serial/imx.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> > index 80934e7bd67f..fce538eb8c77 100644
> > --- a/drivers/tty/serial/imx.c
> > +++ b/drivers/tty/serial/imx.c
> > @@ -452,13 +452,14 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
> >  		if (sport->dma_is_txing) {
> >  			temp |= UCR1_TDMAEN;
> >  			writel(temp, sport->port.membase + UCR1);
> > +			return;
> >  		} else {
> >  			writel(temp, sport->port.membase + UCR1);
> >  			imx_dma_tx(sport);
> >  		}
> 
> Shouldn't the return go here?

Yes, it can also go here (and probably should). The problem of
xmit->tail jumping over xmit->head occurs only if we are already DMA
txing and then go into the PIO loop, but not the first time after
calling imx_dma_tx. That's why the v1 passed the tests too.
I'll have to conduct a few more tests and if they succeed I'll send a
v2 where we return in both cases (already txing and starting to).

> Did you understand the problem? Can you say why this only hurts in RS485
> half-duplex but not (as it seems) in regular rs232 mode?

I am not sure anyone understands (yet) why it a) only hurts RS-485 and
b) only occurs on SMP systems.
If you have more insight, please share it. :)

Cheers,
Clemens

^ permalink raw reply

* Re: [PATCH] serial: imx: Improve PIO prevention if TX DMA has been started
From: Uwe Kleine-König @ 2017-08-12 19:54 UTC (permalink / raw)
  To: Clemens Gruber
  Cc: linux-serial, Greg Kroah-Hartman, Fabio Estevam, linux-kernel,
	Ian Jamison
In-Reply-To: <20170812151210.10420-1-clemens.gruber@pqgruber.com>

On Sat, Aug 12, 2017 at 05:12:10PM +0200, Clemens Gruber wrote:
> The imx_transmit_buffer function should return if TX DMA has already
> been started and not just skip over the buffer PIO write loop. (Which
> did fix the initial problem, but could have unintentional side-effects)
> 
> Tested on an i.MX6Q board with half-duplex RS-485 and with RS-232.
> 
> Cc: Ian Jamison <ian.dev@arkver.com>
> Cc: Uwe-Kleine König <u.kleine-koenig@pengutronix.de>
> Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a
> DMA has been started")

AFAIK no newline in the Fixes: line.

> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> ---
>  drivers/tty/serial/imx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 80934e7bd67f..fce538eb8c77 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -452,13 +452,14 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
>  		if (sport->dma_is_txing) {
>  			temp |= UCR1_TDMAEN;
>  			writel(temp, sport->port.membase + UCR1);
> +			return;
>  		} else {
>  			writel(temp, sport->port.membase + UCR1);
>  			imx_dma_tx(sport);
>  		}

Shouldn't the return go here?

Did you understand the problem? Can you say why this only hurts in RS485
half-duplex but not (as it seems) in regular rs232 mode?

>  	}
>  
> -	while (!uart_circ_empty(xmit) && !sport->dma_is_txing &&
> +	while (!uart_circ_empty(xmit) &&
>  	       !(readl(sport->port.membase + uts_reg(sport)) & UTS_TXFULL)) {
>  		/* send xmit->buf[xmit->tail]
>  		 * out the port here */

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply

* [PATCH] serial: imx: Improve PIO prevention if TX DMA has been started
From: Clemens Gruber @ 2017-08-12 15:12 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Fabio Estevam, linux-kernel, Clemens Gruber,
	Ian Jamison, Uwe-Kleine König

The imx_transmit_buffer function should return if TX DMA has already
been started and not just skip over the buffer PIO write loop. (Which
did fix the initial problem, but could have unintentional side-effects)

Tested on an i.MX6Q board with half-duplex RS-485 and with RS-232.

Cc: Ian Jamison <ian.dev@arkver.com>
Cc: Uwe-Kleine König <u.kleine-koenig@pengutronix.de>
Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a
DMA has been started")
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 drivers/tty/serial/imx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 80934e7bd67f..fce538eb8c77 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -452,13 +452,14 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
 		if (sport->dma_is_txing) {
 			temp |= UCR1_TDMAEN;
 			writel(temp, sport->port.membase + UCR1);
+			return;
 		} else {
 			writel(temp, sport->port.membase + UCR1);
 			imx_dma_tx(sport);
 		}
 	}
 
-	while (!uart_circ_empty(xmit) && !sport->dma_is_txing &&
+	while (!uart_circ_empty(xmit) &&
 	       !(readl(sport->port.membase + uts_reg(sport)) & UTS_TXFULL)) {
 		/* send xmit->buf[xmit->tail]
 		 * out the port here */
-- 
2.14.1

^ permalink raw reply related

* Re: [PATCH 000/102] Convert drivers to explicit reset API
From: Wolfram Sang @ 2017-08-12 11:43 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Andrew Lunn, Prashant Gaikwad, Heiko Stuebner, Peter Chen,
	Linus Walleij, DRI, Marc Dietrich, Rakesh Iyer,
	Peter Meerwald-Stadler, linux-clk, Xinliang Liu, Chanwoo Choi,
	Alan Stern, Jiri Slaby, Michael Turquette, Guenter Roeck,
	Ohad Ben-Cohen, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Thomas Gleixner, Vincent Abriou, Bin Liu, Greg Kroah-Hartman,
	USB list
In-Reply-To: <1500885221.2391.50.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 378 bytes --]


> Thanks for the hint and the references. It seems this turned out okay,
> but I wouldn't dare to introduce such macro horror^Wmagic.
> I'd rather have all users converted to the _exclusive/_shared function
> calls and maybe then replace the internal __reset_control_get with
> Thomas' suggestion.

I didn't follow the discussion closely. Shall I still apply the i2c
patches?


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: serial: Add MediaTek BTIF controller bindings
From: Rob Herring @ 2017-08-11 14:31 UTC (permalink / raw)
  To: Sean Wang
  Cc: Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko, Jan Kiszka,
	Heikki Krogerus, Peter H, Vignesh R, Matthias Brugger,
	devicetree@vger.kernel.org, linux-mediatek,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1502419988.19230.16.camel@mtkswgap22>

On Thu, Aug 10, 2017 at 9:53 PM, Sean Wang <sean.wang@mediatek.com> wrote:
> On Thu, 2017-08-10 at 11:27 -0500, Rob Herring wrote:
>> On Thu, Aug 03, 2017 at 01:05:22AM +0800, sean.wang@mediatek.com wrote:
>> > From: Sean Wang <sean.wang@mediatek.com>
>> >
>> > Document the devicetree bindings for MediaTek BTIF controller
>> > which could be found on MT7622 and MT7623 SoC.
>> >
>> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>> > ---
>> >  .../devicetree/bindings/serial/mtk-btif.txt        | 26 ++++++++++++++++++++++
>> >  1 file changed, 26 insertions(+)
>> >  create mode 100644 Documentation/devicetree/bindings/serial/mtk-btif.txt
>> >
>> > diff --git a/Documentation/devicetree/bindings/serial/mtk-btif.txt b/Documentation/devicetree/bindings/serial/mtk-btif.txt
>> > new file mode 100644
>> > index 0000000..80c1f5a
>> > --- /dev/null
>> > +++ b/Documentation/devicetree/bindings/serial/mtk-btif.txt
>> > @@ -0,0 +1,26 @@
>> > +Device-Tree bindings for MediaTek BTIF controller found on those
>> > +MediaTek SoCs with Bluetooth feature
>> > +
>> > +Required properties:
>> > +- compatible: Should be one of:
>> > +   - "mediatek,mt7622-btif" : for MT7622 SoC
>> > +   - "mediatek,mt7623-btif" : for MT7623 SoC
>> > +- reg: The base address of the BTIF register bank;
>> > +- interrupts: A single interrupt specifier;
>> > +- clocks: list of clock specifiers, corresponding to
>> > +     entries in clock-names property;
>> > +- clock-names: should contain "main" entries.
>> > +
>> > +Optional properties:
>> > +- mediatek,loopback: Boolean; if defined, indicates that BTIF controller
>> > +   running on the loopback mode.
>>
>> I don't think this belongs in DT, but should be a module param or sysfs
>> control.
>>
> the loopback actually is one of hardware setups so i add it as one
> property in the dt or could you kindly guide me how to make judgment
> accurately for listing those changes as either dt or a module param?

It's just a debug mode, right? Generally a user shouldn't have to
modify the DT to change settings. Only if you wanted a given board to
always be in loopback would this make sense in DT.

>> > +
>> > +Example:
>> > +
>> > +   btif: btif@1100c000 {
>>
>> bluetooth@...
>>
> btif not bluetooth, which is just the interface hardware allowing the
> the main processor communicating with the bluetooth hardware built in
> the SoC, and is really like to the uart used by legacy bluetooth.
> So i will add bluetooth as the another node.

Right, I realized that after writing this. It should be "serial@..." instead.

>
>
>> > +           compatible = "mediatek,mt7623-btif";
>> > +           reg = <0 0x1100c000 0 0x1000>;
>> > +           interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
>> > +           clocks = <&pericfg CLK_PERI_BTIF>;
>> > +           clock-names = "main";
>> > +   };
>> > --
>> > 2.7.4
>> >
>
>

^ permalink raw reply

* Re: [PATCH v2 2/2] Introduce 8250_men_mcb
From: Johannes Thumshirn @ 2017-08-11 13:13 UTC (permalink / raw)
  To: Michael Moese
  Cc: gregkh, jslaby, linux-serial, linux-kernel, johannes.thumshirn
In-Reply-To: <20170802075853.18911-2-michael.moese@men.de>

On Wed, Aug 02, 2017 at 09:58:53AM +0200, Michael Moese wrote:
> This patch introduces the 8250_men_mcb driver for the MEN 16Z125
> IP-Core. This is a 16550-type UART with a 60 byte FIFO.
> Due to strange old hardware, every board using this IP core requires
> different values for uartclk. A reasonable default is included in
> addition to the support of three boards. Additional values for other
> boards will be added later.
> 
> This v2 has some whitespace fixes, I screwed this up yesterday.

Nit: this should go below the '---' marker.

Apart from that,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply

* [PATCH] tty: amba-pl011: constify vendor_data structures
From: Julia Lawall @ 2017-08-11 11:47 UTC (permalink / raw)
  To: Russell King
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel, Bhumika Goyal

These vendor_data structures are only stored in the vendor field of
the uart_amba_port structure, as defined in the same file, and this
field is declared as const.  Thus the vendor_data structures can be
const too.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---

There are some other vendor_data structures in the same file, but
they are used in a different way.

 drivers/tty/serial/amba-pl011.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 1888d16..ba4e795 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -128,7 +128,7 @@ static unsigned int get_fifosize_arm(struct amba_device *dev)
 	.get_fifosize		= get_fifosize_arm,
 };
 
-static struct vendor_data vendor_sbsa = {
+static const struct vendor_data vendor_sbsa = {
 	.reg_offset		= pl011_std_offsets,
 	.fr_busy		= UART01x_FR_BUSY,
 	.fr_dsr			= UART01x_FR_DSR,
@@ -143,7 +143,7 @@ static unsigned int get_fifosize_arm(struct amba_device *dev)
 };
 
 #ifdef CONFIG_ACPI_SPCR_TABLE
-static struct vendor_data vendor_qdt_qdf2400_e44 = {
+static const struct vendor_data vendor_qdt_qdf2400_e44 = {
 	.reg_offset		= pl011_std_offsets,
 	.fr_busy		= UART011_FR_TXFE,
 	.fr_dsr			= UART01x_FR_DSR,


^ permalink raw reply related

* Re: [PATCH 1/2] dt-bindings: serial: Add MediaTek BTIF controller bindings
From: Sean Wang @ 2017-08-11  2:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, jslaby-IBi9RG/b67k,
	andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA,
	jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ,
	heikki.krogerus-VuQAYsv1563Yd54FQh9/CA,
	hpeter-Re5JQEeQqe8AvxtiuMwx3w, vigneshr-l0cyMroinI0,
	matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20170810162752.2xncymekrhu544g7@rob-hp-laptop>

On Thu, 2017-08-10 at 11:27 -0500, Rob Herring wrote:
> On Thu, Aug 03, 2017 at 01:05:22AM +0800, sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org wrote:
> > From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> > 
> > Document the devicetree bindings for MediaTek BTIF controller
> > which could be found on MT7622 and MT7623 SoC.
> > 
> > Signed-off-by: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> > ---
> >  .../devicetree/bindings/serial/mtk-btif.txt        | 26 ++++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/serial/mtk-btif.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/serial/mtk-btif.txt b/Documentation/devicetree/bindings/serial/mtk-btif.txt
> > new file mode 100644
> > index 0000000..80c1f5a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/serial/mtk-btif.txt
> > @@ -0,0 +1,26 @@
> > +Device-Tree bindings for MediaTek BTIF controller found on those
> > +MediaTek SoCs with Bluetooth feature
> > +
> > +Required properties:
> > +- compatible: Should be one of:
> > +	- "mediatek,mt7622-btif" : for MT7622 SoC
> > +	- "mediatek,mt7623-btif" : for MT7623 SoC
> > +- reg: The base address of the BTIF register bank;
> > +- interrupts: A single interrupt specifier;
> > +- clocks: list of clock specifiers, corresponding to
> > +	  entries in clock-names property;
> > +- clock-names: should contain "main" entries.
> > +
> > +Optional properties:
> > +- mediatek,loopback: Boolean; if defined, indicates that BTIF controller
> > +	running on the loopback mode.
> 
> I don't think this belongs in DT, but should be a module param or sysfs 
> control.
> 
the loopback actually is one of hardware setups so i add it as one
property in the dt or could you kindly guide me how to make judgment
accurately for listing those changes as either dt or a module param? 


> > +
> > +Example:
> > +
> > +	btif: btif@1100c000 {
> 
> bluetooth@...
> 
btif not bluetooth, which is just the interface hardware allowing the
the main processor communicating with the bluetooth hardware built in
the SoC, and is really like to the uart used by legacy bluetooth.
So i will add bluetooth as the another node.


> > +		compatible = "mediatek,mt7623-btif";
> > +		reg = <0 0x1100c000 0 0x1000>;
> > +		interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
> > +		clocks = <&pericfg CLK_PERI_BTIF>;
> > +		clock-names = "main";
> > +	};
> > -- 
> > 2.7.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


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox