Commit 0d86331b authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'ux500-clksrc-for-arm-soc' of...

Merge tag 'ux500-clksrc-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers

From Linus Walleij:
Ux500 clocksource updates:
- Use relaxed readl() variant
- Fix a single comment

* tag 'ux500-clksrc-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson

:
  clocksource: dbx500-prcmu: comment cleanup
  clocksource: dbx500-prcmu: use relaxed readl variant

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents f54ffe0f 807eba55
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
 * DBx500-PRCMU Timer
 * The PRCMU has 5 timers which are available in a always-on
 * power domain.  We use the Timer 4 for our always-on clock
 * source on DB8500 and Timer 3 on DB5500.
 * source on DB8500.
 */
#include <linux/clockchips.h>
#include <linux/clksrc-dbx500-prcmu.h>
@@ -30,15 +30,14 @@

static void __iomem *clksrc_dbx500_timer_base;

static cycle_t clksrc_dbx500_prcmu_read(struct clocksource *cs)
static cycle_t notrace clksrc_dbx500_prcmu_read(struct clocksource *cs)
{
	void __iomem *base = clksrc_dbx500_timer_base;
	u32 count, count2;

	do {
		count = readl(clksrc_dbx500_timer_base +
			      PRCMU_TIMER_DOWNCOUNT);
		count2 = readl(clksrc_dbx500_timer_base +
			       PRCMU_TIMER_DOWNCOUNT);
		count = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT);
		count2 = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT);
	} while (count2 != count);

	/* Negate because the timer is a decrementing counter */