diff mbox

[v2,3/6] clocksource/drivers: atmel-pit: allow unselecting ATMEL_PIT

Message ID 20180105143006.5369-4-alexandre.belloni@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexandre Belloni Jan. 5, 2018, 2:30 p.m. UTC
With the new TCB clocksource driver, atmel platforms are now able to boot
without the PIT driver. Allow unselecting it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/clocksource/Kconfig | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Daniel Lezcano Jan. 7, 2018, 6:07 p.m. UTC | #1
On 05/01/2018 15:30, Alexandre Belloni wrote:
> With the new TCB clocksource driver, atmel platforms are now able to boot
> without the PIT driver. Allow unselecting it.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  drivers/clocksource/Kconfig | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 5609572e0236..55ccfa0ba63b 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -381,7 +381,14 @@ config ARMV7M_SYSTICK
>  
>  config ATMEL_PIT
>  	select TIMER_OF if OF
> -	def_bool SOC_AT91SAM9 || SOC_SAMA5
> +	bool "Atmel Periodic Interval Timer (PIT)"
> +	depends on SOC_AT91SAM9 || SOC_SAMA5
> +	default SOC_AT91SAM9 || SOC_SAMA5
> +	help
> +	  Select this to get a clocksource based on the Atmel Periodic Interval
> +	  Timer. It has a relatively low resolution and the TC Block clocksource
> +	  should be preferred.
> +	  It also provides a clock event device.

Please conform to the format:

config ATMEL_PIT
	bool "Atmel Periodic Interval Timer (PIT)" if COMPILE_TEST
	select ...
	help
	    bla bla

and select ATMEL_PIT from the platform's Kconfig.


>  config ATMEL_ST
>  	bool "Atmel ST timer support" if COMPILE_TEST
>
Alexandre Belloni Jan. 7, 2018, 6:44 p.m. UTC | #2
On 07/01/2018 at 19:07:13 +0100, Daniel Lezcano wrote:
> On 05/01/2018 15:30, Alexandre Belloni wrote:
> > With the new TCB clocksource driver, atmel platforms are now able to boot
> > without the PIT driver. Allow unselecting it.
> > 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > ---
> >  drivers/clocksource/Kconfig | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> > index 5609572e0236..55ccfa0ba63b 100644
> > --- a/drivers/clocksource/Kconfig
> > +++ b/drivers/clocksource/Kconfig
> > @@ -381,7 +381,14 @@ config ARMV7M_SYSTICK
> >  
> >  config ATMEL_PIT
> >  	select TIMER_OF if OF
> > -	def_bool SOC_AT91SAM9 || SOC_SAMA5
> > +	bool "Atmel Periodic Interval Timer (PIT)"
> > +	depends on SOC_AT91SAM9 || SOC_SAMA5
> > +	default SOC_AT91SAM9 || SOC_SAMA5
> > +	help
> > +	  Select this to get a clocksource based on the Atmel Periodic Interval
> > +	  Timer. It has a relatively low resolution and the TC Block clocksource
> > +	  should be preferred.
> > +	  It also provides a clock event device.
> 
> Please conform to the format:
> 
> config ATMEL_PIT
> 	bool "Atmel Periodic Interval Timer (PIT)" if COMPILE_TEST
> 	select ...
> 	help
> 	    bla bla
> 
> and select ATMEL_PIT from the platform's Kconfig.
> 

Well, the goal is actually to allow people to unselect it so we don't
want the platform to select it.
Daniel Lezcano Jan. 8, 2018, 7:23 a.m. UTC | #3
On 07/01/2018 19:44, Alexandre Belloni wrote:
> On 07/01/2018 at 19:07:13 +0100, Daniel Lezcano wrote:
>> On 05/01/2018 15:30, Alexandre Belloni wrote:
>>> With the new TCB clocksource driver, atmel platforms are now able to boot
>>> without the PIT driver. Allow unselecting it.
>>>
>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>> ---
>>>  drivers/clocksource/Kconfig | 9 ++++++++-
>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>>> index 5609572e0236..55ccfa0ba63b 100644
>>> --- a/drivers/clocksource/Kconfig
>>> +++ b/drivers/clocksource/Kconfig
>>> @@ -381,7 +381,14 @@ config ARMV7M_SYSTICK
>>>  
>>>  config ATMEL_PIT
>>>  	select TIMER_OF if OF
>>> -	def_bool SOC_AT91SAM9 || SOC_SAMA5
>>> +	bool "Atmel Periodic Interval Timer (PIT)"
>>> +	depends on SOC_AT91SAM9 || SOC_SAMA5
>>> +	default SOC_AT91SAM9 || SOC_SAMA5
>>> +	help
>>> +	  Select this to get a clocksource based on the Atmel Periodic Interval
>>> +	  Timer. It has a relatively low resolution and the TC Block clocksource
>>> +	  should be preferred.
>>> +	  It also provides a clock event device.
>>
>> Please conform to the format:
>>
>> config ATMEL_PIT
>> 	bool "Atmel Periodic Interval Timer (PIT)" if COMPILE_TEST
>> 	select ...
>> 	help
>> 	    bla bla
>>
>> and select ATMEL_PIT from the platform's Kconfig.
>>
> 
> Well, the goal is actually to allow people to unselect it so we don't
> want the platform to select it.

Why do you need people to unselect it?

The goal of the Kconfig here is to be silent except in the case the
COMPILE_TEST option is set for cross-compilation test coverage.

We are migrating all these options to this format. Please make it silent.
Boris BREZILLON Jan. 8, 2018, 8:22 a.m. UTC | #4
On Mon, 8 Jan 2018 08:23:02 +0100
Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

> On 07/01/2018 19:44, Alexandre Belloni wrote:
> > On 07/01/2018 at 19:07:13 +0100, Daniel Lezcano wrote:  
> >> On 05/01/2018 15:30, Alexandre Belloni wrote:  
> >>> With the new TCB clocksource driver, atmel platforms are now able to boot
> >>> without the PIT driver. Allow unselecting it.
> >>>
> >>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> >>> ---
> >>>  drivers/clocksource/Kconfig | 9 ++++++++-
> >>>  1 file changed, 8 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> >>> index 5609572e0236..55ccfa0ba63b 100644
> >>> --- a/drivers/clocksource/Kconfig
> >>> +++ b/drivers/clocksource/Kconfig
> >>> @@ -381,7 +381,14 @@ config ARMV7M_SYSTICK
> >>>  
> >>>  config ATMEL_PIT
> >>>  	select TIMER_OF if OF
> >>> -	def_bool SOC_AT91SAM9 || SOC_SAMA5
> >>> +	bool "Atmel Periodic Interval Timer (PIT)"
> >>> +	depends on SOC_AT91SAM9 || SOC_SAMA5
> >>> +	default SOC_AT91SAM9 || SOC_SAMA5
> >>> +	help
> >>> +	  Select this to get a clocksource based on the Atmel Periodic Interval
> >>> +	  Timer. It has a relatively low resolution and the TC Block clocksource
> >>> +	  should be preferred.
> >>> +	  It also provides a clock event device.  
> >>
> >> Please conform to the format:
> >>
> >> config ATMEL_PIT
> >> 	bool "Atmel Periodic Interval Timer (PIT)" if COMPILE_TEST
> >> 	select ...
> >> 	help
> >> 	    bla bla
> >>
> >> and select ATMEL_PIT from the platform's Kconfig.
> >>  
> > 
> > Well, the goal is actually to allow people to unselect it so we don't
> > want the platform to select it.  
> 
> Why do you need people to unselect it?

Because we have 2 possible clocksource for atmel platforms: the PIT or
the TCB, if the TCB is selected there's no point in compiling the PIT
driver.

> 
> The goal of the Kconfig here is to be silent except in the case the
> COMPILE_TEST option is set for cross-compilation test coverage.
> 
> We are migrating all these options to this format. Please make it silent.
> 
>
Daniel Lezcano Jan. 8, 2018, 8:53 a.m. UTC | #5
On 08/01/2018 09:22, Boris Brezillon wrote:
> On Mon, 8 Jan 2018 08:23:02 +0100
> Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> 
>> On 07/01/2018 19:44, Alexandre Belloni wrote:
>>> On 07/01/2018 at 19:07:13 +0100, Daniel Lezcano wrote:  
>>>> On 05/01/2018 15:30, Alexandre Belloni wrote:  
>>>>> With the new TCB clocksource driver, atmel platforms are now able to boot
>>>>> without the PIT driver. Allow unselecting it.
>>>>>
>>>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>>>> ---
>>>>>  drivers/clocksource/Kconfig | 9 ++++++++-
>>>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>>>>> index 5609572e0236..55ccfa0ba63b 100644
>>>>> --- a/drivers/clocksource/Kconfig
>>>>> +++ b/drivers/clocksource/Kconfig
>>>>> @@ -381,7 +381,14 @@ config ARMV7M_SYSTICK
>>>>>  
>>>>>  config ATMEL_PIT
>>>>>  	select TIMER_OF if OF
>>>>> -	def_bool SOC_AT91SAM9 || SOC_SAMA5
>>>>> +	bool "Atmel Periodic Interval Timer (PIT)"
>>>>> +	depends on SOC_AT91SAM9 || SOC_SAMA5
>>>>> +	default SOC_AT91SAM9 || SOC_SAMA5
>>>>> +	help
>>>>> +	  Select this to get a clocksource based on the Atmel Periodic Interval
>>>>> +	  Timer. It has a relatively low resolution and the TC Block clocksource
>>>>> +	  should be preferred.
>>>>> +	  It also provides a clock event device.  
>>>>
>>>> Please conform to the format:
>>>>
>>>> config ATMEL_PIT
>>>> 	bool "Atmel Periodic Interval Timer (PIT)" if COMPILE_TEST
>>>> 	select ...
>>>> 	help
>>>> 	    bla bla
>>>>
>>>> and select ATMEL_PIT from the platform's Kconfig.
>>>>  
>>>
>>> Well, the goal is actually to allow people to unselect it so we don't
>>> want the platform to select it.  
>>
>> Why do you need people to unselect it?
> 
> Because we have 2 possible clocksource for atmel platforms: the PIT or
> the TCB, if the TCB is selected there's no point in compiling the PIT
> driver.

Why the platform's Kconfig can't do that ?
diff mbox

Patch

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 5609572e0236..55ccfa0ba63b 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -381,7 +381,14 @@  config ARMV7M_SYSTICK
 
 config ATMEL_PIT
 	select TIMER_OF if OF
-	def_bool SOC_AT91SAM9 || SOC_SAMA5
+	bool "Atmel Periodic Interval Timer (PIT)"
+	depends on SOC_AT91SAM9 || SOC_SAMA5
+	default SOC_AT91SAM9 || SOC_SAMA5
+	help
+	  Select this to get a clocksource based on the Atmel Periodic Interval
+	  Timer. It has a relatively low resolution and the TC Block clocksource
+	  should be preferred.
+	  It also provides a clock event device.
 
 config ATMEL_ST
 	bool "Atmel ST timer support" if COMPILE_TEST