lkml.org 
[lkml]   [2013]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] ARM: clocksource: add support for MOXA ART SoCs
On Mon, 1 Jul 2013, Jonas Jensen wrote:
> +static int moxart_clkevt_next_event(unsigned long cycles,
> + struct clock_event_device *unused)
> +{
> + u32 u;
> +
> + u = readl(base + TIMER_CR) & ~TIMEREG_CR_1_ENABLE;

You should cache that value and avoid another readout below. You could
even cache it in general so you avoid all readouts.

> + writel(u, base + TIMER_CR);
> + u = readl(base + TIMER1_BASE + REG_COUNT) - cycles;
> + writel(u, base + TIMER1_BASE + REG_MATCH1);
> + u = readl(base + TIMER_CR) | TIMEREG_CR_1_ENABLE;
> + writel(u, base + TIMER_CR);
> + return 0;
> +}

Thanks,

tglx


\
 
 \ /
  Last update: 2013-07-01 20:21    [W:0.106 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site