aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/arm_arch_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
-rw-r--r--drivers/clocksource/arm_arch_timer.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 67bbbd8ae507..297538fef10a 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -673,14 +673,16 @@ static void __init arch_timer_mem_init(struct device_node *np)
u32 cnttidr;
arch_timers_present |= ARCH_MEM_TIMER;
- cntctlbase = of_iomap(np, 0);
- if (!cntctlbase) {
- pr_err("arch_timer: Can't find CNTCTLBase\n");
- return;
- }
+ if (of_property_read_u32(np, "arm,cnttidr", &cnttidr)) {
+ cntctlbase = of_iomap(np, 0);
+ if (!cntctlbase) {
+ pr_err("arch_timer: Can't find CNTCTLBase\n");
+ return;
+ }
- cnttidr = readl_relaxed(cntctlbase + CNTTIDR);
- iounmap(cntctlbase);
+ cnttidr = readl_relaxed(cntctlbase + CNTTIDR);
+ iounmap(cntctlbase);
+ }
/*
* Try to find a virtual capable frame. Otherwise fall back to a