mbox series

[v7,0/6] stm32 clocksource driver rework

Message ID 1508752722-4489-1-git-send-email-benjamin.gaignard@linaro.org
Headers show
Series stm32 clocksource driver rework | expand

Message

Benjamin Gaignard Oct. 23, 2017, 9:58 a.m. UTC
version 7:
 - reword "clocksource: stm32: only use 32 bits timers" commit message
   to give more details about why 16 bits are problematics.

version 6:
 - add dedicated patch min delta change
 - rework commit messages, I hope it will be better now
 - change new function name from timer_of_deinit to timer_of_exit
 - make stm32_clock_event_set_next_event() safer like done in other
   drivers

version 6:
- add timer_of_deinit function in core
- rework failure cases in probe function

version 5:
- rebase on top of timer/core branch
- rework commit message of the first patch

version 4:
- split patch in 3 parts
  - convert code to timer_of
  - only use 32 bits timers
  - add clocksource support

version 3:
- fix comments done by Daniel
- use timer_of helper functions

version 2:
- fix uninitialized variable


Benjamin Gaignard (6):
  timer: add timer_of_exit function
  clocksource: stm32: convert driver to timer_of
  clocksource: stm32: increase min delta value
  clocksource: stm32: only use 32 bits timers
  clocksource: stm32: add clocksource support
  arm: dts: stm32: remove useless clocksource nodes

 arch/arm/boot/dts/stm32f429.dtsi  |  32 -----
 arch/arm/boot/dts/stm32f746.dtsi  |  32 -----
 drivers/clocksource/Kconfig       |   1 +
 drivers/clocksource/timer-of.c    |  12 ++
 drivers/clocksource/timer-of.h    |   3 +
 drivers/clocksource/timer-stm32.c | 241 ++++++++++++++++++++------------------
 6 files changed, 144 insertions(+), 177 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Daniel Lezcano Oct. 25, 2017, 8:37 a.m. UTC | #1
On 23/10/2017 11:58, Benjamin Gaignard wrote:
> Add this exit function to be able to undo what have been done

> in timer_of_init().

> 

> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>


I will take this one for 4.15

Thanks

  -- Daniel

> ---

>  drivers/clocksource/timer-of.c | 12 ++++++++++++

>  drivers/clocksource/timer-of.h |  3 +++

>  2 files changed, 15 insertions(+)

> 

> diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c

> index c79122d..7c64a5c1 100644

> --- a/drivers/clocksource/timer-of.c

> +++ b/drivers/clocksource/timer-of.c

> @@ -176,3 +176,15 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)

>  		timer_base_exit(&to->of_base);

>  	return ret;

>  }

> +

> +void timer_of_exit(struct timer_of *to)

> +{

> +	if (to->flags & TIMER_OF_IRQ)

> +		timer_irq_exit(&to->of_irq);

> +

> +	if (to->flags & TIMER_OF_CLOCK)

> +		timer_clk_exit(&to->of_clk);

> +

> +	if (to->flags & TIMER_OF_BASE)

> +		timer_base_exit(&to->of_base);

> +}

> diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h

> index e0d7272..44f57e0 100644

> --- a/drivers/clocksource/timer-of.h

> +++ b/drivers/clocksource/timer-of.h

> @@ -66,4 +66,7 @@ static inline unsigned long timer_of_period(struct timer_of *to)

>  

>  extern int __init timer_of_init(struct device_node *np,

>  				struct timer_of *to);

> +

> +extern void timer_of_exit(struct timer_of *to);

> +

>  #endif

> 



-- 
 <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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Gaignard Nov. 7, 2017, 10:16 a.m. UTC | #2
2017-10-23 11:58 GMT+02:00 Benjamin Gaignard <benjamin.gaignard@linaro.org>:
> version 7:

>  - reword "clocksource: stm32: only use 32 bits timers" commit message

>    to give more details about why 16 bits are problematics.


Gentle ping in this last version.
The first patch for timer core has been merge but driver patches still
need to be reviewed

Thanks,
Benjamin

>

> version 6:

>  - add dedicated patch min delta change

>  - rework commit messages, I hope it will be better now

>  - change new function name from timer_of_deinit to timer_of_exit

>  - make stm32_clock_event_set_next_event() safer like done in other

>    drivers

>

> version 6:

> - add timer_of_deinit function in core

> - rework failure cases in probe function

>

> version 5:

> - rebase on top of timer/core branch

> - rework commit message of the first patch

>

> version 4:

> - split patch in 3 parts

>   - convert code to timer_of

>   - only use 32 bits timers

>   - add clocksource support

>

> version 3:

> - fix comments done by Daniel

> - use timer_of helper functions

>

> version 2:

> - fix uninitialized variable

>

>

> Benjamin Gaignard (6):

>   timer: add timer_of_exit function

>   clocksource: stm32: convert driver to timer_of

>   clocksource: stm32: increase min delta value

>   clocksource: stm32: only use 32 bits timers

>   clocksource: stm32: add clocksource support

>   arm: dts: stm32: remove useless clocksource nodes

>

>  arch/arm/boot/dts/stm32f429.dtsi  |  32 -----

>  arch/arm/boot/dts/stm32f746.dtsi  |  32 -----

>  drivers/clocksource/Kconfig       |   1 +

>  drivers/clocksource/timer-of.c    |  12 ++

>  drivers/clocksource/timer-of.h    |   3 +

>  drivers/clocksource/timer-stm32.c | 241 ++++++++++++++++++++------------------

>  6 files changed, 144 insertions(+), 177 deletions(-)

>

> --

> 2.7.4

>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html