Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757915Ab3CDDvz (ORCPT ); Sun, 3 Mar 2013 22:51:55 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:33107 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756786Ab3CDDoh (ORCPT ); Sun, 3 Mar 2013 22:44:37 -0500 Message-Id: <20130304033712.135988033@decadent.org.uk> User-Agent: quilt/0.60-1 Date: Mon, 04 Mar 2013 03:37:53 +0000 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: akpm@linux-foundation.org, Linus Walleij , Haojian Zhuang , Mian Yousaf KAUKAB , Srinidhi Kasagar , Alessandro Zummo , Linus Torvalds Subject: [ 046/153] drivers/rtc/rtc-pl031.c: restore ST variant functionality In-Reply-To: <20130304033707.648729212@decadent.org.uk> X-SA-Exim-Connect-IP: 2001:470:1f08:1539:a11:96ff:fec6:70c4 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1772 Lines: 48 3.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Linus Walleij commit 3399cfb5df9594495b876d1843a7165f77366b2b upstream. 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Ben Hutchings --- drivers/rtc/rtc-pl031.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -344,7 +344,9 @@ static int pl031_probe(struct amba_devic /* Enable the clockwatch on ST Variants */ if (ldata->hw_designer == AMBA_VENDOR_ST) 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/