clocksource/drivers/arm_arch_timer: Enable and verify MMIO access
authorRobin Murphy <robin.murphy@arm.com>
Mon, 1 Feb 2016 12:00:48 +0000 (12:00 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 25 Feb 2016 13:30:15 +0000 (14:30 +0100)
commite392d603f61767cb2de4d82bb55a035918f8342c
tree1051148f6bec4a0bea199d2302858621a9ce9c5d
parentbbf66d897adf2bb0c310db96c97e8db6369f39e1
clocksource/drivers/arm_arch_timer: Enable and verify MMIO access

So far, we have been blindly assuming that having access to a
memory-mapped timer frame implies that the individual elements of that
frame frame are already enabled. Whilst it's the firmware's job to give
us non-secure access to frames in the first place, we should not rely
on implementations always being generous enough to also configure CNTACR
for those non-secure frames (e.g. [1]).

Explicitly enable feature-level access per-frame, and verify that the
access we want is really implemented before trying to make use of it.

[1]:https://github.com/ARM-software/tf-issues/issues/170

Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/arm_arch_timer.c