clocksource/drivers/tegra: Restore timer rate on Tegra210
authorDmitry Osipenko <digetx@gmail.com>
Tue, 18 Jun 2019 14:03:51 +0000 (17:03 +0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 25 Jun 2019 17:49:18 +0000 (19:49 +0200)
The clocksource rate is initialized only for the first per-CPU clocksource
and then that rate shall be replicated for the rest of clocksource's
because they are initialized manually in the code.

Fixes: 3be2a85a0b61 ("clocksource/drivers/tegra: Support per-CPU timers on all Tegra's")
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/timer-tegra.c

index ed1454000ea9f79265c1f0e5892f53d47cf3911b..880ba67ca7ee16b653df2122c6f7fd0c4bc18bd2 100644 (file)
@@ -279,6 +279,8 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20,
                 */
                if (tegra20)
                        cpu_to->of_clk.rate = 1000000;
+               else
+                       cpu_to->of_clk.rate = timer_of_rate(to);
 
                cpu_to = per_cpu_ptr(&tegra_to, cpu);
                cpu_to->of_base.base = timer_reg_base + base;