Skip to content

Commit

Permalink
drivers/rtc/rtc-pl031.c: enable clock on all ST variants
Browse files Browse the repository at this point in the history
The ST variants of the PL031 all require bit 26 in the control register
to be set before they work properly.  Discovered this when testing on
the Nomadik board where it would suprisingly just stand still.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Walleij authored and Linus Torvalds committed Apr 12, 2012
1 parent 41c9308 commit 2f39721
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/rtc/rtc-pl031.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
dev_dbg(&adev->dev, "revision = 0x%01x\n", ldata->hw_revision);

/* Enable the clockwatch on ST Variants */
if ((ldata->hw_designer == AMBA_VENDOR_ST) &&
(ldata->hw_revision > 1))
if (ldata->hw_designer == AMBA_VENDOR_ST)
writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN,
ldata->base + RTC_CR);

Expand Down

0 comments on commit 2f39721

Please sign in to comment.