tty: serial: make SERIAL_SPRD depends on ARM or ARM64
PATCH 1/1 tty: serial: make SERIAL_SPRD depends on ARM or ARM64
From: Chunyan Zhang <[email protected]>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
Quoted 1 line
Quoted 1 line
drivers/tty/serial/sprd_serial.c:1175: undefined reference
to `clk_set_parent'
Because some mips Kconfig-s select CONFIG_HAVE_CLK but not CONFIG_COMMON_CLK, so it's probably that clk_set_parent is missed for those configs.
To fix this error, this patch adds dependence on ARM || ARM64 for SERIAL_SPRD.
--- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/Kconfig +1 -0
@@ -1444,6 +1444,7 @@ config SERIAL_MEN_Z135 config SERIAL_SPRD tristate "Support for Spreadtrum serial" select SERIAL_CORE + depends on ARM || ARM64 || COMPILE_TEST help This enables the driver for the Spreadtrum's serial.
Signature · 1 line
2.20.1
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
Quoted 8 lines
Quoted 1 line
Quoted 1 line
drivers/tty/serial/sprd_serial.c:1175: undefined referenceto `clk_set_parent'
Because some mips Kconfig-s select
CONFIG_HAVE_CLKbut notCONFIG_COMMON_CLK, so it's probably thatclk_set_parentis missed for those configs.To fix this error, this patch adds dependence on ARM || ARM64 for
SERIAL_SPRD.
From the above, isn't the real dependency COMMON_CLOCK?
Mark.
Quoted 23 lines
Fixes 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")Reported-by kbuild test robot <[email protected]>Signed-off-by Chunyan Zhang <[email protected]>--- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/Kconfig +1
-0@@ -1444,6 +1444,7 @@ config SERIAL_MEN_Z135 config SERIAL_SPRD tristate "Support for Spreadtrum serial" select SERIAL_CORE + depends on ARM || ARM64 || COMPILE_TEST help This enables the driver for the Spreadtrum's serial.Signature · 1 line
2.20.1
Hi Mark, Greg,
Pleas see my answer below.
Quoted 10 lines · Mark Rutland
Quoted 8 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
Quoted 1 line
Quoted 1 line
drivers/tty/serial/sprd_serial.c:1175: undefined referenceto `clk_set_parent'
Quoted 7 lines
Quoted 5 lines
Because some mips Kconfig-s select
CONFIG_HAVE_CLKbut notCONFIG_COMMON_CLK, so it's probably thatclk_set_parentis missed for those configs.To fix this error, this patch adds dependence on ARM || ARM64 for
SERIAL_SPRD.From the above, isn't the real dependency
COMMON_CLOCK?
Some arch can implement its own clock APIs, for example AR7 [1].
The sprd serial driver is used on ARM and ARM64 platforms only for now, which uses clock functions provided by COMMON_CLK, but it has the possibility of being used on other architecture platforms, that was my thought.
I should revise this commit message to:
"
Because some mips Kconfig-s select CONFIG_HAVE_CLK but not define clk_set_parent which is used by the sprd serial driver.
...
"
Does it make sense?
Thanks,
Chunyan
[1] https://elixir.bootlin.com/linux/v5.5.11/source/arch/mips/ar7/clock.c#L475
Quoted 26 lines
Mark.
Quoted 23 lines
Fixes 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")Reported-by kbuild test robot <[email protected]>Signed-off-by Chunyan Zhang <[email protected]>--- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/Kconfig +1
-1@@ -1444,6 +1444,7 @@ config SERIAL_MEN_Z135 config SERIAL_SPRD tristate "Support for Spreadtrum serial" select SERIAL_CORE + depends on ARM || ARM64 || COMPILE_TEST help This enables the driver for the Spreadtrum's serial. --2.20.1
Greg Kroah-Hartman
maintainerQuoted 18 lines · Chunyan Zhang
Hi Mark, Greg,
Pleas see my answer below.
Quoted 13 lines · Mark Rutland
Quoted 11 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
Quoted 1 line
Quoted 1 line
drivers/tty/serial/sprd_serial.c:1175: undefined referenceto `clk_set_parent'
Because some mips Kconfig-s select
CONFIG_HAVE_CLKbut notCONFIG_COMMON_CLK, so it's probably thatclk_set_parentis missed for those configs.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
To fix this error, this patch adds dependence on ARM || ARM64 for
SERIAL_SPRD.From the above, isn't the real dependency
COMMON_CLOCK?Some arch can implement its own clock APIs, for example AR7 [1].
That's fine, then they can not select this option.
Quoted 5 lines
The sprd serial driver is used on ARM and ARM64 platforms only for now, which uses clock functions provided by
COMMON_CLK, but it has the possibility of being used on other architecture platforms, that was my thought.
Quoted 8 lines
I should revise this commit message to:
"
Because some mips Kconfig-s selectCONFIG_HAVE_CLKbut not defineclk_set_parentwhich is used by the sprd serial driver.
...
"Does it make sense?
The arch is not the issue here, the clock framework is, so properly depend on that, not an arbitrary CPU type.
thanks,
greg k-h
Quoted 41 lines · Greg Kroah-Hartman
Quoted 18 lines · Chunyan Zhang
Hi Mark, Greg,
Pleas see my answer below.
Quoted 13 lines · Mark Rutland
Quoted 11 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
Quoted 1 line
Quoted 1 line
drivers/tty/serial/sprd_serial.c:1175: undefined referenceto `clk_set_parent'
Because some mips Kconfig-s select
CONFIG_HAVE_CLKbut notCONFIG_COMMON_CLK, so it's probably thatclk_set_parentis missed for those configs.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
To fix this error, this patch adds dependence on ARM || ARM64 for
SERIAL_SPRD.From the above, isn't the real dependency
COMMON_CLOCK?Some arch can implement its own clock APIs, for example AR7 [1].
That's fine, then they can not select this option.
Quoted 12 lines
The sprd serial driver is used on ARM and ARM64 platforms only for now, which uses clock functions provided by
COMMON_CLK, but it has the possibility of being used on other architecture platforms, that was my thought.I should revise this commit message to:
"
Because some mips Kconfig-s selectCONFIG_HAVE_CLKbut not defineclk_set_parentwhich is used by the sprd serial driver.
...
"
Quoted 4 lines
Quoted 1 line
Does it make sense?
The arch is not the issue here, the clock framework is, so properly depend on that, not an arbitrary CPU type.
Ok, I will address it.
Thanks,
Chunyan
Greg Kroah-Hartman
maintainerQuoted 26 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
Quoted 1 line
Quoted 1 line
drivers/tty/serial/sprd_serial.c:1175: undefined referenceto `clk_set_parent'
Because some mips Kconfig-s select
CONFIG_HAVE_CLKbut notCONFIG_COMMON_CLK, so it's probably thatclk_set_parentis missed for those configs.To fix this error, this patch adds dependence on ARM || ARM64 for
SERIAL_SPRD.Fixes 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")Reported-by kbuild test robot <[email protected]>Signed-off-by Chunyan Zhang <[email protected]>--- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/Kconfig +0
-0
drivers/tty/serial/Kconfig config SERIAL_MEN_Z135 · line 1447
Quoted 4 lines
drivers/tty/serial/Kconfig +1
-0@@ -1444,6 +1444,7 @@ config SERIAL_MEN_Z135 config SERIAL_SPRD tristate "Support for Spreadtrum serial" select SERIAL_CORE + depends on ARM || ARM64 || COMPILE_TEST
Why not just depend on the proper CLK config option instead?
thanks,
greg k-h