Skip to content

Commit

Permalink
drivers/rtc/rtc-pl031.c: restore ST variant functionality
Browse files Browse the repository at this point in the history
Commit e7e034e ("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 <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Cc: Mian Yousaf KAUKAB <[email protected]>
Cc: Srinidhi Kasagar <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
linusw authored and torvalds committed Feb 12, 2013
1 parent 211b0cd commit 3399cfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/rtc/rtc-pl031.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3399cfb

Please sign in to comment.