[PATCH 1/7] microblaze: timer: Don't use cpu timer setting

From: Michal Simek
Date: Wed Feb 12 2020 - 10:42:37 EST


There is no longer valid that timer runs at the same frequency as cpu.
That's why don't use cpuinfo setup for timer clock base. Better is to error
out instead of using incorrect frequency.

Signed-off-by: Michal Simek <michal.simek@xxxxxxxxxx>
Reviewed-by: Stefan Asserhall <stefan.asserhall@xxxxxxxxxx>
---

arch/microblaze/kernel/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index a6683484b3a1..65bce785e6ed 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -304,7 +304,7 @@ static int __init xilinx_timer_init(struct device_node *timer)

if (!timer_clock_freq) {
pr_err("ERROR: Using CPU clock frequency\n");
- timer_clock_freq = cpuinfo.cpu_clock_freq;
+ return -EINVAL;
}

freq_div_hz = timer_clock_freq / HZ;
--
2.25.0