All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: serial: fsl_lpuart: increase maximum uart_nr to eight
@ 2022-12-22 14:56 Nate Drude
  2022-12-23  1:39 ` Sherry Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Nate Drude @ 2022-12-22 14:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel,
	Sherry Sun, Fugang Duan
  Cc: eran.m, Nate Drude

Some SoCs like the i.MX93 have aliases for up to eight UARTs, see:
https://github.com/torvalds/linux/blob/v6.1/arch/arm64/boot/dts/freescale/imx93.dtsi#L31-L38

Increase UART_NR from 6 to 8 to support lpuart7 and lpuart8 and avoid
initialization failures like the following:

[    0.837146] fsl-lpuart 42690000.serial: serial6 out of range
[    0.842814] fsl-lpuart: probe of 42690000.serial failed with error -22

Signed-off-by: Nate Drude <nate.d@variscite.com>
---
 drivers/tty/serial/fsl_lpuart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 900f9a0e4a5d..2e4af8e7a5b6 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -246,7 +246,7 @@
 
 #define DRIVER_NAME	"fsl-lpuart"
 #define DEV_NAME	"ttyLP"
-#define UART_NR		6
+#define UART_NR		8
 
 /* IMX lpuart has four extra unused regs located at the beginning */
 #define IMX_REG_OFF	0x10
-- 
2.38.2


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

* RE: [PATCH] tty: serial: fsl_lpuart: increase maximum uart_nr to eight
  2022-12-22 14:56 [PATCH] tty: serial: fsl_lpuart: increase maximum uart_nr to eight Nate Drude
@ 2022-12-23  1:39 ` Sherry Sun
  0 siblings, 0 replies; 2+ messages in thread
From: Sherry Sun @ 2022-12-23  1:39 UTC (permalink / raw)
  To: Nate Drude, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel, Fugang Duan
  Cc: eran.m, Nate Drude



> -----Original Message-----
> From: Nate Drude <nate.d@variscite.com>
> Sent: 2022年12月22日 22:57
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby
> <jirislaby@kernel.org>; linux-serial@vger.kernel.org; linux-
> kernel@vger.kernel.org; Sherry Sun <sherry.sun@nxp.com>; Fugang Duan
> <fugang.duan@nxp.com>
> Cc: eran.m@variscite.com; Nate Drude <Nate.D@variscite.com>
> Subject: [PATCH] tty: serial: fsl_lpuart: increase maximum uart_nr to eight
> 
> Some SoCs like the i.MX93 have aliases for up to eight UARTs, see:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
> .com%2Ftorvalds%2Flinux%2Fblob%2Fv6.1%2Farch%2Farm64%2Fboot%2Fdt
> s%2Ffreescale%2Fimx93.dtsi%23L31-
> L38&data=05%7C01%7Csherry.sun%40nxp.com%7C09285ba3360a490bce660
> 8dae42cc2d3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638073
> 178147509133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJ
> QIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdat
> a=JIvAtw9%2B03uZWQ9OHT9VbmuMVQln0E7UsdQ9H%2FtRtdg%3D&reserv
> ed=0
> 
> Increase UART_NR from 6 to 8 to support lpuart7 and lpuart8 and avoid
> initialization failures like the following:
> 
> [    0.837146] fsl-lpuart 42690000.serial: serial6 out of range
> [    0.842814] fsl-lpuart: probe of 42690000.serial failed with error -22
> 
> Signed-off-by: Nate Drude <nate.d@variscite.com>

Reviewed-by: Sherry Sun <sherry.sun@nxp.com>

Best Regards
Sherry

> ---
>  drivers/tty/serial/fsl_lpuart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index 900f9a0e4a5d..2e4af8e7a5b6 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
> @@ -246,7 +246,7 @@
> 
>  #define DRIVER_NAME	"fsl-lpuart"
>  #define DEV_NAME	"ttyLP"
> -#define UART_NR		6
> +#define UART_NR		8
> 
>  /* IMX lpuart has four extra unused regs located at the beginning */
>  #define IMX_REG_OFF	0x10
> --
> 2.38.2


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

end of thread, other threads:[~2022-12-23  1:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 14:56 [PATCH] tty: serial: fsl_lpuart: increase maximum uart_nr to eight Nate Drude
2022-12-23  1:39 ` Sherry Sun

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.