linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
[parent not found: <5bab3024.1c69fb81.b6a71.9c38SMTPIN_ADDED_MISSING@mx.google.com>]
* Re: [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver
@ 2018-09-26  6:01 Paul Cercueil
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2018-09-26  6:01 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mathieu Malaterre, Thomas Gleixner, Rob Herring, linux-doc,
	linux-watchdog, Jonathan Corbet, od, linux-mips, Paul Burton,
	Mark Rutland, linux-clk, linux-kernel, devicetree, Ralf Baechle,
	Thierry Reding, linux-pwm


Le 25 sept. 2018 10:12 PM, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit :
>
> On 25/09/2018 15:38, Paul Cercueil wrote: 
> > 
> > Le 24 sept. 2018 9:14 AM, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit : 
> >> 
> >> On 24/09/2018 08:53, Paul Cercueil wrote: 
> >>> 
> >>> Le 24 sept. 2018 07:58, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit : 
> >>>> 
> >>>> On 24/09/2018 07:49, Paul Cercueil wrote: 
> >>>>> 
> >>>>> Le 24 sept. 2018 07:35, Daniel Lezcano <daniel.lezcano@linaro.org> a 
> >>>>> écrit : 
> >>>>>> 
> >>>>>> On 24/09/2018 07:24, Paul Cercueil wrote: 
> >>>>>>> Hi Daniel, 
> >>>>>>> 
> >>>>>>> Le 24 sept. 2018 05:12, Daniel Lezcano 
> >>>>>>> <daniel.lezcano@linaro.org> a écrit : 
> >>>>>>>> 
> >>>>>>>> On 21/08/2018 19:16, Paul Cercueil wrote: 
> >>>>>>>>> This driver handles the TCU (Timer Counter Unit) present on 
> >>>>>>>>> the Ingenic JZ47xx SoCs, and provides the kernel with a 
> >>>>>>>>> system timer, and optionally with a clocksource and a 
> >>>>>>>>> sched_clock. 
> >>>>>>>>> 
> >>>>>>>>> It also provides clocks and interrupt handling to client 
> >>>>>>>>> drivers. 
> >>>>>>>> 
> >>>>>>>> Can you provide a much more complete description of the timer 
> >>>>>>>> in order to make my life easier for the review of this patch? 
> >>>>>>> 
> >>>>>>> See patch [03/24], it adds a doc file that describes the 
> >>>>>>> hardware. 
> >>>>>> 
> >>>>>> Thanks, I went through but it is incomplete to understand what the 
> >>>>>> timer do. I will reverse-engineer the code but it would help if you 
> >>>>>> can give the gross approach. Why multiple channels ? mutexes and 
> >>>>>> completion ? 
> >>>>> 
> >>>>> Much of the complexity is because of the multi-purpose nature of the 
> >>>>> TCU channels. Each one can be used as timer/clocksource, or PWM. 
> >>>>> 
> >>>>> The driver starts by using channels 0 and 1 as system timer and 
> >>>>> clocksource, respectively, the other ones being unused for now. Then, 
> >>>>> *if* the PWM driver requests one of the channels in use by the 
> >>>>> timer/clocksource driver, say channel 0, the timer/clocksource driver 
> >>>>> will dynamically reassign the system timer to a free channel, from 
> >>>>> channel 0 to e.g. channel 2. Only in that case the completion/mutex 
> >>>>> are actually used. 
> >>>> 
> >>>> Why do you need to do this? Can't be the channels dedicated and reserved 
> >>>> for clocksource and clockevent? 
> >>> 
> >>> That's what I had in place (ingenic,timer-channel and ingenic,clocksource-channel DT properties), but Rob didn't want any linux-specific properties in the devicetree binding :( 
> >> 
> >> Isn't possible to specify the channel to use in the DT? like renesas16 ? 
> > 
> > That's what I did in V6 (and before), but Rob did not want me to add properties for Linux-specific concepts such as clocksource. 
>
> Hmm, I remember something like that, yes but I did a delete of the 
> previous version when you posted the v7. Can you give a pointer to its 
> answer ? 

Yes, this was his answer:
https://lkml.org/lkml/2018/7/25/508

Then mine:
https://lkml.org/lkml/2018/7/30/883

-Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <5baa3fa9.1c69fb81.4c7b7.19fdSMTPIN_ADDED_MISSING@mx.google.com>]
* Re: [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver
@ 2018-09-25 13:38 Paul Cercueil
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2018-09-25 13:38 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mathieu Malaterre, Thomas Gleixner, Rob Herring, linux-doc,
	Jonathan Corbet, linux-watchdog, od, linux-mips, Paul Burton,
	Mark Rutland, linux-clk, linux-kernel, devicetree, Ralf Baechle,
	Thierry Reding, linux-pwm


Le 24 sept. 2018 9:14 AM, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit :
>
> On 24/09/2018 08:53, Paul Cercueil wrote: 
> > 
> > Le 24 sept. 2018 07:58, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit : 
> >> 
> >> On 24/09/2018 07:49, Paul Cercueil wrote: 
> >>> 
> >>> Le 24 sept. 2018 07:35, Daniel Lezcano <daniel.lezcano@linaro.org> a 
> >>> écrit : 
> >>>> 
> >>>> On 24/09/2018 07:24, Paul Cercueil wrote: 
> >>>>> Hi Daniel, 
> >>>>> 
> >>>>> Le 24 sept. 2018 05:12, Daniel Lezcano 
> >>>>> <daniel.lezcano@linaro.org> a écrit : 
> >>>>>> 
> >>>>>> On 21/08/2018 19:16, Paul Cercueil wrote: 
> >>>>>>> This driver handles the TCU (Timer Counter Unit) present on 
> >>>>>>> the Ingenic JZ47xx SoCs, and provides the kernel with a 
> >>>>>>> system timer, and optionally with a clocksource and a 
> >>>>>>> sched_clock. 
> >>>>>>> 
> >>>>>>> It also provides clocks and interrupt handling to client 
> >>>>>>> drivers. 
> >>>>>> 
> >>>>>> Can you provide a much more complete description of the timer 
> >>>>>> in order to make my life easier for the review of this patch? 
> >>>>> 
> >>>>> See patch [03/24], it adds a doc file that describes the 
> >>>>> hardware. 
> >>>> 
> >>>> Thanks, I went through but it is incomplete to understand what the 
> >>>> timer do. I will reverse-engineer the code but it would help if you 
> >>>> can give the gross approach. Why multiple channels ? mutexes and 
> >>>> completion ? 
> >>> 
> >>> Much of the complexity is because of the multi-purpose nature of the 
> >>> TCU channels. Each one can be used as timer/clocksource, or PWM. 
> >>> 
> >>> The driver starts by using channels 0 and 1 as system timer and 
> >>> clocksource, respectively, the other ones being unused for now. Then, 
> >>> *if* the PWM driver requests one of the channels in use by the 
> >>> timer/clocksource driver, say channel 0, the timer/clocksource driver 
> >>> will dynamically reassign the system timer to a free channel, from 
> >>> channel 0 to e.g. channel 2. Only in that case the completion/mutex 
> >>> are actually used. 
> >> 
> >> Why do you need to do this? Can't be the channels dedicated and reserved 
> >> for clocksource and clockevent? 
> > 
> > That's what I had in place (ingenic,timer-channel and ingenic,clocksource-channel DT properties), but Rob didn't want any linux-specific properties in the devicetree binding :( 
>
> Isn't possible to specify the channel to use in the DT? like renesas16 ? 

That's what I did in V6 (and before), but Rob did not want me to add properties for Linux-specific concepts such as clocksource.

-Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <5ba88a1a.1c69fb81.2ba56.ccdaSMTPIN_ADDED_MISSING@mx.google.com>]
* Re: [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver
@ 2018-09-24  6:53 Paul Cercueil
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2018-09-24  6:53 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mathieu Malaterre, Thomas Gleixner, Rob Herring, linux-doc,
	linux-watchdog, Jonathan Corbet, od, linux-mips, Paul Burton,
	Mark Rutland, linux-clk, linux-kernel, devicetree, Ralf Baechle,
	Thierry Reding, linux-pwm


Le 24 sept. 2018 07:58, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit :
>
> On 24/09/2018 07:49, Paul Cercueil wrote: 
> > 
> > Le 24 sept. 2018 07:35, Daniel Lezcano <daniel.lezcano@linaro.org> a 
> > écrit : 
> >> 
> >> On 24/09/2018 07:24, Paul Cercueil wrote: 
> >>> Hi Daniel, 
> >>> 
> >>> Le 24 sept. 2018 05:12, Daniel Lezcano 
> >>> <daniel.lezcano@linaro.org> a écrit : 
> >>>> 
> >>>> On 21/08/2018 19:16, Paul Cercueil wrote: 
> >>>>> This driver handles the TCU (Timer Counter Unit) present on 
> >>>>> the Ingenic JZ47xx SoCs, and provides the kernel with a 
> >>>>> system timer, and optionally with a clocksource and a 
> >>>>> sched_clock. 
> >>>>> 
> >>>>> It also provides clocks and interrupt handling to client 
> >>>>> drivers. 
> >>>> 
> >>>> Can you provide a much more complete description of the timer 
> >>>> in order to make my life easier for the review of this patch? 
> >>> 
> >>> See patch [03/24], it adds a doc file that describes the 
> >>> hardware. 
> >> 
> >> Thanks, I went through but it is incomplete to understand what the 
> >> timer do. I will reverse-engineer the code but it would help if you 
> >> can give the gross approach. Why multiple channels ? mutexes and 
> >> completion ? 
> > 
> > Much of the complexity is because of the multi-purpose nature of the 
> > TCU channels. Each one can be used as timer/clocksource, or PWM. 
> > 
> > The driver starts by using channels 0 and 1 as system timer and 
> > clocksource, respectively, the other ones being unused for now. Then, 
> > *if* the PWM driver requests one of the channels in use by the 
> > timer/clocksource driver, say channel 0, the timer/clocksource driver 
> > will dynamically reassign the system timer to a free channel, from 
> > channel 0 to e.g. channel 2. Only in that case the completion/mutex 
> > are actually used. 
>
> Why do you need to do this? Can't be the channels dedicated and reserved 
> for clocksource and clockevent? 

That's what I had in place (ingenic,timer-channel and ingenic,clocksource-channel DT properties), but Rob didn't want any linux-specific properties in the devicetree binding :(

-Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <5ba87b02.1c69fb81.1da88.1457SMTPIN_ADDED_MISSING@mx.google.com>]
* Re: [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver
@ 2018-09-24  5:49 Paul Cercueil
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2018-09-24  5:49 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mathieu Malaterre, Thomas Gleixner, Rob Herring, linux-doc,
	Jonathan Corbet, linux-watchdog, od, linux-mips, Paul Burton,
	Mark Rutland, linux-clk, linux-kernel, devicetree, Ralf Baechle,
	Thierry Reding, linux-pwm


Le 24 sept. 2018 07:35, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit :
>
> On 24/09/2018 07:24, Paul Cercueil wrote: 
> > Hi Daniel, 
> > 
> > Le 24 sept. 2018 05:12, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit : 
> >> 
> >> On 21/08/2018 19:16, Paul Cercueil wrote: 
> >>> This driver handles the TCU (Timer Counter Unit) present on the Ingenic 
> >>> JZ47xx SoCs, and provides the kernel with a system timer, and optionally 
> >>> with a clocksource and a sched_clock. 
> >>> 
> >>> It also provides clocks and interrupt handling to client drivers. 
> >> 
> >> Can you provide a much more complete description of the timer in order 
> >> to make my life easier for the review of this patch? 
> > 
> > See patch [03/24], it adds a doc file that describes the hardware. 
>
> Thanks, I went through but it is incomplete to understand what the timer 
> do. I will reverse-engineer the code but it would help if you can give 
> the gross approach. Why multiple channels ? mutexes and completion ? 

Much of the complexity is because of the multi-purpose nature of the TCU channels. Each one can be used as timer/clocksource, or PWM.

The driver starts by using channels 0 and 1 as system timer and clocksource, respectively, the other ones being unused for now. Then, *if* the PWM driver requests one of the channels in use by the timer/clocksource driver, say channel 0, the timer/clocksource driver will dynamically reassign the system timer to a free channel, from channel 0 to e.g. channel 2. Only in that case the completion/mutex are actually used.

-Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver
@ 2018-09-24  5:24 Paul Cercueil
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2018-09-24  5:24 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Mathieu Malaterre, Thomas Gleixner, Rob Herring, linux-doc,
	linux-watchdog, Jonathan Corbet, od, linux-mips, Paul Burton,
	Mark Rutland, linux-clk, linux-kernel, devicetree, Ralf Baechle,
	Thierry Reding, linux-pwm

Hi Daniel,

Le 24 sept. 2018 05:12, Daniel Lezcano <daniel.lezcano@linaro.org> a écrit :
>
> On 21/08/2018 19:16, Paul Cercueil wrote: 
> > This driver handles the TCU (Timer Counter Unit) present on the Ingenic 
> > JZ47xx SoCs, and provides the kernel with a system timer, and optionally 
> > with a clocksource and a sched_clock. 
> > 
> > It also provides clocks and interrupt handling to client drivers. 
>
> Can you provide a much more complete description of the timer in order 
> to make my life easier for the review of this patch? 

See patch [03/24], it adds a doc file that describes the hardware.

> Thanks 
>
>   -- Daniel 

Thanks,
-Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH v7 00/24] TCU patchset v7
@ 2018-08-21 17:16 Paul Cercueil
  2018-08-21 17:16 ` [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver Paul Cercueil
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Cercueil @ 2018-08-21 17:16 UTC (permalink / raw)
  To: Thomas Gleixner, Daniel Lezcano, Rob Herring, Thierry Reding,
	Mark Rutland, Ralf Baechle, Paul Burton, Jonathan Corbet
  Cc: od, Mathieu Malaterre, linux-pwm, devicetree, linux-kernel,
	linux-watchdog, linux-mips, linux-doc, linux-clk

Hi,

This is the v7 of my patchset that adds support for the Timer/Counter
Unit in Ingenic JZ47xx SoCs.

From v6, only patches [05/24] and [06/24] were modified to fix a section
mismatch. All the other patches are the same.

Thanks,
-Paul Cercueil

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-09-26  8:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5ba8750a.1c69fb81.501e8.d0f0SMTPIN_ADDED_MISSING@mx.google.com>
2018-09-24  5:35 ` [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver Daniel Lezcano
     [not found] <5bab3024.1c69fb81.b6a71.9c38SMTPIN_ADDED_MISSING@mx.google.com>
2018-09-26  8:05 ` Daniel Lezcano
2018-09-26  6:01 Paul Cercueil
     [not found] <5baa3fa9.1c69fb81.4c7b7.19fdSMTPIN_ADDED_MISSING@mx.google.com>
2018-09-25 20:12 ` Daniel Lezcano
  -- strict thread matches above, loose matches on Subject: below --
2018-09-25 13:38 Paul Cercueil
     [not found] <5ba88a1a.1c69fb81.2ba56.ccdaSMTPIN_ADDED_MISSING@mx.google.com>
2018-09-24  7:14 ` Daniel Lezcano
2018-09-24  6:53 Paul Cercueil
     [not found] <5ba87b02.1c69fb81.1da88.1457SMTPIN_ADDED_MISSING@mx.google.com>
2018-09-24  5:58 ` Daniel Lezcano
2018-09-24  5:49 Paul Cercueil
2018-09-24  5:24 Paul Cercueil
2018-08-21 17:16 [PATCH v7 00/24] TCU patchset v7 Paul Cercueil
2018-08-21 17:16 ` [PATCH v7 05/24] clocksource: Add a new timer-ingenic driver Paul Cercueil
2018-08-28 17:23   ` Paul Burton
2018-08-29  9:10     ` Daniel Lezcano
2018-08-29 17:43       ` Paul Burton
2018-09-24  3:12   ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).