[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c33697d8-43a9-654b-503f-e60adbaf289f@nvidia.com>
Date: Fri, 1 Feb 2019 23:49:17 +0800
From: Joseph Lo <josephl@...dia.com>
To: Jon Hunter <jonathanh@...dia.com>,
Thierry Reding <thierry.reding@...il.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>
CC: <linux-tegra@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, Thierry Reding <treding@...dia.com>
Subject: Re: [PATCH V5 2/7] clocksource: tegra: add Tegra210 timer support
On 2/1/19 11:43 PM, Jon Hunter wrote:
>
>
> On 01/02/2019 14:39, Joseph Lo wrote:
>> On 2/1/19 8:44 PM, Jon Hunter wrote:
>>>
>>> On 01/02/2019 03:36, Joseph Lo wrote:
>>>> 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.
>>>
>>> It may have been nice to split this into 2 patches to make it easier to
>>> see what is going on but not a big deal.
>>>
>>>> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
>>>> Cc: Thomas Gleixner <tglx@...utronix.de>
>>>> Cc: linux-kernel@...r.kernel.org
>>>> Signed-off-by: Joseph Lo <josephl@...dia.com>
>>>> Acked-by: Thierry Reding <treding@...dia.com>
>>>> ---
snip.
>>>
>> This can't get the timer base address. I think you mean ...
>>
>> +#ifdef CONFIG_ARM
>> +#define TIMER_CPU0 0x50 /* TIMER3 */
>> +#else
>> +#define TIMER_CPU0 0x90 /* TIMER10 */
>> +#endif
>> +#define TIMER_BASE_FOR_CPU(cpu) (TIMER_CPU0 + (cpu) * 8)
>
> Ah I see.
>
>> This doesn't need.
>> +#define TIMER_FOR_CPU(cpu) (TIMER_CPU0 + cpu)
> How come? Don't you still need to know the timer index for a given CPU?
>
Doesn't need. TIMER_BASE_FOR_CPU is enough. Other use cases are well
handled by timer-of API. :)
Thanks,
Joseph
Powered by blists - more mailing lists