* [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64
@ 2020-03-24 6:49 Chunyan Zhang
2020-03-24 11:21 ` Mark Rutland
2020-03-24 11:29 ` Greg Kroah-Hartman
0 siblings, 2 replies; 6+ messages in thread
From: Chunyan Zhang @ 2020-03-24 6:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel, Orson Zhai, Baolin Wang,
Chunyan Zhang, Chunyan Zhang
From: Chunyan Zhang <chunyan.zhang@unisoc.com>
kbuild-test reported an error:
config: mips-randconfig-a001-20200321 ...
>> 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.
Fixes: 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
---
drivers/tty/serial/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index b43dce785a58..417f7e45a3f8 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64
2020-03-24 6:49 [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64 Chunyan Zhang
@ 2020-03-24 11:21 ` Mark Rutland
2020-03-25 1:37 ` Chunyan Zhang
2020-03-24 11:29 ` Greg Kroah-Hartman
1 sibling, 1 reply; 6+ messages in thread
From: Mark Rutland @ 2020-03-24 11:21 UTC (permalink / raw)
To: Chunyan Zhang
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel,
Orson Zhai, Baolin Wang, Chunyan Zhang
On Tue, Mar 24, 2020 at 02:49:49PM +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <chunyan.zhang@unisoc.com>
>
> kbuild-test reported an error:
>
> config: mips-randconfig-a001-20200321 ...
> >> 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.
From the above, isn't the real dependency COMMON_CLOCK?
Mark.
>
> Fixes: 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
> ---
> drivers/tty/serial/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index b43dce785a58..417f7e45a3f8 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64
2020-03-24 6:49 [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64 Chunyan Zhang
2020-03-24 11:21 ` Mark Rutland
@ 2020-03-24 11:29 ` Greg Kroah-Hartman
1 sibling, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-24 11:29 UTC (permalink / raw)
To: Chunyan Zhang
Cc: Jiri Slaby, linux-serial, linux-kernel, Orson Zhai, Baolin Wang,
Chunyan Zhang
On Tue, Mar 24, 2020 at 02:49:49PM +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <chunyan.zhang@unisoc.com>
>
> kbuild-test reported an error:
>
> config: mips-randconfig-a001-20200321 ...
> >> 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.
>
> Fixes: 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
> ---
> drivers/tty/serial/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index b43dce785a58..417f7e45a3f8 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64
2020-03-24 11:21 ` Mark Rutland
@ 2020-03-25 1:37 ` Chunyan Zhang
2020-03-25 7:01 ` Greg Kroah-Hartman
0 siblings, 1 reply; 6+ messages in thread
From: Chunyan Zhang @ 2020-03-25 1:37 UTC (permalink / raw)
To: Mark Rutland, Greg Kroah-Hartman
Cc: Jiri Slaby, open list:SERIAL DRIVERS, Linux Kernel Mailing List,
Orson Zhai, Baolin Wang, Chunyan Zhang
Hi Mark, Greg,
Pleas see my answer below.
On Tue, 24 Mar 2020 at 19:21, Mark Rutland <mark.rutland@arm.com> wrote:
>
> On Tue, Mar 24, 2020 at 02:49:49PM +0800, Chunyan Zhang wrote:
> > From: Chunyan Zhang <chunyan.zhang@unisoc.com>
> >
> > kbuild-test reported an error:
> >
> > config: mips-randconfig-a001-20200321 ...
> > >> 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.
>
> 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
>
> Mark.
>
> >
> > Fixes: 7ba87cfec71a ("tty: serial: make SERIAL_SPRD not depend on ARCH_SPRD")
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
> > ---
> > drivers/tty/serial/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > index b43dce785a58..417f7e45a3f8 100644
> > --- a/drivers/tty/serial/Kconfig
> > +++ b/drivers/tty/serial/Kconfig
> > @@ -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
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64
2020-03-25 1:37 ` Chunyan Zhang
@ 2020-03-25 7:01 ` Greg Kroah-Hartman
2020-03-25 7:40 ` Chunyan Zhang
0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-25 7:01 UTC (permalink / raw)
To: Chunyan Zhang
Cc: Mark Rutland, Jiri Slaby, open list:SERIAL DRIVERS,
Linux Kernel Mailing List, Orson Zhai, Baolin Wang,
Chunyan Zhang
On Wed, Mar 25, 2020 at 09:37:00AM +0800, Chunyan Zhang wrote:
> Hi Mark, Greg,
>
> Pleas see my answer below.
>
> On Tue, 24 Mar 2020 at 19:21, Mark Rutland <mark.rutland@arm.com> wrote:
> >
> > On Tue, Mar 24, 2020 at 02:49:49PM +0800, Chunyan Zhang wrote:
> > > From: Chunyan Zhang <chunyan.zhang@unisoc.com>
> > >
> > > kbuild-test reported an error:
> > >
> > > config: mips-randconfig-a001-20200321 ...
> > > >> 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.
> >
> > 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.
> 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?
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64
2020-03-25 7:01 ` Greg Kroah-Hartman
@ 2020-03-25 7:40 ` Chunyan Zhang
0 siblings, 0 replies; 6+ messages in thread
From: Chunyan Zhang @ 2020-03-25 7:40 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Mark Rutland, Jiri Slaby, open list:SERIAL DRIVERS,
Linux Kernel Mailing List, Orson Zhai, Baolin Wang,
Chunyan Zhang
On Wed, 25 Mar 2020 at 15:02, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Wed, Mar 25, 2020 at 09:37:00AM +0800, Chunyan Zhang wrote:
> > Hi Mark, Greg,
> >
> > Pleas see my answer below.
> >
> > On Tue, 24 Mar 2020 at 19:21, Mark Rutland <mark.rutland@arm.com> wrote:
> > >
> > > On Tue, Mar 24, 2020 at 02:49:49PM +0800, Chunyan Zhang wrote:
> > > > From: Chunyan Zhang <chunyan.zhang@unisoc.com>
> > > >
> > > > kbuild-test reported an error:
> > > >
> > > > config: mips-randconfig-a001-20200321 ...
> > > > >> 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.
> > >
> > > 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.
>
> > 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?
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-03-25 7:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 6:49 [PATCH] tty: serial: make SERIAL_SPRD depends on ARM or ARM64 Chunyan Zhang
2020-03-24 11:21 ` Mark Rutland
2020-03-25 1:37 ` Chunyan Zhang
2020-03-25 7:01 ` Greg Kroah-Hartman
2020-03-25 7:40 ` Chunyan Zhang
2020-03-24 11:29 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).