summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@altera.com>2013-12-10 19:49:18 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-12-10 19:49:18 +0100
commit85dc6ee1237c8a4a7742e6abab96a20389b7d682 (patch)
treeaf98a7abca1be43822350326bcc1c222104798df /drivers/clocksource
parent6db50bb67598668c525f12e2f7191f5d03ca46f2 (diff)
downloadop-kernel-dev-85dc6ee1237c8a4a7742e6abab96a20389b7d682.zip
op-kernel-dev-85dc6ee1237c8a4a7742e6abab96a20389b7d682.tar.gz
clocksource: dw_apb_timer_of: Fix read_sched_clock
The read_sched_clock should return the ~value because the clock is a countdown implementation. read_sched_clock() should be the same as __apbt_read_clocksource(). Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/dw_apb_timer_of.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c
index 45ba8ae..b29d7cd 100644
--- a/drivers/clocksource/dw_apb_timer_of.c
+++ b/drivers/clocksource/dw_apb_timer_of.c
@@ -108,7 +108,7 @@ static void __init add_clocksource(struct device_node *source_timer)
static u64 read_sched_clock(void)
{
- return __raw_readl(sched_io_base);
+ return ~__raw_readl(sched_io_base);
}
static const struct of_device_id sptimer_ids[] __initconst = {
OpenPOWER on IntegriCloud