[PATCH] arm/spear600: fix one-shot timer
Viresh Kumar
viresh.kumar at st.com
Tue Feb 21 23:30:03 EST 2012
On 2/22/2012 3:49 AM, Gilles Chanteperdrix wrote:
> diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
> index 0c77e42..ac15ff3 100644
> --- a/arch/arm/plat-spear/time.c
> +++ b/arch/arm/plat-spear/time.c
> @@ -147,9 +147,12 @@ static int clockevent_next_event(unsigned long cycles,
> {
> u16 val;
>
> + val = readw(gpt_base + CR(CLKEVT));
can merge above three lines now.
> + if ((val & CTRL_ENABLE))
no need of extra (). Did you run checkpatch? I believe checkpatch
reports such issues.
> + writew(val & ~CTRL_ENABLE, gpt_base + CR(CLKEVT));
> +
> writew(cycles, gpt_base + LOAD(CLKEVT));
>
> - val = readw(gpt_base + CR(CLKEVT));
> val |= CTRL_ENABLE | CTRL_INT_ENABLE;
> writew(val, gpt_base + CR(CLKEVT));
Otherwise,
Acked-by: Viresh Kumar <viresh.kumar at st.com>
--
viresh
More information about the linux-arm-kernel
mailing list