]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
clocksource: dbx500-prcmu: use relaxed readl variant
authorRabin Vincent <rabin.vincent@stericsson.com>
Mon, 21 Jan 2013 12:09:31 +0000 (13:09 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 27 May 2013 12:05:54 +0000 (14:05 +0200)
Modify clksrc_dbx500_prcmu_read to replace readl() with readl_relaxed().
This speeds up calls to the function by about 40%.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/clocksource/clksrc-dbx500-prcmu.c

index 54f3d119d99c7b495008ee219538f488106b07d8..138c5a579550a68236090dc9282bc4841c5189ff 100644 (file)
 
 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 */