Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <linus.walleij@linaro.org>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Linus Walleij and committed by
Linus Torvalds
3399cfb5 211b0cdc

+3 -1
+3 -1
drivers/rtc/rtc-pl031.c
··· 350 350 /* Enable the clockwatch on ST Variants */ 351 351 if (vendor->clockwatch) 352 352 data |= RTC_CR_CWEN; 353 - writel(data | RTC_CR_EN, ldata->base + RTC_CR); 353 + else 354 + data |= RTC_CR_EN; 355 + writel(data, ldata->base + RTC_CR); 354 356 355 357 /* 356 358 * On ST PL031 variants, the RTC reset value does not provide correct