[PATCH] rtc: pl031: fix the missing operation on enable

Linus Walleij linus.walleij at linaro.org
Mon Feb 4 07:25:56 EST 2013


Hi Haojian, sorry for taking too long to reply...

On Wed, Jan 30, 2013 at 2:04 AM, Haojian Zhuang
<haojian.zhuang at linaro.org> wrote:

> RTC control register should be enabled in the process of initliazing.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang at linaro.org>

(...)
> +       data = readl(ldata->base + RTC_CR);
>         /* Enable the clockwatch on ST Variants */
>         if (vendor->clockwatch)
> -               writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN,
> -                      ldata->base + RTC_CR);
> +               data |= RTC_CR_CWEN;
> +       writel(data | RTC_CR_EN, ldata->base + RTC_CR);

This last line is *not* OK on the ST Variant. In our hardware that bit
is part of the clock divider, which means it will affect our timekeeping.

Do you want me to submit a follow-up patch?

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list