[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1397558929-12123-1-git-send-email-Li.Xiubo@freescale.com>
Date: Tue, 15 Apr 2014 18:48:49 +0800
From: Xiubo Li <Li.Xiubo@...escale.com>
To: <daniel.lezcano@...aro.org>, <tglx@...utronix.de>,
<shawn.guo@...aro.org>
CC: <linux-kernel@...r.kernel.org>, Xiubo Li <Li.Xiubo@...escale.com>
Subject: [PATCH] clocksource: vf_pit_timer: fix pit_read_sched_clock
The pit_read_sched_clock mean to getting the current counter value,
and the vf pit timer is a down count timer, this should return
the counter value or the cycles elapsed.
Signed-off-by: Xiubo Li <Li.Xiubo@...escale.com>
---
drivers/clocksource/vf_pit_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/vf_pit_timer.c b/drivers/clocksource/vf_pit_timer.c
index 02821b0..a918bc4 100644
--- a/drivers/clocksource/vf_pit_timer.c
+++ b/drivers/clocksource/vf_pit_timer.c
@@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(void)
static u64 pit_read_sched_clock(void)
{
- return __raw_readl(clksrc_base + PITCVAL);
+ return ~__raw_readl(clksrc_base + PITCVAL);
}
static int __init pit_clocksource_init(unsigned long rate)
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists