Re: [PATCH V5 2/7] clocksource: tegra: add Tegra210 timer support
From: Joseph Lo <hidden>
Date: 2019-02-01 15:49:25
Also in:
linux-tegra, lkml
On 2/1/19 11:43 PM, Jon Hunter wrote:
On 01/02/2019 14:39, Joseph Lo wrote:quoted
On 2/1/19 8:44 PM, Jon Hunter wrote:quoted
On 01/02/2019 03:36, Joseph Lo wrote:quoted
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.quoted
Cc: Daniel Lezcano <redacted> Cc: Thomas Gleixner <redacted> Cc: linux-kernel@vger.kernel.org Signed-off-by: Joseph Lo <redacted> Acked-by: Thierry Reding <redacted> ---
snip.
quoted
quoted
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.quoted
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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel