* [PATCH] serial: omap: make Linux console name configurable
@ 2025-03-19 10:22 Sascha Hauer
2025-03-19 10:55 ` Ahmad Fatoum
2025-03-19 12:34 ` Sascha Hauer
0 siblings, 2 replies; 7+ messages in thread
From: Sascha Hauer @ 2025-03-19 10:22 UTC (permalink / raw)
To: Barebox List; +Cc: Ahmad Fatoum
Depending on the configuration Linux on OMAP SoCs either needs ttyO or
ttyS as console name. We used to pass ttyO, but c1c0d18973
("serial: omap: Use ttyS as Linux console name") recently changed this
to ttyS which breaks setups that used to work earlier. Make the
name configurable to allow for setups requiring ttyS and use ttyO
as default to keep existing setups working.
Note that with ti,am4372-uart we used to pass ttyO as well, but this
specific compatible is only supported by the 8250 based driver which
needs ttyS as console name. With this patch we always pass ttyS
regardless of CONFIG_DRIVER_SERIAL_NS16550_OMAP_TTYS.
All new SoCs like the K3 SoCs are only supported by the 8250 based
driver which needs ttyS. On these SoCs CONFIG_DRIVER_SERIAL_NS16550_OMAP_TTYS
will also have no effect.
Fixes: c1c0d18973 ("serial: omap: Use ttyS as Linux console name")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/serial/Kconfig | 12 ++++++++++++
drivers/serial/serial_ns16550.c | 4 ++++
2 files changed, 16 insertions(+)
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index b7312ca796..6ac1d94526 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -77,6 +77,18 @@ config DRIVER_SERIAL_NS16550
help
Enable this to get support for NS16550 based serial devices
+config DRIVER_SERIAL_NS16550_OMAP_TTYS
+ depends on ARCH_OMAP
+ bool "Use ttyS as console name for TI OMAP/AMxxx SoCs"
+ help
+ Linux has two different drivers for the TI OMAP/AMxxx serial ports. One is
+ based on the generic 8250 driver and activated with CONFIG_SERIAL_8250_OMAP.
+ This one uses ttyS as console name. When CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP
+ is enabled, this driver takes ttyO as console name as well, but issues a warning
+ during boot. The other driver is activated with CONFIG_SERIAL_OMAP and takes ttyO
+ as console name. Say yes here to pass ttyS as console, otherwise ttyO will be
+ used.
+
config DRIVER_SERIAL_ATMEL
depends on ARCH_AT91
default y
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 56a1c6c6b9..6d4a4e8c7c 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -402,7 +402,11 @@ static struct ns16550_drvdata ns16550_drvdata = {
static __maybe_unused struct ns16550_drvdata omap_drvdata = {
.init_port = ns16550_omap_init_port,
+#ifdef CONFIG_DRIVER_SERIAL_NS16550_OMAP_TTYS
.linux_console_name = "ttyS",
+#else
+ .linux_console_name = "ttyO",
+#endif
.linux_earlycon_name = "omap8250",
};
--
2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: omap: make Linux console name configurable
2025-03-19 10:22 [PATCH] serial: omap: make Linux console name configurable Sascha Hauer
@ 2025-03-19 10:55 ` Ahmad Fatoum
2025-03-19 11:01 ` Sascha Hauer
2025-03-19 12:34 ` Sascha Hauer
1 sibling, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2025-03-19 10:55 UTC (permalink / raw)
To: Sascha Hauer, Barebox List
Hello Sascha,
On 3/19/25 11:22, Sascha Hauer wrote:
> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
> ttyS as console name. We used to pass ttyO, but c1c0d18973
> ("serial: omap: Use ttyS as Linux console name") recently changed this
> to ttyS which breaks setups that used to work earlier. Make the
> name configurable to allow for setups requiring ttyS and use ttyO
> as default to keep existing setups working.
>
> Note that with ti,am4372-uart we used to pass ttyO as well, but this
> specific compatible is only supported by the 8250 based driver which
> needs ttyS as console name.
This reads as if 8250_omap supports only ttyS, but it has logic to
support ttyO as well.
> With this patch we always pass ttyS
> regardless of CONFIG_DRIVER_SERIAL_NS16550_OMAP_TTYS.
>
> All new SoCs like the K3 SoCs are only supported by the 8250 based
> driver which needs ttyS. On these SoCs CONFIG_DRIVER_SERIAL_NS16550_OMAP_TTYS
> will also have no effect.
>
> Fixes: c1c0d18973 ("serial: omap: Use ttyS as Linux console name")
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
See also the comment below.
> ---
> drivers/serial/Kconfig | 12 ++++++++++++
> drivers/serial/serial_ns16550.c | 4 ++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index b7312ca796..6ac1d94526 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -77,6 +77,18 @@ config DRIVER_SERIAL_NS16550
> help
> Enable this to get support for NS16550 based serial devices
>
> +config DRIVER_SERIAL_NS16550_OMAP_TTYS
default ARCH_K3 ?
> + depends on ARCH_OMAP
> + bool "Use ttyS as console name for TI OMAP/AMxxx SoCs"
> + help
> + Linux has two different drivers for the TI OMAP/AMxxx serial ports. One is
> + based on the generic 8250 driver and activated with CONFIG_SERIAL_8250_OMAP.
> + This one uses ttyS as console name. When CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP
> + is enabled, this driver takes ttyO as console name as well, but issues a warning
> + during boot. The other driver is activated with CONFIG_SERIAL_OMAP and takes ttyO
> + as console name. Say yes here to pass ttyS as console, otherwise ttyO will be
> + used.
> +
> config DRIVER_SERIAL_ATMEL
> depends on ARCH_AT91
> default y
> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> index 56a1c6c6b9..6d4a4e8c7c 100644
> --- a/drivers/serial/serial_ns16550.c
> +++ b/drivers/serial/serial_ns16550.c
> @@ -402,7 +402,11 @@ static struct ns16550_drvdata ns16550_drvdata = {
>
> static __maybe_unused struct ns16550_drvdata omap_drvdata = {
> .init_port = ns16550_omap_init_port,
> +#ifdef CONFIG_DRIVER_SERIAL_NS16550_OMAP_TTYS
> .linux_console_name = "ttyS",
> +#else
> + .linux_console_name = "ttyO",
> +#endif
> .linux_earlycon_name = "omap8250",
> };
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: omap: make Linux console name configurable
2025-03-19 10:55 ` Ahmad Fatoum
@ 2025-03-19 11:01 ` Sascha Hauer
2025-03-19 11:03 ` Ahmad Fatoum
0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2025-03-19 11:01 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Barebox List
On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 3/19/25 11:22, Sascha Hauer wrote:
> > Depending on the configuration Linux on OMAP SoCs either needs ttyO or
> > ttyS as console name. We used to pass ttyO, but c1c0d18973
> > ("serial: omap: Use ttyS as Linux console name") recently changed this
> > to ttyS which breaks setups that used to work earlier. Make the
> > name configurable to allow for setups requiring ttyS and use ttyO
> > as default to keep existing setups working.
> >
> > Note that with ti,am4372-uart we used to pass ttyO as well, but this
> > specific compatible is only supported by the 8250 based driver which
> > needs ttyS as console name.
>
> This reads as if 8250_omap supports only ttyS, but it has logic to
> support ttyO as well.
s/needs/prefers/ maybe
Sascha
--
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 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: omap: make Linux console name configurable
2025-03-19 11:01 ` Sascha Hauer
@ 2025-03-19 11:03 ` Ahmad Fatoum
2025-03-19 11:16 ` Sascha Hauer
0 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2025-03-19 11:03 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
On 3/19/25 12:01, Sascha Hauer wrote:
> On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
>> Hello Sascha,
>>
>> On 3/19/25 11:22, Sascha Hauer wrote:
>>> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
>>> ttyS as console name. We used to pass ttyO, but c1c0d18973
>>> ("serial: omap: Use ttyS as Linux console name") recently changed this
>>> to ttyS which breaks setups that used to work earlier. Make the
>>> name configurable to allow for setups requiring ttyS and use ttyO
>>> as default to keep existing setups working.
>>>
>>> Note that with ti,am4372-uart we used to pass ttyO as well, but this
>>> specific compatible is only supported by the 8250 based driver which
>>> needs ttyS as console name.
>>
>> This reads as if 8250_omap supports only ttyS, but it has logic to
>> support ttyO as well.
>
> s/needs/prefers/ maybe
Ye, further below there is also 'will also have no effect', which is not
true as it hides an ugly error message.
Can you reword these two parts and make the option default ARCH_K3?
Thanks,
Ahmad
>
> Sascha
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: omap: make Linux console name configurable
2025-03-19 11:03 ` Ahmad Fatoum
@ 2025-03-19 11:16 ` Sascha Hauer
2025-03-19 11:30 ` Ahmad Fatoum
0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2025-03-19 11:16 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Barebox List
On Wed, Mar 19, 2025 at 12:03:31PM +0100, Ahmad Fatoum wrote:
>
>
> On 3/19/25 12:01, Sascha Hauer wrote:
> > On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
> >> Hello Sascha,
> >>
> >> On 3/19/25 11:22, Sascha Hauer wrote:
> >>> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
> >>> ttyS as console name. We used to pass ttyO, but c1c0d18973
> >>> ("serial: omap: Use ttyS as Linux console name") recently changed this
> >>> to ttyS which breaks setups that used to work earlier. Make the
> >>> name configurable to allow for setups requiring ttyS and use ttyO
> >>> as default to keep existing setups working.
> >>>
> >>> Note that with ti,am4372-uart we used to pass ttyO as well, but this
> >>> specific compatible is only supported by the 8250 based driver which
> >>> needs ttyS as console name.
> >>
> >> This reads as if 8250_omap supports only ttyS, but it has logic to
> >> support ttyO as well.
> >
> > s/needs/prefers/ maybe
>
> Ye, further below there is also 'will also have no effect', which is not
> true as it hides an ugly error message.
>
> Can you reword these two parts and make the option default ARCH_K3?
ARCH_K3 doesn't need this option.
Sascha
--
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 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: omap: make Linux console name configurable
2025-03-19 11:16 ` Sascha Hauer
@ 2025-03-19 11:30 ` Ahmad Fatoum
0 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-03-19 11:30 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
Hi,
On 3/19/25 12:16, Sascha Hauer wrote:
> On Wed, Mar 19, 2025 at 12:03:31PM +0100, Ahmad Fatoum wrote:
>>
>>
>> On 3/19/25 12:01, Sascha Hauer wrote:
>>> On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
>>>> Hello Sascha,
>>>>
>>>> On 3/19/25 11:22, Sascha Hauer wrote:
>>>>> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
>>>>> ttyS as console name. We used to pass ttyO, but c1c0d18973
>>>>> ("serial: omap: Use ttyS as Linux console name") recently changed this
>>>>> to ttyS which breaks setups that used to work earlier. Make the
>>>>> name configurable to allow for setups requiring ttyS and use ttyO
>>>>> as default to keep existing setups working.
>>>>>
>>>>> Note that with ti,am4372-uart we used to pass ttyO as well, but this
>>>>> specific compatible is only supported by the 8250 based driver which
>>>>> needs ttyS as console name.
>>>>
>>>> This reads as if 8250_omap supports only ttyS, but it has logic to
>>>> support ttyO as well.
>>>
>>> s/needs/prefers/ maybe
>>
>> Ye, further below there is also 'will also have no effect', which is not
>> true as it hides an ugly error message.
>>
>> Can you reword these two parts and make the option default ARCH_K3?
>
> ARCH_K3 doesn't need this option.
Ah, ok. Then feel free to add my:
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cheers,
Ahmad
>
> Sascha
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: omap: make Linux console name configurable
2025-03-19 10:22 [PATCH] serial: omap: make Linux console name configurable Sascha Hauer
2025-03-19 10:55 ` Ahmad Fatoum
@ 2025-03-19 12:34 ` Sascha Hauer
1 sibling, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2025-03-19 12:34 UTC (permalink / raw)
To: Barebox List, Sascha Hauer; +Cc: Ahmad Fatoum
On Wed, 19 Mar 2025 11:22:28 +0100, Sascha Hauer wrote:
> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
> ttyS as console name. We used to pass ttyO, but c1c0d18973
> ("serial: omap: Use ttyS as Linux console name") recently changed this
> to ttyS which breaks setups that used to work earlier. Make the
> name configurable to allow for setups requiring ttyS and use ttyO
> as default to keep existing setups working.
>
> [...]
Applied, thanks!
[1/1] serial: omap: make Linux console name configurable
https://git.pengutronix.de/cgit/barebox/commit/?id=13557d1ab024 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-19 12:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-19 10:22 [PATCH] serial: omap: make Linux console name configurable Sascha Hauer
2025-03-19 10:55 ` Ahmad Fatoum
2025-03-19 11:01 ` Sascha Hauer
2025-03-19 11:03 ` Ahmad Fatoum
2025-03-19 11:16 ` Sascha Hauer
2025-03-19 11:30 ` Ahmad Fatoum
2025-03-19 12:34 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox