* [PATCH v1 0/2] A fix for StarFive JH7110 clock drivers
@ 2023-04-17 7:41 Hal Feng
2023-04-17 7:41 ` [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case Hal Feng
2023-04-17 7:41 ` [PATCH v1 2/2] clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers Hal Feng
0 siblings, 2 replies; 11+ messages in thread
From: Hal Feng @ 2023-04-17 7:41 UTC (permalink / raw)
To: linux-clk, oe-kbuild-all, linux-mm
Cc: Stephen Boyd, Michael Turquette, Conor Dooley, Paul Gazzillo,
Necip Fazil Yildiran, Emil Renner Berthing, Hal Feng, Xingyu Wu,
linux-kernel
Hi, Stephen,
This series fix some issues of StarFive JH7110 sys and aon clock drivers.
The first patch fix two issues [1] [2] reported by kernel test robot.
The second patch is an addition to patch [3]. It removes the redundant
dev_set_drvdata().
[1] https://lore.kernel.org/oe-kbuild-all/202304140256.aIlJMfbA-lkp@intel.com/
[2] https://lore.kernel.org/oe-kbuild-all/202304140706.aOBNhUj2-lkp@intel.com/
[3] https://lore.kernel.org/all/20230413205528.4044216-1-sboyd@kernel.org/
Hal Feng (2):
clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a
specified case
clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock
drivers
drivers/clk/starfive/Kconfig | 5 +----
drivers/clk/starfive/clk-starfive-jh7110-aon.c | 2 --
drivers/clk/starfive/clk-starfive-jh7110-sys.c | 2 --
3 files changed, 1 insertion(+), 8 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-17 7:41 [PATCH v1 0/2] A fix for StarFive JH7110 clock drivers Hal Feng
@ 2023-04-17 7:41 ` Hal Feng
2023-04-17 9:54 ` Conor Dooley
2023-04-17 7:41 ` [PATCH v1 2/2] clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers Hal Feng
1 sibling, 1 reply; 11+ messages in thread
From: Hal Feng @ 2023-04-17 7:41 UTC (permalink / raw)
To: linux-clk, oe-kbuild-all, linux-mm
Cc: Stephen Boyd, Michael Turquette, Conor Dooley, Paul Gazzillo,
Necip Fazil Yildiran, Emil Renner Berthing, Hal Feng, Xingyu Wu,
linux-kernel
When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]),
RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS
and CLK_STARFIVE_JH7110_AON.
Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation
test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant
selected options of CLK_STARFIVE_JH7110_AON because these options are
already selected by the dependency.
Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver")
Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver")
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
---
drivers/clk/starfive/Kconfig | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig
index 71c1148ee5f6..3fad4adee841 100644
--- a/drivers/clk/starfive/Kconfig
+++ b/drivers/clk/starfive/Kconfig
@@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS
depends on ARCH_STARFIVE || COMPILE_TEST
select AUXILIARY_BUS
select CLK_STARFIVE_JH71X0
- select RESET_STARFIVE_JH7110
+ select RESET_STARFIVE_JH7110 if ARCH_STARFIVE
default ARCH_STARFIVE
help
Say yes here to support the system clock controller on the
@@ -35,9 +35,6 @@ config CLK_STARFIVE_JH7110_SYS
config CLK_STARFIVE_JH7110_AON
tristate "StarFive JH7110 always-on clock support"
depends on CLK_STARFIVE_JH7110_SYS
- select AUXILIARY_BUS
- select CLK_STARFIVE_JH71X0
- select RESET_STARFIVE_JH7110
default m if ARCH_STARFIVE
help
Say yes here to support the always-on clock controller on the
--
2.38.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v1 2/2] clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers
2023-04-17 7:41 [PATCH v1 0/2] A fix for StarFive JH7110 clock drivers Hal Feng
2023-04-17 7:41 ` [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case Hal Feng
@ 2023-04-17 7:41 ` Hal Feng
2023-04-18 1:13 ` Stephen Boyd
1 sibling, 1 reply; 11+ messages in thread
From: Hal Feng @ 2023-04-17 7:41 UTC (permalink / raw)
To: linux-clk, oe-kbuild-all, linux-mm
Cc: Stephen Boyd, Michael Turquette, Conor Dooley, Paul Gazzillo,
Necip Fazil Yildiran, Emil Renner Berthing, Hal Feng, Xingyu Wu,
linux-kernel
The dev_set_drvdata() is no longer needed after we used a wrapper
struct to get the data in auxiliary driver.
Cc: Xingyu Wu <xingyu.wu@starfivetech.com>
Fixes: d1aae0663023 ("clk: starfive: Avoid casting iomem pointers")
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
---
drivers/clk/starfive/clk-starfive-jh7110-aon.c | 2 --
drivers/clk/starfive/clk-starfive-jh7110-sys.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/clk/starfive/clk-starfive-jh7110-aon.c b/drivers/clk/starfive/clk-starfive-jh7110-aon.c
index a2799fe8a234..62954eb7b50a 100644
--- a/drivers/clk/starfive/clk-starfive-jh7110-aon.c
+++ b/drivers/clk/starfive/clk-starfive-jh7110-aon.c
@@ -83,8 +83,6 @@ static int jh7110_aoncrg_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
- dev_set_drvdata(priv->dev, (void *)(&priv->base));
-
for (idx = 0; idx < JH7110_AONCLK_END; idx++) {
u32 max = jh7110_aonclk_data[idx].max;
struct clk_parent_data parents[4] = {};
diff --git a/drivers/clk/starfive/clk-starfive-jh7110-sys.c b/drivers/clk/starfive/clk-starfive-jh7110-sys.c
index 851b93d0f371..e6031345ef05 100644
--- a/drivers/clk/starfive/clk-starfive-jh7110-sys.c
+++ b/drivers/clk/starfive/clk-starfive-jh7110-sys.c
@@ -402,8 +402,6 @@ static int __init jh7110_syscrg_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
- dev_set_drvdata(priv->dev, (void *)(&priv->base));
-
/*
* These PLL clocks are not actually fixed factor clocks and can be
* controlled by the syscon registers of JH7110. They will be dropped
--
2.38.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-17 7:41 ` [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case Hal Feng
@ 2023-04-17 9:54 ` Conor Dooley
2023-04-17 10:06 ` Hal Feng
0 siblings, 1 reply; 11+ messages in thread
From: Conor Dooley @ 2023-04-17 9:54 UTC (permalink / raw)
To: Hal Feng
Cc: linux-clk, oe-kbuild-all, linux-mm, Stephen Boyd,
Michael Turquette, Paul Gazzillo, Necip Fazil Yildiran,
Emil Renner Berthing, Xingyu Wu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1984 bytes --]
On Mon, Apr 17, 2023 at 03:41:14PM +0800, Hal Feng wrote:
> When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]),
> RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS
> and CLK_STARFIVE_JH7110_AON.
>
> Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation
> test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant
> selected options of CLK_STARFIVE_JH7110_AON because these options are
> already selected by the dependency.
>
> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver")
> Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver")
> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
> ---
> drivers/clk/starfive/Kconfig | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig
> index 71c1148ee5f6..3fad4adee841 100644
> --- a/drivers/clk/starfive/Kconfig
> +++ b/drivers/clk/starfive/Kconfig
> @@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS
> depends on ARCH_STARFIVE || COMPILE_TEST
> select AUXILIARY_BUS
> select CLK_STARFIVE_JH71X0
> - select RESET_STARFIVE_JH7110
> + select RESET_STARFIVE_JH7110 if ARCH_STARFIVE
Hmm, I don't really follow the logic above.
Why not just make the if be `if RESET_CONTROLLER` rather than
ARCH_STARFIVE?
I'm probably missing some obvious reason why not.
Cheers,
Conor.
> default ARCH_STARFIVE
> help
> Say yes here to support the system clock controller on the
> @@ -35,9 +35,6 @@ config CLK_STARFIVE_JH7110_SYS
> config CLK_STARFIVE_JH7110_AON
> tristate "StarFive JH7110 always-on clock support"
> depends on CLK_STARFIVE_JH7110_SYS
> - select AUXILIARY_BUS
> - select CLK_STARFIVE_JH71X0
> - select RESET_STARFIVE_JH7110
> default m if ARCH_STARFIVE
> help
> Say yes here to support the always-on clock controller on the
> --
> 2.38.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-17 9:54 ` Conor Dooley
@ 2023-04-17 10:06 ` Hal Feng
2023-04-17 10:18 ` Conor Dooley
0 siblings, 1 reply; 11+ messages in thread
From: Hal Feng @ 2023-04-17 10:06 UTC (permalink / raw)
To: Conor Dooley
Cc: linux-clk, oe-kbuild-all, linux-mm, Stephen Boyd,
Michael Turquette, Paul Gazzillo, Necip Fazil Yildiran,
Emil Renner Berthing, Xingyu Wu, linux-kernel
On Mon, 17 Apr 2023 10:54:09 +0100, Conor Dooley wrote:
> On Mon, Apr 17, 2023 at 03:41:14PM +0800, Hal Feng wrote:
>> When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]),
>> RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS
>> and CLK_STARFIVE_JH7110_AON.
>>
>> Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation
>> test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant
>> selected options of CLK_STARFIVE_JH7110_AON because these options are
>> already selected by the dependency.
>>
>> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver")
>> Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver")
>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
>> ---
>> drivers/clk/starfive/Kconfig | 5 +----
>> 1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig
>> index 71c1148ee5f6..3fad4adee841 100644
>> --- a/drivers/clk/starfive/Kconfig
>> +++ b/drivers/clk/starfive/Kconfig
>> @@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS
>> depends on ARCH_STARFIVE || COMPILE_TEST
>> select AUXILIARY_BUS
>> select CLK_STARFIVE_JH71X0
>> - select RESET_STARFIVE_JH7110
>> + select RESET_STARFIVE_JH7110 if ARCH_STARFIVE
>
> Hmm, I don't really follow the logic above.
> Why not just make the if be `if RESET_CONTROLLER` rather than
> ARCH_STARFIVE?
> I'm probably missing some obvious reason why not.
Note that RESET_CONTROLLER is selected by ARCH_STARFIVE. Thanks.
Best regards,
Hal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-17 10:06 ` Hal Feng
@ 2023-04-17 10:18 ` Conor Dooley
2023-04-18 0:22 ` Stephen Boyd
0 siblings, 1 reply; 11+ messages in thread
From: Conor Dooley @ 2023-04-17 10:18 UTC (permalink / raw)
To: Hal Feng
Cc: linux-clk, oe-kbuild-all, linux-mm, Stephen Boyd,
Michael Turquette, Paul Gazzillo, Necip Fazil Yildiran,
Emil Renner Berthing, Xingyu Wu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]
On Mon, Apr 17, 2023 at 06:06:29PM +0800, Hal Feng wrote:
> On Mon, 17 Apr 2023 10:54:09 +0100, Conor Dooley wrote:
> > On Mon, Apr 17, 2023 at 03:41:14PM +0800, Hal Feng wrote:
> >> When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]),
> >> RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS
> >> and CLK_STARFIVE_JH7110_AON.
> >>
> >> Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation
> >> test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant
> >> selected options of CLK_STARFIVE_JH7110_AON because these options are
> >> already selected by the dependency.
> >>
> >> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver")
> >> Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver")
> >> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
> >> ---
> >> drivers/clk/starfive/Kconfig | 5 +----
> >> 1 file changed, 1 insertion(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig
> >> index 71c1148ee5f6..3fad4adee841 100644
> >> --- a/drivers/clk/starfive/Kconfig
> >> +++ b/drivers/clk/starfive/Kconfig
> >> @@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS
> >> depends on ARCH_STARFIVE || COMPILE_TEST
> >> select AUXILIARY_BUS
> >> select CLK_STARFIVE_JH71X0
> >> - select RESET_STARFIVE_JH7110
> >> + select RESET_STARFIVE_JH7110 if ARCH_STARFIVE
> >
> > Hmm, I don't really follow the logic above.
> > Why not just make the if be `if RESET_CONTROLLER` rather than
> > ARCH_STARFIVE?
> > I'm probably missing some obvious reason why not.
>
> Note that RESET_CONTROLLER is selected by ARCH_STARFIVE. Thanks.
Aye, just the explicit dependency seems like it'd be less fragile and
more obvious in the future.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-17 10:18 ` Conor Dooley
@ 2023-04-18 0:22 ` Stephen Boyd
2023-04-18 2:14 ` Hal Feng
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Boyd @ 2023-04-18 0:22 UTC (permalink / raw)
To: Conor Dooley, Hal Feng
Cc: linux-clk, oe-kbuild-all, linux-mm, Michael Turquette,
Paul Gazzillo, Necip Fazil Yildiran, Emil Renner Berthing,
Xingyu Wu, linux-kernel
Quoting Conor Dooley (2023-04-17 03:18:35)
> On Mon, Apr 17, 2023 at 06:06:29PM +0800, Hal Feng wrote:
> > On Mon, 17 Apr 2023 10:54:09 +0100, Conor Dooley wrote:
> > > On Mon, Apr 17, 2023 at 03:41:14PM +0800, Hal Feng wrote:
> > >> When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]),
> > >> RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS
> > >> and CLK_STARFIVE_JH7110_AON.
> > >>
> > >> Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation
> > >> test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant
> > >> selected options of CLK_STARFIVE_JH7110_AON because these options are
> > >> already selected by the dependency.
> > >>
> > >> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver")
> > >> Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver")
> > >> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
> > >> ---
> > >> drivers/clk/starfive/Kconfig | 5 +----
> > >> 1 file changed, 1 insertion(+), 4 deletions(-)
> > >>
> > >> diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig
> > >> index 71c1148ee5f6..3fad4adee841 100644
> > >> --- a/drivers/clk/starfive/Kconfig
> > >> +++ b/drivers/clk/starfive/Kconfig
> > >> @@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS
> > >> depends on ARCH_STARFIVE || COMPILE_TEST
> > >> select AUXILIARY_BUS
> > >> select CLK_STARFIVE_JH71X0
> > >> - select RESET_STARFIVE_JH7110
> > >> + select RESET_STARFIVE_JH7110 if ARCH_STARFIVE
> > >
> > > Hmm, I don't really follow the logic above.
> > > Why not just make the if be `if RESET_CONTROLLER` rather than
> > > ARCH_STARFIVE?
> > > I'm probably missing some obvious reason why not.
> >
> > Note that RESET_CONTROLLER is selected by ARCH_STARFIVE. Thanks.
>
> Aye, just the explicit dependency seems like it'd be less fragile and
> more obvious in the future.
Agreed. Be explicit so we don't have to hunt down select dependencies.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 2/2] clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers
2023-04-17 7:41 ` [PATCH v1 2/2] clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers Hal Feng
@ 2023-04-18 1:13 ` Stephen Boyd
0 siblings, 0 replies; 11+ messages in thread
From: Stephen Boyd @ 2023-04-18 1:13 UTC (permalink / raw)
To: Hal Feng, linux-clk, linux-mm, oe-kbuild-all
Cc: Michael Turquette, Conor Dooley, Paul Gazzillo,
Necip Fazil Yildiran, Emil Renner Berthing, Hal Feng, Xingyu Wu,
linux-kernel
Quoting Hal Feng (2023-04-17 00:41:15)
> The dev_set_drvdata() is no longer needed after we used a wrapper
> struct to get the data in auxiliary driver.
>
> Cc: Xingyu Wu <xingyu.wu@starfivetech.com>
> Fixes: d1aae0663023 ("clk: starfive: Avoid casting iomem pointers")
> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-18 0:22 ` Stephen Boyd
@ 2023-04-18 2:14 ` Hal Feng
2023-04-18 6:31 ` Conor Dooley
0 siblings, 1 reply; 11+ messages in thread
From: Hal Feng @ 2023-04-18 2:14 UTC (permalink / raw)
To: Stephen Boyd, Conor Dooley
Cc: linux-clk, oe-kbuild-all, linux-mm, Michael Turquette,
Paul Gazzillo, Necip Fazil Yildiran, Emil Renner Berthing,
Xingyu Wu, linux-kernel
On Mon, 17 Apr 2023 17:22:01 -0700, Stephen Boyd wrote:
> Quoting Conor Dooley (2023-04-17 03:18:35)
>> On Mon, Apr 17, 2023 at 06:06:29PM +0800, Hal Feng wrote:
>> > On Mon, 17 Apr 2023 10:54:09 +0100, Conor Dooley wrote:
>> > > On Mon, Apr 17, 2023 at 03:41:14PM +0800, Hal Feng wrote:
>> > >> When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]),
>> > >> RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS
>> > >> and CLK_STARFIVE_JH7110_AON.
>> > >>
>> > >> Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation
>> > >> test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant
>> > >> selected options of CLK_STARFIVE_JH7110_AON because these options are
>> > >> already selected by the dependency.
>> > >>
>> > >> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver")
>> > >> Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver")
>> > >> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
>> > >> ---
>> > >> drivers/clk/starfive/Kconfig | 5 +----
>> > >> 1 file changed, 1 insertion(+), 4 deletions(-)
>> > >>
>> > >> diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig
>> > >> index 71c1148ee5f6..3fad4adee841 100644
>> > >> --- a/drivers/clk/starfive/Kconfig
>> > >> +++ b/drivers/clk/starfive/Kconfig
>> > >> @@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS
>> > >> depends on ARCH_STARFIVE || COMPILE_TEST
>> > >> select AUXILIARY_BUS
>> > >> select CLK_STARFIVE_JH71X0
>> > >> - select RESET_STARFIVE_JH7110
>> > >> + select RESET_STARFIVE_JH7110 if ARCH_STARFIVE
>> > >
>> > > Hmm, I don't really follow the logic above.
>> > > Why not just make the if be `if RESET_CONTROLLER` rather than
>> > > ARCH_STARFIVE?
>> > > I'm probably missing some obvious reason why not.
>> >
>> > Note that RESET_CONTROLLER is selected by ARCH_STARFIVE. Thanks.
>>
>> Aye, just the explicit dependency seems like it'd be less fragile and
>> more obvious in the future.
>
> Agreed. Be explicit so we don't have to hunt down select dependencies.
With further consideration, on the other hand, if we set `if ARCH_STARFIVE`
here, it can point out that we need the reset driver to boot up JH7110
besides the clock drivers, and the reset driver is not a necessary option
for compilation test. So the reset driver is independent to the clock
drivers when you doing a compilation test.
If we set `if RESET_CONTROLLER` here, the reset driver will be compiled
automatically when (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] &&
RESET_CONTROLLER [=y] && CLK_STARFIVE_JH7110_SYS [=y]).
Best regards,
Hal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-18 2:14 ` Hal Feng
@ 2023-04-18 6:31 ` Conor Dooley
2023-04-18 12:42 ` Hal Feng
0 siblings, 1 reply; 11+ messages in thread
From: Conor Dooley @ 2023-04-18 6:31 UTC (permalink / raw)
To: Hal Feng
Cc: Stephen Boyd, linux-clk, oe-kbuild-all, linux-mm,
Michael Turquette, Paul Gazzillo, Necip Fazil Yildiran,
Emil Renner Berthing, Xingyu Wu, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
On Tue, Apr 18, 2023 at 10:14:06AM +0800, Hal Feng wrote:
> On Mon, 17 Apr 2023 17:22:01 -0700, Stephen Boyd wrote:
> > Quoting Conor Dooley (2023-04-17 03:18:35)
> >> Aye, just the explicit dependency seems like it'd be less fragile and
> >> more obvious in the future.
> >
> > Agreed. Be explicit so we don't have to hunt down select dependencies.
>
> With further consideration, on the other hand, if we set `if ARCH_STARFIVE`
> here, it can point out that we need the reset driver to boot up JH7110
> besides the clock drivers, and the reset driver is not a necessary option
> for compilation test. So the reset driver is independent to the clock
> drivers when you doing a compilation test.
If ARCH_STARFIVE is enabled, both options (RESET_CONTROLLER &
RESET_STARFIVE_JH7110) will be selected & you don't need to worry about
people not realising this. Try it out & look at the option in
menuconfig.
> If we set `if RESET_CONTROLLER` here, the reset driver will be compiled
> automatically when (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] &&
> RESET_CONTROLLER [=y] && CLK_STARFIVE_JH7110_SYS [=y]).
This is what we want, right? The more often it gets built by randconfig
etc the better, especially for archs that are not RISC-V.
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
2023-04-18 6:31 ` Conor Dooley
@ 2023-04-18 12:42 ` Hal Feng
0 siblings, 0 replies; 11+ messages in thread
From: Hal Feng @ 2023-04-18 12:42 UTC (permalink / raw)
To: Conor Dooley
Cc: Stephen Boyd, linux-clk, oe-kbuild-all, linux-mm,
Michael Turquette, Paul Gazzillo, Necip Fazil Yildiran,
Emil Renner Berthing, Xingyu Wu, linux-kernel
On Tue, 18 Apr 2023 07:31:47 +0100, Conor Dooley wrote:
> On Tue, Apr 18, 2023 at 10:14:06AM +0800, Hal Feng wrote:
>> On Mon, 17 Apr 2023 17:22:01 -0700, Stephen Boyd wrote:
>> > Quoting Conor Dooley (2023-04-17 03:18:35)
>
>> >> Aye, just the explicit dependency seems like it'd be less fragile and
>> >> more obvious in the future.
>> >
>> > Agreed. Be explicit so we don't have to hunt down select dependencies.
>>
>> With further consideration, on the other hand, if we set `if ARCH_STARFIVE`
>> here, it can point out that we need the reset driver to boot up JH7110
>> besides the clock drivers, and the reset driver is not a necessary option
>> for compilation test. So the reset driver is independent to the clock
>> drivers when you doing a compilation test.
>
> If ARCH_STARFIVE is enabled, both options (RESET_CONTROLLER &
> RESET_STARFIVE_JH7110) will be selected & you don't need to worry about
> people not realising this. Try it out & look at the option in
> menuconfig.
>
>> If we set `if RESET_CONTROLLER` here, the reset driver will be compiled
>> automatically when (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] &&
>> RESET_CONTROLLER [=y] && CLK_STARFIVE_JH7110_SYS [=y]).
>
> This is what we want, right? The more often it gets built by randconfig
> etc the better, especially for archs that are not RISC-V.
OK, will fix it in v2.
Best regards,
Hal
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-04-18 12:42 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 7:41 [PATCH v1 0/2] A fix for StarFive JH7110 clock drivers Hal Feng
2023-04-17 7:41 ` [PATCH v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case Hal Feng
2023-04-17 9:54 ` Conor Dooley
2023-04-17 10:06 ` Hal Feng
2023-04-17 10:18 ` Conor Dooley
2023-04-18 0:22 ` Stephen Boyd
2023-04-18 2:14 ` Hal Feng
2023-04-18 6:31 ` Conor Dooley
2023-04-18 12:42 ` Hal Feng
2023-04-17 7:41 ` [PATCH v1 2/2] clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers Hal Feng
2023-04-18 1:13 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox