From patchwork Tue Feb 5 12:50:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 14551 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8984223E92 for ; Tue, 5 Feb 2013 12:50:49 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by fiordland.canonical.com (Postfix) with ESMTP id 3F30CA187AC for ; Tue, 5 Feb 2013 12:50:49 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so83149veb.9 for ; Tue, 05 Feb 2013 04:50:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=UaeZZIFWHsvcHkOD0AQcLanhCOJ/WHKzUgGVNB91uy8=; b=pM3Sx2oB3AWW8/qFH6paWOKfzVZHL5daPGAi/2FXv6dEJtowCtmVkj6BfwolwFSu6c OM8DQh0oDYEEIoOCwmbvJNQ3X3amf4Wwm1Lv8MJ9B2BXaITIYbvvA5Xltl+uhL0KvSZG xGPuevnO7VHp8Or6wpcATCdGVSbrccnU+vkSuRq3yY9ydBkoUIZ8iI10P1Cjej7OqpU5 LVwM3ksYFI4POO93qOlOAN6/Lm3n/FRD357VTxS9czCqh8YnLVSSEGLjlFTULlI311qN ZiWw7xlOeXfCAOzLGFPg9OPXtbkotRxeoL88/w00dVw4dgDPShDBokTP+3suN24PaIhQ /qeg== X-Received: by 10.52.24.98 with SMTP id t2mr20556438vdf.69.1360068648738; Tue, 05 Feb 2013 04:50:48 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp136623vec; Tue, 5 Feb 2013 04:50:47 -0800 (PST) X-Received: by 10.14.206.132 with SMTP id l4mr84854088eeo.38.1360068646890; Tue, 05 Feb 2013 04:50:46 -0800 (PST) Received: from eu1sys200aog111.obsmtp.com (eu1sys200aog111.obsmtp.com [207.126.144.131]) by mx.google.com with SMTP id 7si30812441eec.88.2013.02.05.04.50.35 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Feb 2013 04:50:46 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.131; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKUREAGzwCDkxdkuLp13lk/64WwuqWomq7@postini.com; Tue, 05 Feb 2013 12:50:46 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id C5AEC65; Tue, 5 Feb 2013 12:49:43 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 08CCE7B; Tue, 5 Feb 2013 06:57:49 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 8C0B324C2AB; Tue, 5 Feb 2013 13:50:21 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 5 Feb 2013 13:50:27 +0100 From: Linus Walleij To: Andrew Morton Cc: Alessandro Zummo , , Anmar Oueja , Linus Walleij , Haojian Zhuang , Mian Yousaf KAUKAB , Srinidhi Kasagar , Subject: [PATCH] rtc: pl031: restore ST variant functionality Date: Tue, 5 Feb 2013 13:50:12 +0100 Message-ID: <1360068612-30592-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQn5Wy4tHirBvKQf7vptAHU+ifVvGET9PSSl1BkfOF9FkkB5bOeNgy5ppc9RBgHoR6le7egV From: Linus Walleij The patch titled: "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. Cc: Haojian Zhuang Cc: Mian Yousaf KAUKAB Cc: Srinidhi Kasagar Cc: Alessandro Zummo Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij --- drivers/rtc/rtc-pl031.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index fe467c3..8900ea7 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -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