mbox series

[v9,0/6] stm32 clocksource driver rework

Message ID 20171208113250.359-1-benjamin.gaignard@st.com
Headers show
Series stm32 clocksource driver rework | expand

Message

Benjamin Gaignard Dec. 8, 2017, 11:32 a.m. UTC
version 9:
 - rebased on timer/master where timer_of_cleanup() exist
 - fix the comments done by Daniel on v8
 - reword commits message to be more explicit about 16 bits counter issue
 - add one patch about copyrights and licences
   
version 8:
 - rebased on timers/core
 - change timer_of_exit() name to timer_of_cleanup()
 - update stm32 clocksource driver to use this function

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):
  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
  clocksource: stm32: Update license and copyright
  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-stm32.c | 253 +++++++++++++++++++++-----------------
 4 files changed, 139 insertions(+), 179 deletions(-)

-- 
2.15.0

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

Philippe Ombredanne Dec. 8, 2017, 1:46 p.m. UTC | #1
On Fri, Dec 8, 2017 at 12:32 PM, Benjamin Gaignard
<benjamin.gaignard@linaro.org> wrote:
> Adopt SPDX License Identifier and add STMicroelectronics

> copyright

>

> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>

> ---

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

>  1 file changed, 3 insertions(+), 1 deletion(-)

>

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

> index c9aed2314194..21479c3cfcb9 100644

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

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

> @@ -1,7 +1,9 @@

> +// SPDX-License-Identifier: GPL-2.0

>  /*

>   * Copyright (C) Maxime Coquelin 2015

> + * Copyright (C) STMicroelectronics 2017 - All Rights Reserved

>   * Author:  Maxime Coquelin <mcoquelin.stm32@gmail.com>

> - * License terms:  GNU General Public License (GPL), version 2

> + * Author: Benjamin Gaignard <benjamin.gaignard@st.com> for STMicroelectronics.

>   *

>   * Inspired by time-efm32.c from Uwe Kleine-Koenig

>   */

> --

> 2.15.0

>


Benjamin,

Thank you for this: every little bit of help counts towards making the
whole kernel licensing easily greppable!

FWIW:

Reviewed-by: Philippe Ombredanne <pombredanne@nexB.com>


--
Philippe
--
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
Daniel Lezcano Dec. 8, 2017, 2:08 p.m. UTC | #2
On 08/12/2017 15:04, Benjamin Gaignard wrote:
> 2017-12-08 14:46 GMT+01:00 Daniel Lezcano <daniel.lezcano@linaro.org>:

>> On 08/12/2017 12:32, Benjamin Gaignard wrote:

>>> The stm32 timer hardware is currently only used as a clock event device,

>>> but it can be utilized as a clocksource as well.

>>>

>>> Implement this by enabling the free running counter in the hardware block

>>> and converting the clock event part from a count down event timer to a

>>> comparator based timer.

>>

>>

>> Split this patch in two:

>>  - periodic support

>>  - clocksource support

> 

> No because the way of implementing periodic support depend of how clocksource

> part is implemented on the hardware.

> I don't want to code functions that I will completely remove just after


Sorry, I don't get it. Can you elaborate please ?


-- 
 <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 Dec. 8, 2017, 2:19 p.m. UTC | #3
2017-12-08 15:08 GMT+01:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
> On 08/12/2017 15:04, Benjamin Gaignard wrote:

>> 2017-12-08 14:46 GMT+01:00 Daniel Lezcano <daniel.lezcano@linaro.org>:

>>> On 08/12/2017 12:32, Benjamin Gaignard wrote:

>>>> The stm32 timer hardware is currently only used as a clock event device,

>>>> but it can be utilized as a clocksource as well.

>>>>

>>>> Implement this by enabling the free running counter in the hardware block

>>>> and converting the clock event part from a count down event timer to a

>>>> comparator based timer.

>>>

>>>

>>> Split this patch in two:

>>>  - periodic support

>>>  - clocksource support

>>

>> No because the way of implementing periodic support depend of how clocksource

>> part is implemented on the hardware.

>> I don't want to code functions that I will completely remove just after

>

> Sorry, I don't get it. Can you elaborate please ?


To add clocksource support I use the counter part of the hardware
which was before
used for clockevent and make clockevent use the comparator instead.
So implementing periodic on counter side of the hardware is a waste of
time because
I will to remove right after

>

>

> --

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