From patchwork Sun Apr 1 10:27:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7556 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 8975023E23 for ; Sun, 1 Apr 2012 10:27:54 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1F5D8A18923 for ; Sun, 1 Apr 2012 10:27:54 +0000 (UTC) Received: by iage36 with SMTP id e36so4116169iag.11 for ; Sun, 01 Apr 2012 03:27:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=wnCOLncGxd/uHRVbvNTFpj2dNhwUk+pTvUxl5wrdQ14=; b=INmBZlADd0WL3t/J5/otNUfqLsxCZXoWOZTZ3F2tFFAxxKixVykW/11sq5hFOS1LD4 rXwi2M42V63dhgAku8ULvf00Ahm/jx4G7jLFTo+4ziBvPDigmVhfkJCxxCwTmjwIZ8xY N/jdY9ZvZVGqw5+K7CPcbCgRUXsx1M42u8nJwh3/0JzHl/UqfbJldCQcmSVEJBF0pvif GYn8pTn8BA+9TNLW4sRDYlE03wPzo2NA40+lPjgzt742RZl9/3jxebDuRv7KWtCjqqLr IOwFTEGSe1/9CEU63PYl/yUlg7A/Mq0DM9wlE/EjL/jHQGTSGoSbDBKJZ9aOTpkVhaHZ vY/A== Received: by 10.50.212.101 with SMTP id nj5mr2839760igc.41.1333276073598; Sun, 01 Apr 2012 03:27:53 -0700 (PDT) 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.231.5.205 with SMTP id 13csp65437ibw; Sun, 1 Apr 2012 03:27:52 -0700 (PDT) Received: by 10.205.129.137 with SMTP id hi9mr1932253bkc.131.1333276071884; Sun, 01 Apr 2012 03:27:51 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id tj4si8012461bkb.13.2012.04.01.03.27.50 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Apr 2012 03:27:51 -0700 (PDT) Received-SPF: neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: from fecusia (c83-249-217-152.bredband.comhem.se [83.249.217.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id D33E865D95; Sun, 1 Apr 2012 12:27:48 +0200 (CEST) Received: by fecusia (sSMTP sendmail emulation); Sun, 1 Apr 2012 12:27:46 +0200 From: "Linus Walleij" To: rtc-linux@googlegroups.com, akpm@linux-foundation.org Cc: Alessandro Zummo , Linus Walleij , stable@kernel.org, Mian Yousaf Kaukab , Alessandro Rubini Subject: [PATCH] rtc/pl031: enable clock on all ST variants Date: Sun, 1 Apr 2012 12:27:28 +0200 Message-Id: <1333276048-26275-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQkth444KsJ2feK2u34dAq4gSG3ZVlBi2ue5lZCY37WhJblYioVhkhR3u7D9GgFiAsiHbTf/ 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. Cc: stable@kernel.org Cc: Mian Yousaf Kaukab Cc: Alessandro Rubini Signed-off-by: Linus Walleij --- drivers/rtc/rtc-pl031.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index 692de73..684ef4b 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -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);