Skip to contentSkip to conversation

tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE

PATCH Superseded Tom Rix 2 participants 7 messages Feb 25, 2023 – Feb 26, 2023 TTY layer and serial drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index 625358f44419..b24d74d389fc 100644
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
 
 config SERIAL_FSL_LPUART_CONSOLE
 	bool "Console on Freescale lpuart serial port"
-	depends on SERIAL_FSL_LPUART
+	select SERIAL_FSL_LPUART
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_EARLYCON
 	help
Signature · 1 line
2.27.0
#1 lore raw

Hi--

Quoted 22 lines · Tom Rix

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..b24d74d389fc 100644

drivers/tty/serial/Kconfig config SERIAL_FSL_LPUART · line 1316

Quoted 5 lines
drivers/tty/serial/Kconfig +1 -1
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
 
 config SERIAL_FSL_LPUART_CONSOLE
 	bool "Console on Freescale lpuart serial port"
-	depends on SERIAL_FSL_LPUART
+	select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

depends on SERIAL_FSL_LPUART=y

e.g.

but I noticed a few others with a similar problem.

Quoted 3 lines
drivers/tty/serial/Kconfig +0 -0
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_EARLYCON
 	help
Signature · 1 line
~Randy
author
#2 lore raw
Quoted 26 lines · Randy Dunlap

Hi--

Quoted 23 lines · Tom Rix

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
  drivers/tty/serial/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..b24d74d389fc 100644
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
 
Quoted 7 lines

drivers/tty/serial/Kconfig config SERIAL_FSL_LPUART · line 1316

Quoted 4 lines
drivers/tty/serial/Kconfig +1 -1
  config SERIAL_FSL_LPUART_CONSOLE
  	bool "Console on Freescale lpuart serial port"
-	depends on SERIAL_FSL_LPUART
+	select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

depends on SERIAL_FSL_LPUART=y

commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.

Tom

Quoted 8 lines

e.g.

but I noticed a few others with a similar problem.

Quoted 3 lines
drivers/tty/serial/Kconfig +0 -0
  	select SERIAL_CORE_CONSOLE
  	select SERIAL_EARLYCON
  	help
#3 lore raw
Quoted 33 lines · Tom Rix
Quoted 31 lines · Randy Dunlap

Hi--

Quoted 22 lines · Tom Rix

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
  drivers/tty/serial/Kconfig | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..b24d74d389fc 100644
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
Quoted 4 lines

    config SERIAL_FSL_LPUART_CONSOLE
      bool "Console on Freescale lpuart serial port" -    depends on SERIAL_FSL_LPUART
+    select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

Quoted 4 lines
Quoted 1 line

    depends on SERIAL_FSL_LPUART=y

commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.

uh. But it's still a bool, not a tristate. How does that work?

Quoted 10 lines
Quoted 9 lines

e.g.

but I noticed a few others with a similar problem.

Quoted 3 lines

      select SERIAL_CORE_CONSOLE
      select SERIAL_EARLYCON
      help

Signature · 1 line
~Randy
#4 lore raw
Quoted 36 lines · Randy Dunlap
Quoted 33 lines · Tom Rix
Quoted 31 lines · Randy Dunlap

Hi--

Quoted 22 lines · Tom Rix

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
  drivers/tty/serial/Kconfig | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..b24d74d389fc 100644
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
Quoted 4 lines

    config SERIAL_FSL_LPUART_CONSOLE
      bool "Console on Freescale lpuart serial port" -    depends on SERIAL_FSL_LPUART
+    select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

    depends on SERIAL_FSL_LPUART=y

commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.

uh. But it's still a bool, not a tristate. How does that work?

OK, I see. :)

Well, I don't see another decent solution ATM.

Tom, does your patch fix the build error?

What are the listed CONFIG settings after the patch?

Thanks.

Quoted 9 lines
Quoted 8 lines
Quoted 7 lines

e.g.

but I noticed a few others with a similar problem.

Quoted 3 lines

      select SERIAL_CORE_CONSOLE
      select SERIAL_EARLYCON
      help

Signature · 1 line
~Randy
#5 lore raw
Quoted 46 lines · Randy Dunlap
Quoted 36 lines · Randy Dunlap
Quoted 33 lines · Tom Rix
Quoted 31 lines · Randy Dunlap

Hi--

Quoted 22 lines · Tom Rix

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
  drivers/tty/serial/Kconfig | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..b24d74d389fc 100644
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
Quoted 4 lines

    config SERIAL_FSL_LPUART_CONSOLE
      bool "Console on Freescale lpuart serial port" -    depends on SERIAL_FSL_LPUART
+    select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

    depends on SERIAL_FSL_LPUART=y

commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.

uh. But it's still a bool, not a tristate. How does that work?

Quoted 7 lines

OK, I see. :)

Well, I don't see another decent solution ATM.

Tom, does your patch fix the build error?

What are the listed CONFIG settings after the patch?

OK, after I apply the patch, all of the listed config symbols are changed to =y (builtin), so not built as a loadable module.

Do you see something different?

Quoted 10 lines
Quoted 9 lines
Quoted 8 lines
Quoted 7 lines

e.g.

but I noticed a few others with a similar problem.

Quoted 3 lines

      select SERIAL_CORE_CONSOLE
      select SERIAL_EARLYCON
      help

Signature · 1 line
~Randy
author
#6 lore raw
Quoted 46 lines · Randy Dunlap
Quoted 44 lines · Randy Dunlap
Quoted 34 lines · Randy Dunlap
Quoted 32 lines · Tom Rix
Quoted 31 lines · Randy Dunlap

Hi--

Quoted 22 lines · Tom Rix

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

---
   drivers/tty/serial/Kconfig | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index 625358f44419..b24d74d389fc 100644

drivers/tty/serial/Kconfig config SERIAL_FSL_LPUART · line 1315

Quoted 4 lines
drivers/tty/serial/Kconfig +1 -1
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
     config SERIAL_FSL_LPUART_CONSOLE
       bool "Console on Freescale lpuart serial port"
-    depends on SERIAL_FSL_LPUART
+    select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

    depends on SERIAL_FSL_LPUART=y

commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.

uh. But it's still a bool, not a tristate. How does that work?

OK, I see. :)

Well, I don't see another decent solution ATM.

Quoted 7 lines
Quoted 3 lines

Tom, does your patch fix the build error?

What are the listed CONFIG settings after the patch?

OK, after I apply the patch, all of the listed config symbols are changed to =y (builtin), so not built as a loadable module.

Do you see something different?

No, all y's.

Since the showing the after state is useful, I added it to v2

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

e.g.

but I noticed a few others with a similar problem.

Quoted 3 lines
drivers/tty/serial/Kconfig +0 -0
       select SERIAL_CORE_CONSOLE
       select SERIAL_EARLYCON
       help