All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Lo <josephl@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-tegra@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH V5 2/7] clocksource: tegra: add Tegra210 timer support
Date: Sun, 3 Feb 2019 00:07:09 +0800	[thread overview]
Message-ID: <0458731d-e245-8362-2b62-92aa5e1b7fe3@nvidia.com> (raw)
In-Reply-To: <0a5721cc-6cbf-9f1f-6282-36b7175ce9a2@gmail.com>

On 2/2/19 9:38 PM, Dmitry Osipenko wrote:
> 02.02.2019 2:53, Joseph Lo пишет:
>> On 2/2/19 2:08 AM, Dmitry Osipenko wrote:
>>> 01.02.2019 18:37, Joseph Lo пишет:
>>>> On 2/1/19 11:13 PM, Dmitry Osipenko wrote:
>>>>> 01.02.2019 17:13, Joseph Lo пишет:
>>>>>> On 2/1/19 9:54 PM, Jon Hunter wrote:
>>>>>>>
>>>>>>> On 01/02/2019 13:11, Dmitry Osipenko wrote:
>>>>>>>> 01.02.2019 16:06, Dmitry Osipenko пишет:
>>>>>>>>> 01.02.2019 6:36, Joseph Lo пишет:
>>>>>>>>>> Add support for the Tegra210 timer that runs at oscillator clock
>>>>>>>>>> (TMR10-TMR13). We need these timers to work as clock event device and to
>>>>>>>>>> replace the ARMv8 architected timer due to it can't survive across the
>>>>>>>>>> power cycle of the CPU core or CPUPORESET signal. So it can't be a wake-up
>>>>>>>>>> source when CPU suspends in power down state.
>>>>>>>>>>
>>>>>>>>>> Also convert the original driver to use timer-of API.
>>>>>>>>>>
>>>>>>>>>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>>>>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>>>>>>>> Cc: linux-kernel@vger.kernel.org
>>>>>>>>>> Signed-off-by: Joseph Lo <josephl@nvidia.com>
>>>>>>>>>> Acked-by: Thierry Reding <treding@nvidia.com>
>>>>>>>>>> ---
>>>> snip.
>>>>>>>>>> +}
>>>>>>>>>> +TIMER_OF_DECLARE(tegra210_timer, "nvidia,tegra210-timer", tegra210_timer_init);
>>>>>>>>>> +#else /* CONFIG_ARM */
>>>>>>>>>> +static int __init tegra20_init_timer(struct device_node *np)
>>>>>>>>>> +{
>>>>>>>>> What about T132? Isn't it ARM64 which uses tegra20-timer IP? At least T132 DT suggests so and seems this change will break it.
>>>>>>>>>
>>>>>>>>> [snip]
>>>>>>>>>
>>>>>>>>
>>>>>>>> Ah, noticed the "depends on ARM" in Kconfig.. Seems okay then.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> This is a good point, because even though we had 'depends on ARM', this
>>>>>>> still means that the Tegra132 DT is incorrect.
>>>>>>>
>>>>>>> Joseph, can you take a quick look at Tegra132?
>>>>>>
>>>>>> Hi Jon and Dmitry,
>>>>>>
>>>>>> No worry about T132, T132 uses arch timer (v7). The tegra20 timer driver has never been used. We should fix the dtsi file later.
>>>>>
>>>>> Hi Joseph,
>>>>>
>>>>> So is T132 HW actually incompatible with the tegra20-timer? If it's compatible, then I think the driver's code should be made more universal to support T132.
>>>>>
>>>>
>>>>   From HW point of view, the TIMER1 ~ TIMER4 is compatible with "nvidia,tegra20-timer". But Tegra132 actually has 10 timers which are exactly the same as Tegra30. So it should backward compatible with "nvidia,tegra30-timer", which is tegra_wdt driver now. And Tegra132 should never use this driver.
>>>>
>>>> The Tegra timer driver should only be used on Tegra20/30/210, three platforms only. Others use arch timer driver for system timer driver.
>>>>
>>>> So we don't really need to take care the usage on other Tegra platforms.
>>>
>>> Doesn't Linux kernel put in use all of available timers? If yes, then we probably would want to expose all available timers. It looks to me that right now tegra20-timer exposes only a single-shared timer to the system [please correct me if I'm wrong]. Wouldn't make sense at least to give a timer per CPU core?
>>>
>>
>> No, only one timer driver works at a time. ( see /proc/timer_list to check which timer is working.)
> 
> Okay, thanks for the clarification.
> 
>>> It looks to me that right now tegra20-timer exposes only a single-shared timer to the system [please correct me if I'm wrong]. Wouldn't make sense at least to give a timer per CPU core?
>>
>> Yes, it's correct. the timer-tegra20 only provides a single-shared timer. And yes, ,it should provide a timer per CPU core. But that is another task, this patch only introduce the timer support for Tegra210. Others that originally from timer-tegra20 driver still remain the same.
> 
> I may take a look at it. Could be better for older Tegra's to use tegra20-timer for the per-CPU timer since TWD timer has some time-jitter due to DVFS.
> 

That would be great, thank you.
Joseph

WARNING: multiple messages have this Message-ID (diff)
From: Joseph Lo <josephl@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: <linux-tegra@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH V5 2/7] clocksource: tegra: add Tegra210 timer support
Date: Sun, 3 Feb 2019 00:07:09 +0800	[thread overview]
Message-ID: <0458731d-e245-8362-2b62-92aa5e1b7fe3@nvidia.com> (raw)
In-Reply-To: <0a5721cc-6cbf-9f1f-6282-36b7175ce9a2@gmail.com>

On 2/2/19 9:38 PM, Dmitry Osipenko wrote:
> 02.02.2019 2:53, Joseph Lo пишет:
>> On 2/2/19 2:08 AM, Dmitry Osipenko wrote:
>>> 01.02.2019 18:37, Joseph Lo пишет:
>>>> On 2/1/19 11:13 PM, Dmitry Osipenko wrote:
>>>>> 01.02.2019 17:13, Joseph Lo пишет:
>>>>>> On 2/1/19 9:54 PM, Jon Hunter wrote:
>>>>>>>
>>>>>>> On 01/02/2019 13:11, Dmitry Osipenko wrote:
>>>>>>>> 01.02.2019 16:06, Dmitry Osipenko пишет:
>>>>>>>>> 01.02.2019 6:36, Joseph Lo пишет:
>>>>>>>>>> Add support for the Tegra210 timer that runs at oscillator clock
>>>>>>>>>> (TMR10-TMR13). We need these timers to work as clock event device and to
>>>>>>>>>> replace the ARMv8 architected timer due to it can't survive across the
>>>>>>>>>> power cycle of the CPU core or CPUPORESET signal. So it can't be a wake-up
>>>>>>>>>> source when CPU suspends in power down state.
>>>>>>>>>>
>>>>>>>>>> Also convert the original driver to use timer-of API.
>>>>>>>>>>
>>>>>>>>>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>>>>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>>>>>>>> Cc: linux-kernel@vger.kernel.org
>>>>>>>>>> Signed-off-by: Joseph Lo <josephl@nvidia.com>
>>>>>>>>>> Acked-by: Thierry Reding <treding@nvidia.com>
>>>>>>>>>> ---
>>>> snip.
>>>>>>>>>> +}
>>>>>>>>>> +TIMER_OF_DECLARE(tegra210_timer, "nvidia,tegra210-timer", tegra210_timer_init);
>>>>>>>>>> +#else /* CONFIG_ARM */
>>>>>>>>>> +static int __init tegra20_init_timer(struct device_node *np)
>>>>>>>>>> +{
>>>>>>>>> What about T132? Isn't it ARM64 which uses tegra20-timer IP? At least T132 DT suggests so and seems this change will break it.
>>>>>>>>>
>>>>>>>>> [snip]
>>>>>>>>>
>>>>>>>>
>>>>>>>> Ah, noticed the "depends on ARM" in Kconfig.. Seems okay then.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> This is a good point, because even though we had 'depends on ARM', this
>>>>>>> still means that the Tegra132 DT is incorrect.
>>>>>>>
>>>>>>> Joseph, can you take a quick look at Tegra132?
>>>>>>
>>>>>> Hi Jon and Dmitry,
>>>>>>
>>>>>> No worry about T132, T132 uses arch timer (v7). The tegra20 timer driver has never been used. We should fix the dtsi file later.
>>>>>
>>>>> Hi Joseph,
>>>>>
>>>>> So is T132 HW actually incompatible with the tegra20-timer? If it's compatible, then I think the driver's code should be made more universal to support T132.
>>>>>
>>>>
>>>>   From HW point of view, the TIMER1 ~ TIMER4 is compatible with "nvidia,tegra20-timer". But Tegra132 actually has 10 timers which are exactly the same as Tegra30. So it should backward compatible with "nvidia,tegra30-timer", which is tegra_wdt driver now. And Tegra132 should never use this driver.
>>>>
>>>> The Tegra timer driver should only be used on Tegra20/30/210, three platforms only. Others use arch timer driver for system timer driver.
>>>>
>>>> So we don't really need to take care the usage on other Tegra platforms.
>>>
>>> Doesn't Linux kernel put in use all of available timers? If yes, then we probably would want to expose all available timers. It looks to me that right now tegra20-timer exposes only a single-shared timer to the system [please correct me if I'm wrong]. Wouldn't make sense at least to give a timer per CPU core?
>>>
>>
>> No, only one timer driver works at a time. ( see /proc/timer_list to check which timer is working.)
> 
> Okay, thanks for the clarification.
> 
>>> It looks to me that right now tegra20-timer exposes only a single-shared timer to the system [please correct me if I'm wrong]. Wouldn't make sense at least to give a timer per CPU core?
>>
>> Yes, it's correct. the timer-tegra20 only provides a single-shared timer. And yes, ,it should provide a timer per CPU core. But that is another task, this patch only introduce the timer support for Tegra210. Others that originally from timer-tegra20 driver still remain the same.
> 
> I may take a look at it. Could be better for older Tegra's to use tegra20-timer for the per-CPU timer since TWD timer has some time-jitter due to DVFS.
> 

That would be great, thank you.
Joseph

WARNING: multiple messages have this Message-ID (diff)
From: Joseph Lo <josephl@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-tegra@vger.kernel.org, Thierry Reding <treding@nvidia.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V5 2/7] clocksource: tegra: add Tegra210 timer support
Date: Sun, 3 Feb 2019 00:07:09 +0800	[thread overview]
Message-ID: <0458731d-e245-8362-2b62-92aa5e1b7fe3@nvidia.com> (raw)
In-Reply-To: <0a5721cc-6cbf-9f1f-6282-36b7175ce9a2@gmail.com>

On 2/2/19 9:38 PM, Dmitry Osipenko wrote:
> 02.02.2019 2:53, Joseph Lo пишет:
>> On 2/2/19 2:08 AM, Dmitry Osipenko wrote:
>>> 01.02.2019 18:37, Joseph Lo пишет:
>>>> On 2/1/19 11:13 PM, Dmitry Osipenko wrote:
>>>>> 01.02.2019 17:13, Joseph Lo пишет:
>>>>>> On 2/1/19 9:54 PM, Jon Hunter wrote:
>>>>>>>
>>>>>>> On 01/02/2019 13:11, Dmitry Osipenko wrote:
>>>>>>>> 01.02.2019 16:06, Dmitry Osipenko пишет:
>>>>>>>>> 01.02.2019 6:36, Joseph Lo пишет:
>>>>>>>>>> Add support for the Tegra210 timer that runs at oscillator clock
>>>>>>>>>> (TMR10-TMR13). We need these timers to work as clock event device and to
>>>>>>>>>> replace the ARMv8 architected timer due to it can't survive across the
>>>>>>>>>> power cycle of the CPU core or CPUPORESET signal. So it can't be a wake-up
>>>>>>>>>> source when CPU suspends in power down state.
>>>>>>>>>>
>>>>>>>>>> Also convert the original driver to use timer-of API.
>>>>>>>>>>
>>>>>>>>>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>>>>>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>>>>>>>> Cc: linux-kernel@vger.kernel.org
>>>>>>>>>> Signed-off-by: Joseph Lo <josephl@nvidia.com>
>>>>>>>>>> Acked-by: Thierry Reding <treding@nvidia.com>
>>>>>>>>>> ---
>>>> snip.
>>>>>>>>>> +}
>>>>>>>>>> +TIMER_OF_DECLARE(tegra210_timer, "nvidia,tegra210-timer", tegra210_timer_init);
>>>>>>>>>> +#else /* CONFIG_ARM */
>>>>>>>>>> +static int __init tegra20_init_timer(struct device_node *np)
>>>>>>>>>> +{
>>>>>>>>> What about T132? Isn't it ARM64 which uses tegra20-timer IP? At least T132 DT suggests so and seems this change will break it.
>>>>>>>>>
>>>>>>>>> [snip]
>>>>>>>>>
>>>>>>>>
>>>>>>>> Ah, noticed the "depends on ARM" in Kconfig.. Seems okay then.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> This is a good point, because even though we had 'depends on ARM', this
>>>>>>> still means that the Tegra132 DT is incorrect.
>>>>>>>
>>>>>>> Joseph, can you take a quick look at Tegra132?
>>>>>>
>>>>>> Hi Jon and Dmitry,
>>>>>>
>>>>>> No worry about T132, T132 uses arch timer (v7). The tegra20 timer driver has never been used. We should fix the dtsi file later.
>>>>>
>>>>> Hi Joseph,
>>>>>
>>>>> So is T132 HW actually incompatible with the tegra20-timer? If it's compatible, then I think the driver's code should be made more universal to support T132.
>>>>>
>>>>
>>>>   From HW point of view, the TIMER1 ~ TIMER4 is compatible with "nvidia,tegra20-timer". But Tegra132 actually has 10 timers which are exactly the same as Tegra30. So it should backward compatible with "nvidia,tegra30-timer", which is tegra_wdt driver now. And Tegra132 should never use this driver.
>>>>
>>>> The Tegra timer driver should only be used on Tegra20/30/210, three platforms only. Others use arch timer driver for system timer driver.
>>>>
>>>> So we don't really need to take care the usage on other Tegra platforms.
>>>
>>> Doesn't Linux kernel put in use all of available timers? If yes, then we probably would want to expose all available timers. It looks to me that right now tegra20-timer exposes only a single-shared timer to the system [please correct me if I'm wrong]. Wouldn't make sense at least to give a timer per CPU core?
>>>
>>
>> No, only one timer driver works at a time. ( see /proc/timer_list to check which timer is working.)
> 
> Okay, thanks for the clarification.
> 
>>> It looks to me that right now tegra20-timer exposes only a single-shared timer to the system [please correct me if I'm wrong]. Wouldn't make sense at least to give a timer per CPU core?
>>
>> Yes, it's correct. the timer-tegra20 only provides a single-shared timer. And yes, ,it should provide a timer per CPU core. But that is another task, this patch only introduce the timer support for Tegra210. Others that originally from timer-tegra20 driver still remain the same.
> 
> I may take a look at it. Could be better for older Tegra's to use tegra20-timer for the per-CPU timer since TWD timer has some time-jitter due to DVFS.
> 

That would be great, thank you.
Joseph

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-02 16:07 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  3:36 [PATCH V5 0/7] Add CPUidle support for Tegra210 Joseph Lo
2019-02-01  3:36 ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 1/7] dt-bindings: timer: add Tegra210 timer Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 2/7] clocksource: tegra: add Tegra210 timer support Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01 12:44   ` Jon Hunter
2019-02-01 12:44     ` Jon Hunter
2019-02-01 12:44     ` Jon Hunter
2019-02-01 14:39     ` Joseph Lo
2019-02-01 14:39       ` Joseph Lo
2019-02-01 14:39       ` Joseph Lo
2019-02-01 15:43       ` Jon Hunter
2019-02-01 15:43         ` Jon Hunter
2019-02-01 15:43         ` Jon Hunter
2019-02-01 15:49         ` Joseph Lo
2019-02-01 15:49           ` Joseph Lo
2019-02-01 15:49           ` Joseph Lo
2019-02-01 13:06   ` Dmitry Osipenko
2019-02-01 13:06     ` Dmitry Osipenko
2019-02-01 13:11     ` Dmitry Osipenko
2019-02-01 13:11       ` Dmitry Osipenko
2019-02-01 13:54       ` Jon Hunter
2019-02-01 13:54         ` Jon Hunter
2019-02-01 13:54         ` Jon Hunter
2019-02-01 14:13         ` Joseph Lo
2019-02-01 14:13           ` Joseph Lo
2019-02-01 14:13           ` Joseph Lo
2019-02-01 15:13           ` Dmitry Osipenko
2019-02-01 15:13             ` Dmitry Osipenko
2019-02-01 15:37             ` Joseph Lo
2019-02-01 15:37               ` Joseph Lo
2019-02-01 15:37               ` Joseph Lo
2019-02-01 18:08               ` Dmitry Osipenko
2019-02-01 18:08                 ` Dmitry Osipenko
2019-02-01 23:53                 ` Joseph Lo
2019-02-01 23:53                   ` Joseph Lo
2019-02-01 23:53                   ` Joseph Lo
2019-02-02 13:38                   ` Dmitry Osipenko
2019-02-02 13:38                     ` Dmitry Osipenko
2019-02-02 16:07                     ` Joseph Lo [this message]
2019-02-02 16:07                       ` Joseph Lo
2019-02-02 16:07                       ` Joseph Lo
2019-02-02 13:30               ` Dmitry Osipenko
2019-02-02 13:30                 ` Dmitry Osipenko
2019-02-02 16:04                 ` Joseph Lo
2019-02-02 16:04                   ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 3/7] soc/tegra: default select TEGRA_TIMER for Tegra210 Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 4/7] arm64: dts: tegra210: fix timer node Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 5/7] arm64: dts: tegra210: add CPU idle states properties Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 6/7] arm64: dts: tegra210-p2180: Enable CPU idle support Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01  3:36 ` [PATCH V5 7/7] arm64: dts: tegra210-smaug: " Joseph Lo
2019-02-01  3:36   ` Joseph Lo
2019-02-01 12:49 ` [PATCH V5 0/7] Add CPUidle support for Tegra210 Jon Hunter
2019-02-01 12:49   ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0458731d-e245-8362-2b62-92aa5e1b7fe3@nvidia.com \
    --to=josephl@nvidia.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.