From: Linus Walleij <[email protected]>
Subject: drivers/rtc/rtc-pl031.c: restore ST variant functionality

e7e034e18a0ab ("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 real
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]>
---

 drivers/rtc/rtc-pl031.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN 
drivers/rtc/rtc-pl031.c~drivers-rtc-rtc-pl031c-restore-st-variant-functionality 
drivers/rtc/rtc-pl031.c
--- 
a/drivers/rtc/rtc-pl031.c~drivers-rtc-rtc-pl031c-restore-st-variant-functionality
+++ a/drivers/rtc/rtc-pl031.c
@@ -350,7 +350,9 @@ static int pl031_probe(struct amba_devic
        /* 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
_
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to