Skip to contentSkip to conversation

tty: serial: samsung_tty: build it for any platform

PATCH In review Greg Kroah-Hartman 4 participants 10 messages Feb 20, 2020 – Feb 26, 2020

Subsystems (2)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 1/2 tty: serial: samsung_tty: build it for any platform

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

---
 drivers/tty/serial/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/serial/Kconfig +0 -1
index 52eaac21ff9f..a310bd22f1e2 100644
@@ -237,7 +237,6 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,

base-commit: 11a48a5a18c63fd7621bb050228cebf13566e4d8

Signature · 1 line
2.25.1
author maintainer
#1 lore raw

PATCH 2/2 tty: serial: samsung_tty: remove SERIAL_SAMSUNG_DEBUG

Since a05025d0ce72 ("tty: serial: samsung_tty: use standard debugging macros") this configuration option is not used at all, so remove it from the Kconfig file.

---
 drivers/tty/serial/Kconfig | 9 ---------
 1 file changed, 9 deletions(-)
drivers/tty/serial/Kconfig +0 -9
index a310bd22f1e2..fa4380b0b869 100644
@@ -259,15 +259,6 @@ config SERIAL_SAMSUNG_UARTS
 	help
 	  Select the number of available UART ports for the Samsung S3C
 	  serial driver
-	
-config SERIAL_SAMSUNG_DEBUG
-	bool "Samsung SoC serial debug"
-	depends on SERIAL_SAMSUNG && DEBUG_LL
-	help
-	  Add support for debugging the serial driver. Since this is
-	  generally being used as a console, we use our own output
-	  routines that go via the low-level debug printascii()
-	  function.
 
 config SERIAL_SAMSUNG_CONSOLE
 	bool "Support for console on Samsung SoC serial port"
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] tty: serial: samsung_tty: remove SERIAL_SAMSUNG_DEBUG

Quoted 16 lines · Greg Kroah-Hartman

Since a05025d0ce72 ("tty: serial: samsung_tty: use standard debugging macros") this configuration option is not used at all, so remove it from the Kconfig file.

Quoted 3 lines
---
 drivers/tty/serial/Kconfig | 9 ---------
 1 file changed, 9 deletions(-)

Best regards,
Krzysztof

author maintainer
#3 lore raw

Re: [PATCH 2/2] tty: serial: samsung_tty: remove SERIAL_SAMSUNG_DEBUG

Quoted 21 lines · Krzysztof Kozlowski
Quoted 16 lines · Greg Kroah-Hartman

Since a05025d0ce72 ("tty: serial: samsung_tty: use standard debugging macros") this configuration option is not used at all, so remove it from the Kconfig file.

Quoted 3 lines
---
 drivers/tty/serial/Kconfig | 9 ---------
 1 file changed, 9 deletions(-)
Quoted 1 line

Thanks for the quick review of both of these!

greg k-h

maintainer Reviewed-by on v1 1/2
#4 lore raw
In reply to Greg Kroah-Hartman
Quoted 15 lines · Greg Kroah-Hartman

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

Quoted 3 lines
---
 drivers/tty/serial/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Best regards,
Krzysztof

#5 lore raw
In reply to Greg Kroah-Hartman

Hi Greg,

Quoted 2 lines · Greg Kroah-Hartman

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

samsung_tty driver is hardware specific driver so why should we build it for any platform?

This change seems to defeat the whole purpose behind COMPILE_TEST config option (which allows us to build hardware-specific drivers without needlessly presenting the user with tons of non-relevant config options).

Please explain this change some more, are you planing to remove COMPILE_TEST config option?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 30 lines
---
 drivers/tty/serial/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/serial/Kconfig +0 -1
index 52eaac21ff9f..a310bd22f1e2 100644
@@ -237,7 +237,6 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,

base-commit: 11a48a5a18c63fd7621bb050228cebf13566e4d8

#6 lore raw
Quoted 7 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines · Greg Kroah-Hartman

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

samsung_tty driver is hardware specific driver so why should we build it for any platform?

Quoted 7 lines

This change seems to defeat the whole purpose behind COMPILE_TEST config option (which allows us to build hardware-specific drivers without needlessly presenting the user with tons of non-relevant config options).

Please explain this change some more, are you planing to remove COMPILE_TEST config option?

+1

I was just going to send a revert...

Quoted 6 lines
Quoted 6 lines
drivers/tty/serial/Kconfig +0 -0
@@ -237,7 +237,6 @@ config SERIAL_CLPS711X_CONSOLE
 
Quoted 8 lines
Quoted 8 lines
drivers/tty/serial/Kconfig +0 -1
 config SERIAL_SAMSUNG
      tristate "Samsung SoC serial support"
-     depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
      select SERIAL_CORE
      help
        Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,

base-commit: 11a48a5a18c63fd7621bb050228cebf13566e4d8

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author maintainer
#7 lore raw
Quoted 8 lines · Geert Uytterhoeven
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines · Greg Kroah-Hartman

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

samsung_tty driver is hardware specific driver so why should we build it for any platform?

Why not?

Seriously, this "only this one specific SoC is allowed to build this driver" is crazy. It prevents anyone from building a generic kernel with drivers as a module which are loaded as needed.

That needs to be fixed, and removing this unneeded dependancy on this driver allows it to be build for any system and then only loaded when needed.

Quoted 7 lines
Quoted 7 lines

This change seems to defeat the whole purpose behind COMPILE_TEST config option (which allows us to build hardware-specific drivers without needlessly presenting the user with tons of non-relevant config options).

Please explain this change some more, are you planing to remove COMPILE_TEST config option?

I want to get rid of this:

Quoted 1 line
Quoted 1 line
Quoted 1 line

- depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST

We should not need PLAT_SAMSUNG or ARCH_EXYNOS at all, we should be able to build an arm64 kernel for all platforms.

thanks,

greg k-h

#8 lore raw

Hi Greg,

Quoted 11 lines · Greg Kroah-Hartman
Quoted 8 lines · Geert Uytterhoeven
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines · Greg Kroah-Hartman

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

samsung_tty driver is hardware specific driver so why should we build it for any platform?

Why not?

Because this driver won't bind to a device anyway, when the kernel is configured without Samsung SoC support. It will just bloat the kernel, and asking this question is a silly waste of time for anyone building a (non-generic) kernel for a non-Samsung SoC.

Quoted 3 lines

Seriously, this "only this one specific SoC is allowed to build this driver" is crazy. It prevents anyone from building a generic kernel with drivers as a module which are loaded as needed.

A generic kernel will include Samsung SoC support, hence PLAT_SAMSUNG or ARCH_EXYNOS will be enabled.

Quoted 3 lines

That needs to be fixed, and removing this unneeded dependancy on this driver allows it to be build for any system and then only loaded when needed.

It can only be loaded on a Samsung system, which requires PLAT_SAMSUNG or ARCH_EXYNOS anyway.
It's not like a Samsung serial device can be plugged into your PC's PCI bus or so, it only exists on Samsung SoCs.

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines

This change seems to defeat the whole purpose behind COMPILE_TEST config option (which allows us to build hardware-specific drivers without needlessly presenting the user with tons of non-relevant config options).

Please explain this change some more, are you planing to remove COMPILE_TEST config option?

I want to get rid of this:

IMHO we need _more_ of these dependencies, to avoid all these silly questions when they don't make sense.

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

- depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST

We should not need PLAT_SAMSUNG or ARCH_EXYNOS at all, we should be able to build an arm64 kernel for all platforms.

An arm64 kernel for all platforms will have ARCH_EXYNOS enabled.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#9 lore raw
Quoted 50 lines · Geert Uytterhoeven

Hi Greg,

Quoted 11 lines · Greg Kroah-Hartman
Quoted 8 lines · Geert Uytterhoeven
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines · Greg Kroah-Hartman

There is no need to tie this driver to only a specific SoC, or compile test, so remove that dependancy from the Kconfig rules.

samsung_tty driver is hardware specific driver so why should we build it for any platform?

Why not?

Because this driver won't bind to a device anyway, when the kernel is configured without Samsung SoC support. It will just bloat the kernel, and asking this question is a silly waste of time for anyone building a (non-generic) kernel for a non-Samsung SoC.

Quoted 3 lines

Seriously, this "only this one specific SoC is allowed to build this driver" is crazy. It prevents anyone from building a generic kernel with drivers as a module which are loaded as needed.

A generic kernel will include Samsung SoC support, hence PLAT_SAMSUNG or ARCH_EXYNOS will be enabled.

Quoted 3 lines

That needs to be fixed, and removing this unneeded dependancy on this driver allows it to be build for any system and then only loaded when needed.

It can only be loaded on a Samsung system, which requires PLAT_SAMSUNG or ARCH_EXYNOS anyway.
It's not like a Samsung serial device can be plugged into your PC's PCI bus or so, it only exists on Samsung SoCs.

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines

This change seems to defeat the whole purpose behind COMPILE_TEST config option (which allows us to build hardware-specific drivers without needlessly presenting the user with tons of non-relevant config options).

Please explain this change some more, are you planing to remove COMPILE_TEST config option?

I want to get rid of this:

IMHO we need _more_ of these dependencies, to avoid all these silly questions when they don't make sense.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

- depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST

We should not need PLAT_SAMSUNG or ARCH_EXYNOS at all, we should be able to build an arm64 kernel for all platforms.

An arm64 kernel for all platforms will have ARCH_EXYNOS enabled.

+1 on all comments from Geert

IMHO this change should be reverted (it doesn't fix anything and only makes kernel configuration harder).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics