Clocksource read callback expects incrementing timer values, while internal timer on Marvell SoCs counts backwards. Fix value returned by Marvell MVEBU and Orion clocksource drivers. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx> --- Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> Cc: barebox@xxxxxxxxxxxxxxxxxxx --- drivers/clocksource/mvebu.c | 2 +- drivers/clocksource/orion.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/mvebu.c b/drivers/clocksource/mvebu.c index 1a9d573..6e5ceba 100644 --- a/drivers/clocksource/mvebu.c +++ b/drivers/clocksource/mvebu.c @@ -42,7 +42,7 @@ static __iomem void *timer_base; uint64_t mvebu_clocksource_read(void) { - return __raw_readl(timer_base + TIMER0_VAL_OFF); + return 0 - __raw_readl(timer_base + TIMER0_VAL_OFF); } static struct clocksource cs = { diff --git a/drivers/clocksource/orion.c b/drivers/clocksource/orion.c index d27477a..6902c72 100644 --- a/drivers/clocksource/orion.c +++ b/drivers/clocksource/orion.c @@ -34,7 +34,7 @@ static __iomem void *timer_base; static uint64_t orion_clocksource_read(void) { - return __raw_readl(timer_base + TIMER0_VAL); + return 0 - __raw_readl(timer_base + TIMER0_VAL); } static struct clocksource clksrc = { -- 1.7.2.5 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox