From: Linus Walleij Date: Tue, 12 Feb 2013 21:46:19 +0000 (-0800) Subject: drivers/rtc/rtc-pl031.c: restore ST variant functionality X-Git-Tag: v3.8~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3399cfb5df9594495b876d1843a7165f77366b2b;p=platform%2Fkernel%2Flinux-3.10.git drivers/rtc/rtc-pl031.c: restore ST variant functionality Commit e7e034e18a0a ("drivers/rtc/rtc-pl031.c: fix the missing operation on enable") accidentally broke the ST variants of PL031. The bit that is being poked as "clockwatch" enable bit for the ST variants does the work of bit 0 on this variant. Bit 0 is used for a clock divider on the ST variants, and setting it to 1 will affect timekeeping in a very bad way. Signed-off-by: Linus Walleij Acked-by: Haojian Zhuang Cc: Mian Yousaf KAUKAB Cc: Srinidhi Kasagar Cc: Alessandro Zummo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index 10c1a34..81c5077f 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -350,7 +350,9 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id) /* Enable the clockwatch on ST Variants */ if (vendor->clockwatch) data |= RTC_CR_CWEN; - writel(data | RTC_CR_EN, ldata->base + RTC_CR); + else + data |= RTC_CR_EN; + writel(data, ldata->base + RTC_CR); /* * On ST PL031 variants, the RTC reset value does not provide correct