提交 53028227 编写于 作者: R Rabin Vincent 提交者: Linus Walleij

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: NRabin Vincent <rabin.vincent@stericsson.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NFabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 e4aa937e
...@@ -30,15 +30,14 @@ ...@@ -30,15 +30,14 @@
static void __iomem *clksrc_dbx500_timer_base; 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; u32 count, count2;
do { do {
count = readl(clksrc_dbx500_timer_base + count = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT);
PRCMU_TIMER_DOWNCOUNT); count2 = readl_relaxed(base + PRCMU_TIMER_DOWNCOUNT);
count2 = readl(clksrc_dbx500_timer_base +
PRCMU_TIMER_DOWNCOUNT);
} while (count2 != count); } while (count2 != count);
/* Negate because the timer is a decrementing counter */ /* Negate because the timer is a decrementing counter */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册