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

Haojian Zhuang haojian.zhuang at linaro.org
Mon Feb 4 07:34:34 EST 2013


On 4 February 2013 20:25, Linus Walleij <linus.walleij at linaro.org> wrote:
> 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

I prefer you can submit a follow up patch. And I think that you can
use a compatible
name to distinguish from original "arm,rtc-pl031". Then we can get two
branches to
handle the difference in the probe function. What's your opinion?

Regards
Haojian



More information about the linux-arm-kernel mailing list