diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2013-01-21 07:09:31 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-27 08:05:54 -0400 |
commit | 530282278bc8ceca122f75c2f1c7f77f28aecc89 (patch) | |
tree | 0edbb9fe4b1a3d0559b3cbe0270924913c28c9df | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
clocksource: dbx500-prcmu: use relaxed readl variant
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>
-rw-r--r-- | drivers/clocksource/clksrc-dbx500-prcmu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c index 54f3d119d99c..138c5a579550 100644 --- a/drivers/clocksource/clksrc-dbx500-prcmu.c +++ b/drivers/clocksource/clksrc-dbx500-prcmu.c | |||
@@ -30,15 +30,14 @@ | |||
30 | 30 | ||
31 | static void __iomem *clksrc_dbx500_timer_base; | 31 | static void __iomem *clksrc_dbx500_timer_base; |
32 | 32 | ||
33 | static cycle_t clksrc_dbx500_prcmu_read(struct clocksource *cs) | 33 | static cycle_t notrace clksrc_dbx500_prcmu_read(struct clocksource *cs) |
34 | { | 34 | { |
35 | void __iomem *base = clksrc_dbx500_timer_base; | ||
35 | u32 count, count2; | 36 | u32 count, count2; |
36 | 37 | ||
37 | do { | 38 | do { |
38 | count = readl(clksrc_dbx500_timer_base + | 39 | count = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT); |
39 | PRCMU_TIMER_DOWNCOUNT); | 40 | count2 = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT); |
40 | count2 = readl(clksrc_dbx500_timer_base + | ||
41 | PRCMU_TIMER_DOWNCOUNT); | ||
42 | } while (count2 != count); | 41 | } while (count2 != count); |
43 | 42 | ||
44 | /* Negate because the timer is a decrementing counter */ | 43 | /* Negate because the timer is a decrementing counter */ |