All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>
Subject: [PATCH 2/3] tty: serial: meson: retrieve port FIFO size from DT
Date: Tue, 18 May 2021 09:58:32 +0200	[thread overview]
Message-ID: <20210518075833.3736038-3-narmstrong@baylibre.com> (raw)
In-Reply-To: <20210518075833.3736038-1-narmstrong@baylibre.com>

Now the DT bindings has a property to get the FIFO size for a particular port,
retrieve it and use to setup the FIFO interrupts threshold.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/tty/serial/meson_uart.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 529cd0289056..10bb29202e43 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -715,6 +715,7 @@ static int meson_uart_probe(struct platform_device *pdev)
 {
 	struct resource *res_mem, *res_irq;
 	struct uart_port *port;
+	u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
 	int ret = 0;
 	int id = -1;
 
@@ -741,6 +742,8 @@ static int meson_uart_probe(struct platform_device *pdev)
 	if (!res_irq)
 		return -ENODEV;
 
+	of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
+
 	if (meson_ports[pdev->id]) {
 		dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
 		return -EBUSY;
@@ -770,7 +773,7 @@ static int meson_uart_probe(struct platform_device *pdev)
 	port->type = PORT_MESON;
 	port->x_char = 0;
 	port->ops = &meson_uart_ops;
-	port->fifosize = 64;
+	port->fifosize = fifosize;
 
 	meson_ports[pdev->id] = port;
 	platform_set_drvdata(pdev, port);
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>
Subject: [PATCH 2/3] tty: serial: meson: retrieve port FIFO size from DT
Date: Tue, 18 May 2021 09:58:32 +0200	[thread overview]
Message-ID: <20210518075833.3736038-3-narmstrong@baylibre.com> (raw)
In-Reply-To: <20210518075833.3736038-1-narmstrong@baylibre.com>

Now the DT bindings has a property to get the FIFO size for a particular port,
retrieve it and use to setup the FIFO interrupts threshold.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/tty/serial/meson_uart.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 529cd0289056..10bb29202e43 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -715,6 +715,7 @@ static int meson_uart_probe(struct platform_device *pdev)
 {
 	struct resource *res_mem, *res_irq;
 	struct uart_port *port;
+	u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
 	int ret = 0;
 	int id = -1;
 
@@ -741,6 +742,8 @@ static int meson_uart_probe(struct platform_device *pdev)
 	if (!res_irq)
 		return -ENODEV;
 
+	of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
+
 	if (meson_ports[pdev->id]) {
 		dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
 		return -EBUSY;
@@ -770,7 +773,7 @@ static int meson_uart_probe(struct platform_device *pdev)
 	port->type = PORT_MESON;
 	port->x_char = 0;
 	port->ops = &meson_uart_ops;
-	port->fifosize = 64;
+	port->fifosize = fifosize;
 
 	meson_ports[pdev->id] = port;
 	platform_set_drvdata(pdev, port);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>
Subject: [PATCH 2/3] tty: serial: meson: retrieve port FIFO size from DT
Date: Tue, 18 May 2021 09:58:32 +0200	[thread overview]
Message-ID: <20210518075833.3736038-3-narmstrong@baylibre.com> (raw)
In-Reply-To: <20210518075833.3736038-1-narmstrong@baylibre.com>

Now the DT bindings has a property to get the FIFO size for a particular port,
retrieve it and use to setup the FIFO interrupts threshold.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/tty/serial/meson_uart.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 529cd0289056..10bb29202e43 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -715,6 +715,7 @@ static int meson_uart_probe(struct platform_device *pdev)
 {
 	struct resource *res_mem, *res_irq;
 	struct uart_port *port;
+	u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
 	int ret = 0;
 	int id = -1;
 
@@ -741,6 +742,8 @@ static int meson_uart_probe(struct platform_device *pdev)
 	if (!res_irq)
 		return -ENODEV;
 
+	of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
+
 	if (meson_ports[pdev->id]) {
 		dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
 		return -EBUSY;
@@ -770,7 +773,7 @@ static int meson_uart_probe(struct platform_device *pdev)
 	port->type = PORT_MESON;
 	port->x_char = 0;
 	port->ops = &meson_uart_ops;
-	port->fifosize = 64;
+	port->fifosize = fifosize;
 
 	meson_ports[pdev->id] = port;
 	platform_set_drvdata(pdev, port);
-- 
2.25.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2021-05-18  7:58 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  7:58 [PATCH 0/3] tty: serial: meson: add amlogic,uart-fifosize property Neil Armstrong
2021-05-18  7:58 ` Neil Armstrong
2021-05-18  7:58 ` Neil Armstrong
2021-05-18  7:58 ` [PATCH 1/3] dt-bindings: serial: amlogic,meson-uart: add fifo-size property Neil Armstrong
2021-05-18  7:58   ` [PATCH 1/3] dt-bindings: serial: amlogic, meson-uart: " Neil Armstrong
2021-05-18  7:58   ` Neil Armstrong
2021-05-19 21:36   ` Rob Herring
2021-05-19 21:36     ` Rob Herring
2021-05-19 21:36     ` Rob Herring
2021-05-18  7:58 ` Neil Armstrong [this message]
2021-05-18  7:58   ` [PATCH 2/3] tty: serial: meson: retrieve port FIFO size from DT Neil Armstrong
2021-05-18  7:58   ` Neil Armstrong
2021-05-18  7:58 ` [PATCH 3/3] arm64: dts: meson: set 128bytes FIFO size on uart A Neil Armstrong
2021-05-18  7:58   ` Neil Armstrong
2021-05-18  7:58   ` Neil Armstrong
2021-05-20 13:55 ` [PATCH 0/3] tty: serial: meson: add amlogic,uart-fifosize property Neil Armstrong
2021-05-20 13:55   ` Neil Armstrong
2021-05-20 13:55   ` Neil Armstrong
2021-05-20 14:10   ` Greg KH
2021-05-20 14:10     ` Greg KH
2021-05-20 14:10     ` Greg KH
2021-05-20 16:02     ` Neil Armstrong
2021-05-20 16:02       ` Neil Armstrong
2021-05-20 16:02       ` Neil Armstrong
2021-06-01  8:27 ` (subset) " Neil Armstrong
2021-06-01  8:27   ` (subset) [PATCH 0/3] tty: serial: meson: add amlogic, uart-fifosize property Neil Armstrong
2021-06-01  8:27   ` Neil Armstrong
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15  8:34 [PATCH 0/3] tty: serial: meson: add amlogic,uart-fifosize property Neil Armstrong
2021-03-15  8:34 ` [PATCH 2/3] tty: serial: meson: retrieve port FIFO size from DT Neil Armstrong
2021-03-15  8:34   ` Neil Armstrong
2021-03-15  8:34   ` Neil Armstrong
2021-03-16  0:26   ` Kevin Hilman
2021-03-16  0:26     ` Kevin Hilman
2021-03-16  0:26     ` Kevin Hilman
2021-03-23 21:34   ` Martin Blumenstingl
2021-03-23 21:34     ` Martin Blumenstingl
2021-03-23 21:34     ` Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518075833.3736038-3-narmstrong@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.