aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/timer-tegra20.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-25clocksource/drivers/tegra: Rename timer-tegra20.c to timer-tegra.cDmitry Osipenko1-386/+0
Rename driver's source file to better reflect that it's not specific to older SoC generations. Suggested-by: Daniel Lezcano <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Lower clocksource rating for some Tegra'sDmitry Osipenko1-4/+26
Arch-timer is more preferable for a range of Tegra SoC generations as it has higher precision and is not affect by any kind of problems. Pointed-out-by: Peter De Schrijver <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Minor code clean upDmitry Osipenko1-19/+24
Correct typo and use proper upper casing for acronyms in the comments, use common style for error messages, prepend error messages with "tegra-timer:", add error message for cpuhp_setup_state() failure and clean up whitespaces in the code to fix checkpatch warnings. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Release all IRQ's on request_irq() errorDmitry Osipenko1-2/+3
Release all requested IRQ's on the request error to properly clean up allocated resources. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Replace readl/writel with relaxed versionsDmitry Osipenko1-17/+18
The readl/writel functions are inserting memory barrier to ensure that outstanding memory writes are completed, this results in L2 cache syncing being done on Tegra20 and Tegra30 which isn't a very cheap operation. Replace all readl/writel occurrences in the code with the relaxed versions since there is no need for the memory-access syncing. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Reset hardware state on initDmitry Osipenko1-0/+3
Reset timer's hardware state to ensure that initially it is in a predictable state. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Unify timer codeDmitry Osipenko1-51/+60
Tegra132 is 64bit platform and it has the tegra20-timer hardware unit. Right now the corresponding timer code isn't compiled for ARM64, remove ifdef'iness from the code and compile tegra20-timer for both 32 and 64 bit platforms. Also note that like the older generations, Tegra210 has the microseconds counter, hence the timer_us clocksource is now made available for Tegra210 as well. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-25clocksource/drivers/tegra: Support per-CPU timers on all Tegra'sDmitry Osipenko1-77/+43
Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't very accurate due to the clock rate jitter caused by CPU frequency scaling. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-By: Peter De Schrijver <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282Thomas Gleixner1-10/+1
Based on 1 normalized pattern(s): this software is licensed under the terms of the gnu general public license version 2 as published by the free software foundation and may be copied distributed and modified under those terms this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 285 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-05-02clocksource/drivers/tegra: Rework for compensation of suspend timeJoseph Lo1-43/+20
Since the clocksource framework has the support for suspend time compensation. Re-work the driver to use that, so we can reduce the duplicate code. Suggested-by: Daniel Lezcano <[email protected]> Signed-off-by: Joseph Lo <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2019-02-23clocksource/drivers/tegra: Add Tegra210 timer supportJoseph Lo1-111/+259
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 <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Joseph Lo <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Jon Hunter <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2018-12-18clocksource/drivers/tegra20: Change name tegra20_timer to timer-tegra20Daniel Lezcano1-0/+263
In order to unify the names in this directory, let's rename the driver to be prefixed with timer-* Signed-off-by: Daniel Lezcano <[email protected]>