mbox series

[RFC,v3,0/2] clocksource: davinci-timer: new driver

Message ID 20190605083334.22383-1-brgl@bgdev.pl (mailing list archive)
Headers show
Series clocksource: davinci-timer: new driver | expand

Message

Bartosz Golaszewski June 5, 2019, 8:33 a.m. UTC
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This is another version of the new davinci clocksource driver. After much
discussion this contains many changes to simplify and improve the driver.

v1 -> v2:
- changed the format of the copyright notice
- removed all mentiones of the periodic timer setting
- added caching of the TCR register value so that its updating doesn't
  require a read
- split the timer configuration for clock events into the
  set_state_oneshot() and set_state_shutdown() callbacks

v2 -> v3:
- tim34, if used, should run in periodic mode for clocksource, now fixed
- dropped all the configuration variables from struct davinci_clockevent
  as clockevent always uses tim12
- dropped caching of the TCR register with the following reasoning: on
  systems using tim34 for clocksource, the TCR register is only touched
  by the clock driver and we know that we need to keep tim34 in periodic
  mode; on da830 the RTOS running on the DSP may modify the TCR register
  but we on the other hand never change its settings when only using tim12
- subsequently the whole routine for TCR updating was dropped
- dropped the shift variable from most places
- added separate routines for initializing clocksource for da830 and all
  other systems
- sprinkled a bunch of comments all over the driver to explain things
  that caused confusion before

Bartosz Golaszewski (2):
  clocksource: davinci-timer: add support for clockevents
  clocksource: timer-davinci: add support for clocksource

 drivers/clocksource/Kconfig         |   5 +
 drivers/clocksource/Makefile        |   1 +
 drivers/clocksource/timer-davinci.c | 370 ++++++++++++++++++++++++++++
 include/clocksource/timer-davinci.h |  44 ++++
 4 files changed, 420 insertions(+)
 create mode 100644 drivers/clocksource/timer-davinci.c
 create mode 100644 include/clocksource/timer-davinci.h

Comments

Sekhar Nori June 14, 2019, 10:39 a.m. UTC | #1
Hi Daniel,

On 05/06/19 2:03 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This is another version of the new davinci clocksource driver. After much
> discussion this contains many changes to simplify and improve the driver.

Does this look good to you now? If yes, can you please merge and provide
an immutable branch to me so I can merge dependent mach-davinci patches?

Thanks,
Sekhar
Daniel Lezcano June 14, 2019, 2:25 p.m. UTC | #2
On 14/06/2019 12:39, Sekhar Nori wrote:
> Hi Daniel,
> 
> On 05/06/19 2:03 PM, Bartosz Golaszewski wrote:
>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>
>> This is another version of the new davinci clocksource driver. After much
>> discussion this contains many changes to simplify and improve the driver.
> 
> Does this look good to you now? If yes, can you please merge and provide
> an immutable branch to me so I can merge dependent mach-davinci patches?

Yes, I think it is fine.

http://git@git.linaro.org/people/daniel.lezcano/linux.git
timers/drivers/davinci

It is v5.2-rc4 + (2 x patches)

It is merged in clockevents/next which is exported to linux-next and for
kernel-ci.

AFAIU, the patch was compiled and tested. If not, please let me know.

Please, wait a couple of days I confirm the tests passed and you can
consider the branch immutable.
Daniel Lezcano June 18, 2019, 6:03 p.m. UTC | #3
On 14/06/2019 16:25, Daniel Lezcano wrote:
> On 14/06/2019 12:39, Sekhar Nori wrote:
>> Hi Daniel,
>>
>> On 05/06/19 2:03 PM, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>
>>> This is another version of the new davinci clocksource driver. After much
>>> discussion this contains many changes to simplify and improve the driver.
>>
>> Does this look good to you now? If yes, can you please merge and provide
>> an immutable branch to me so I can merge dependent mach-davinci patches?
> 
> Yes, I think it is fine.
> 
> http://git@git.linaro.org/people/daniel.lezcano/linux.git
> timers/drivers/davinci
> 
> It is v5.2-rc4 + (2 x patches)
> 
> It is merged in clockevents/next which is exported to linux-next and for
> kernel-ci.
> 
> AFAIU, the patch was compiled and tested. If not, please let me know.
> 
> Please, wait a couple of days I confirm the tests passed and you can
> consider the branch immutable.

lkp complained, please do not use the branch.

I'm waiting for Bartosz to fix the issue.
Sekhar Nori June 19, 2019, 11:53 a.m. UTC | #4
On 18/06/19 11:33 PM, Daniel Lezcano wrote:
> On 14/06/2019 16:25, Daniel Lezcano wrote:
>> On 14/06/2019 12:39, Sekhar Nori wrote:
>>> Hi Daniel,
>>>
>>> On 05/06/19 2:03 PM, Bartosz Golaszewski wrote:
>>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>>
>>>> This is another version of the new davinci clocksource driver. After much
>>>> discussion this contains many changes to simplify and improve the driver.
>>>
>>> Does this look good to you now? If yes, can you please merge and provide
>>> an immutable branch to me so I can merge dependent mach-davinci patches?
>>
>> Yes, I think it is fine.
>>
>> http://git@git.linaro.org/people/daniel.lezcano/linux.git
>> timers/drivers/davinci
>>
>> It is v5.2-rc4 + (2 x patches)
>>
>> It is merged in clockevents/next which is exported to linux-next and for
>> kernel-ci.
>>
>> AFAIU, the patch was compiled and tested. If not, please let me know.
>>
>> Please, wait a couple of days I confirm the tests passed and you can
>> consider the branch immutable.
> 
> lkp complained, please do not use the branch.
> 
> I'm waiting for Bartosz to fix the issue.

Alright, noted.

Thanks,
Sekhar
Daniel Lezcano June 24, 2019, 5:40 a.m. UTC | #5
Sekhar, Bartosz,

if the sparse warning is not fixed, the driver won't hit this kernel
version. Please fix it before the two next days otherwise it won't make
it for v5.4.

Thanks

  -- Daniel


On 14/06/2019 12:39, Sekhar Nori wrote:
> Hi Daniel,
> 
> On 05/06/19 2:03 PM, Bartosz Golaszewski wrote:
>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>
>> This is another version of the new davinci clocksource driver. After much
>> discussion this contains many changes to simplify and improve the driver.
> 
> Does this look good to you now? If yes, can you please merge and provide
> an immutable branch to me so I can merge dependent mach-davinci patches?
Bartosz Golaszewski June 24, 2019, 7:21 a.m. UTC | #6
pon., 24 cze 2019 o 07:40 Daniel Lezcano <daniel.lezcano@linaro.org> napisał(a):
>
>
> Sekhar, Bartosz,
>
> if the sparse warning is not fixed, the driver won't hit this kernel
> version. Please fix it before the two next days otherwise it won't make
> it for v5.4.
>
> Thanks
>

Hi Daniel,

will do, I just came back to the office.

Sekhar, how do we want to handle the rest of the platform code with
this driver? Do you think it can make it for the next release?

Bart
Sekhar Nori June 24, 2019, 7:29 a.m. UTC | #7
On 24/06/19 12:51 PM, Bartosz Golaszewski wrote:
> pon., 24 cze 2019 o 07:40 Daniel Lezcano <daniel.lezcano@linaro.org> napisał(a):
>>
>>
>> Sekhar, Bartosz,
>>
>> if the sparse warning is not fixed, the driver won't hit this kernel
>> version. Please fix it before the two next days otherwise it won't make
>> it for v5.4.
>>
>> Thanks
>>
> 
> Hi Daniel,
> 
> will do, I just came back to the office.
> 
> Sekhar, how do we want to handle the rest of the platform code with
> this driver? Do you think it can make it for the next release?

It may have to wait till next release, I am afraid. Lets first try to
get the driver in though. I can try a late pull request with no guarantees.

Thanks,
Sekhar
Daniel Lezcano June 26, 2019, 3:16 p.m. UTC | #8
On 24/06/2019 09:29, Sekhar Nori wrote:
> On 24/06/19 12:51 PM, Bartosz Golaszewski wrote:
>> pon., 24 cze 2019 o 07:40 Daniel Lezcano <daniel.lezcano@linaro.org> napisał(a):
>>>
>>>
>>> Sekhar, Bartosz,
>>>
>>> if the sparse warning is not fixed, the driver won't hit this kernel
>>> version. Please fix it before the two next days otherwise it won't make
>>> it for v5.4.
>>>
>>> Thanks
>>>
>>
>> Hi Daniel,
>>
>> will do, I just came back to the office.
>>
>> Sekhar, how do we want to handle the rest of the platform code with
>> this driver? Do you think it can make it for the next release?
> 
> It may have to wait till next release, I am afraid. Lets first try to
> get the driver in though. I can try a late pull request with no guarantees.

The driver is merged in tip/timers/core, however I messed up with the
davinci branch, please do not consider it as an immutable branch.

Sorry for that.