2018-05-03 13:14:25

by Chunyan Zhang

[permalink] [raw]
Subject: [PATCH] clocksource/drivers/sprd: Fix Kconfig dependency

SPRD arch doesn't select SPRD_TIMER, so this config would not
appear even if ARCH_SPRD is set and COMPILE_TEST is not.

Fix the Kconfig selection rule by letting the SPRD arch to select.

This patch also sets the default value of SPRD_TIMER with ARCH_SPRD,
but it still is selectable to users.

Signed-off-by: Chunyan Zhang <[email protected]>
---
drivers/clocksource/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 619b120..c89e4d6 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -468,8 +468,9 @@ config MTK_TIMER
Support for Mediatek timer driver.

config SPRD_TIMER
- bool "Spreadtrum timer driver" if COMPILE_TEST
- depends on HAS_IOMEM
+ bool "Spreadtrum timer driver"
+ depends on HAS_IOMEM && (ARCH_SPRD || COMPILE_TEST)
+ default ARCH_SPRD
select TIMER_OF
help
Enables support for the Spreadtrum timer driver.
--
2.7.4



2018-05-07 05:52:37

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/sprd: Fix Kconfig dependency

On Thu, May 03, 2018 at 08:27:32PM +0800, Chunyan Zhang wrote:
> SPRD arch doesn't select SPRD_TIMER, so this config would not
> appear even if ARCH_SPRD is set and COMPILE_TEST is not.
>
> Fix the Kconfig selection rule by letting the SPRD arch to select.

Instead of changing this Kconfig, please fix the arch's Kconfig by selecting
SPRD_TIMER.



--

<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

2018-05-07 06:05:45

by Chunyan Zhang

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/sprd: Fix Kconfig dependency

Hi Daniel,

On 7 May 2018 at 13:51, Daniel Lezcano <[email protected]> wrote:
> On Thu, May 03, 2018 at 08:27:32PM +0800, Chunyan Zhang wrote:
>> SPRD arch doesn't select SPRD_TIMER, so this config would not
>> appear even if ARCH_SPRD is set and COMPILE_TEST is not.
>>
>> Fix the Kconfig selection rule by letting the SPRD arch to select.
>
> Instead of changing this Kconfig, please fix the arch's Kconfig by selecting
> SPRD_TIMER.

Oh, that's not my expectation, I hope we can give users permission of
not selecting SPRD TIMER driver even if SPRD arch is selected. (I can
confirm that all Spreadtrum's platforms in mainline can work without
this driver. An enough minimum workable system doesn't need this
driver indeed.)

Thanks,
Chunyan

2018-05-07 07:50:40

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/sprd: Fix Kconfig dependency

On Mon, May 07, 2018 at 02:04:38PM +0800, Chunyan Zhang wrote:
> Hi Daniel,
>
> On 7 May 2018 at 13:51, Daniel Lezcano <[email protected]> wrote:
> > On Thu, May 03, 2018 at 08:27:32PM +0800, Chunyan Zhang wrote:
> >> SPRD arch doesn't select SPRD_TIMER, so this config would not
> >> appear even if ARCH_SPRD is set and COMPILE_TEST is not.
> >>
> >> Fix the Kconfig selection rule by letting the SPRD arch to select.
> >
> > Instead of changing this Kconfig, please fix the arch's Kconfig by selecting
> > SPRD_TIMER.
>
> Oh, that's not my expectation, I hope we can give users permission of
> not selecting SPRD TIMER driver even if SPRD arch is selected. (I can
> confirm that all Spreadtrum's platforms in mainline can work without
> this driver. An enough minimum workable system doesn't need this
> driver indeed.)

Ok, can you add the EXPERT option in addition to the bool like:

https://lkml.org/lkml/2018/4/3/897

Thanks.

-- Daniel


--

<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

2018-05-07 08:08:44

by Chunyan Zhang

[permalink] [raw]
Subject: Re: [PATCH] clocksource/drivers/sprd: Fix Kconfig dependency

On 7 May 2018 at 15:49, Daniel Lezcano <[email protected]> wrote:
> On Mon, May 07, 2018 at 02:04:38PM +0800, Chunyan Zhang wrote:
>> Hi Daniel,
>>
>> On 7 May 2018 at 13:51, Daniel Lezcano <[email protected]> wrote:
>> > On Thu, May 03, 2018 at 08:27:32PM +0800, Chunyan Zhang wrote:
>> >> SPRD arch doesn't select SPRD_TIMER, so this config would not
>> >> appear even if ARCH_SPRD is set and COMPILE_TEST is not.
>> >>
>> >> Fix the Kconfig selection rule by letting the SPRD arch to select.
>> >
>> > Instead of changing this Kconfig, please fix the arch's Kconfig by selecting
>> > SPRD_TIMER.
>>
>> Oh, that's not my expectation, I hope we can give users permission of
>> not selecting SPRD TIMER driver even if SPRD arch is selected. (I can
>> confirm that all Spreadtrum's platforms in mainline can work without
>> this driver. An enough minimum workable system doesn't need this
>> driver indeed.)
>
> Ok, can you add the EXPERT option in addition to the bool like:

Sure, that makes more sense indeed :)

Thanks for the review,
Chunyan

>
> https://lkml.org/lkml/2018/4/3/897
>
> Thanks.
>
> -- Daniel
>
>
> --
>
> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog