[PATCH] rtc: pl031: fix the missing operation on enable
From: haojian.zhuang@linaro.org (Haojian Zhuang)
Date: 2013-02-04 12:34:34
On 4 February 2013 20:25, Linus Walleij [off-list ref] wrote:
Hi Haojian, sorry for taking too long to reply... On Wed, Jan 30, 2013 at 2:04 AM, Haojian Zhuang [off-list ref] wrote:quoted
RTC control register should be enabled in the process of initliazing. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>(...)quoted
+ 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