mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] serial: ns16550: Reuse 16550 serial for tegra UART
@ 2022-04-22  9:21 Alexander Shiyan
  2022-04-25 10:27 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2022-04-22  9:21 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Shiyan

The initialization for the tegra UART is the same as for the standard 16550,
so there is no reason to keep a separate structure for it in the driver.

Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
 drivers/serial/serial_ns16550.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 464ae1aebc..f93a89ab95 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -366,11 +366,6 @@ static __maybe_unused struct ns16550_drvdata jz_drvdata = {
 	.init_port = ns16550_jz_init_port,
 };
 
-static __maybe_unused struct ns16550_drvdata tegra_drvdata = {
-	.init_port = ns16550_serial_init_port,
-	.linux_console_name = "ttyS",
-};
-
 static __maybe_unused struct ns16550_drvdata rpi_drvdata = {
 	.init_port = rpi_init_port,
 	.linux_console_name = "ttyS",
@@ -528,6 +523,9 @@ static struct of_device_id ns16550_serial_dt_ids[] = {
 	}, {
 		.compatible = "marvell,armada-38x-uart",
 		.data = &ns16550_drvdata,
+	}, {
+		.compatible = "nvidia,tegra20-uart",
+		.data = &ns16550_drvdata,
 	},
 #if IS_ENABLED(CONFIG_ARCH_OMAP)
 	{
@@ -541,12 +539,6 @@ static struct of_device_id ns16550_serial_dt_ids[] = {
 		.data = &omap_drvdata,
 	},
 #endif
-#if IS_ENABLED(CONFIG_ARCH_TEGRA)
-	{
-		.compatible = "nvidia,tegra20-uart",
-		.data = &tegra_drvdata,
-	},
-#endif
 #if IS_ENABLED(CONFIG_MACH_MIPS_XBURST)
 	{
 		.compatible = "ingenic,jz4740-uart",
-- 
2.32.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: [PATCH] serial: ns16550: Reuse 16550 serial for tegra UART
  2022-04-22  9:21 [PATCH] serial: ns16550: Reuse 16550 serial for tegra UART Alexander Shiyan
@ 2022-04-25 10:27 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-04-25 10:27 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Fri, Apr 22, 2022 at 12:21:55PM +0300, Alexander Shiyan wrote:
> The initialization for the tegra UART is the same as for the standard 16550,
> so there is no reason to keep a separate structure for it in the driver.
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
>  drivers/serial/serial_ns16550.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> index 464ae1aebc..f93a89ab95 100644
> --- a/drivers/serial/serial_ns16550.c
> +++ b/drivers/serial/serial_ns16550.c
> @@ -366,11 +366,6 @@ static __maybe_unused struct ns16550_drvdata jz_drvdata = {
>  	.init_port = ns16550_jz_init_port,
>  };
>  
> -static __maybe_unused struct ns16550_drvdata tegra_drvdata = {
> -	.init_port = ns16550_serial_init_port,
> -	.linux_console_name = "ttyS",
> -};
> -
>  static __maybe_unused struct ns16550_drvdata rpi_drvdata = {
>  	.init_port = rpi_init_port,
>  	.linux_console_name = "ttyS",
> @@ -528,6 +523,9 @@ static struct of_device_id ns16550_serial_dt_ids[] = {
>  	}, {
>  		.compatible = "marvell,armada-38x-uart",
>  		.data = &ns16550_drvdata,
> +	}, {
> +		.compatible = "nvidia,tegra20-uart",
> +		.data = &ns16550_drvdata,
>  	},
>  #if IS_ENABLED(CONFIG_ARCH_OMAP)
>  	{
> @@ -541,12 +539,6 @@ static struct of_device_id ns16550_serial_dt_ids[] = {
>  		.data = &omap_drvdata,
>  	},
>  #endif
> -#if IS_ENABLED(CONFIG_ARCH_TEGRA)
> -	{
> -		.compatible = "nvidia,tegra20-uart",
> -		.data = &tegra_drvdata,
> -	},
> -#endif
>  #if IS_ENABLED(CONFIG_MACH_MIPS_XBURST)
>  	{
>  		.compatible = "ingenic,jz4740-uart",
> -- 
> 2.32.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

end of thread, other threads:[~2022-04-25 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22  9:21 [PATCH] serial: ns16550: Reuse 16550 serial for tegra UART Alexander Shiyan
2022-04-25 10:27 ` Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git