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: 149910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-lpp01m010-f56.google.com (mail-lpp01m010-f56.google.com [209.85.215.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 1C845B6FA2 for ; Sun, 1 Apr 2012 20:27:57 +1000 (EST) Received: by lahg1 with SMTP id g1sf972538lah.11 for ; Sun, 01 Apr 2012 03:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=Kxazju8U9x3qpNAk8Ofw2flLoNxC3Ls1X6Dk55g/Mpk=; b=zdAFUzbu6TTRHNDBxDGwc9tDjy2QibsTbhW0iEIdz0dTXSI2/IGdDvf8sEvfETBQSo AHeFUJ0l5EiTCCaPvNPBJ63aRvySr3Js8NFttXwkYmnABqOG6FBnD5AbLu0Il6R5XGne ABK+XKZHm99AJj5XJJ8R9OzBh+mqGwC5WiySE= Received: by 10.204.129.219 with SMTP id p27mr177401bks.16.1333276072294; Sun, 01 Apr 2012 03:27:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.204.128.220 with SMTP id l28ls4312307bks.8.gmail; Sun, 01 Apr 2012 03:27:50 -0700 (PDT) Received: by 10.205.123.6 with SMTP id gi6mr317466bkc.5.1333276070915; Sun, 01 Apr 2012 03:27:50 -0700 (PDT) Received: by 10.205.123.6 with SMTP id gi6mr317465bkc.5.1333276070896; Sun, 01 Apr 2012 03:27:50 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by gmr-mx.google.com with ESMTPS id 8si18605916bka.1.2012.04.01.03.27.50 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Apr 2012 03:27:50 -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; 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: [rtc-linux] [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-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: gmr-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 Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 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);