From patchwork Mon Jul 11 10:57:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Gl=C3=B6ckner?= X-Patchwork-Id: 104195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-fx0-f56.google.com (mail-fx0-f56.google.com [209.85.161.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id B3076B6F77 for ; Mon, 11 Jul 2011 20:58:32 +1000 (EST) Received: by fxg17 with SMTP id 17sf4747175fxg.11 for ; Mon, 11 Jul 2011 03:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:from:to:cc:subject:date:message-id :mime-version:organization: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 :content-transfer-encoding; bh=FJAJwmCV9YlzeTLaQlxISSzkn3TqufffOz063gFGR78=; b=e9VolAQy/Z1gXiyGPBKzIu6kTTcy4vGIOG6ZV4n81PLxnSLMinW/om0BzAnfb5A5xj V9BuyWNS95r5KwdpH9hx5rE3k2YWem2ycp7CsxTJtwzRCJNTI/zqYi4+riNMofLrB8zv KiznKSqP/aFCUZnmih+ms9wNtKbuVPAckJlxo= Received: by 10.223.96.12 with SMTP id f12mr1401033fan.34.1310381905335; Mon, 11 Jul 2011 03:58:25 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.204.39.211 with SMTP id h19ls433903bke.2.gmail; Mon, 11 Jul 2011 03:58:24 -0700 (PDT) Received: by 10.204.64.147 with SMTP id e19mr659863bki.9.1310381904131; Mon, 11 Jul 2011 03:58:24 -0700 (PDT) Received: by 10.204.64.147 with SMTP id e19mr659862bki.9.1310381904110; Mon, 11 Jul 2011 03:58:24 -0700 (PDT) Received: from mx1.emlix.com (mx1.emlix.com [193.175.82.238]) by gmr-mx.google.com with ESMTPS id z3si6581860bkb.0.2011.07.11.03.58.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 03:58:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dg@emlix.com designates 193.175.82.238 as permitted sender) client-ip=193.175.82.238; Received: from [80.150.94.234] (port=56401 helo=mailer.emlix.com) by mx1.emlix.com with esmtp (Exim 4.69) (envelope-from ) id 1QgEBP-00087Y-A4; Mon, 11 Jul 2011 12:57:47 +0200 Received: by mailer.emlix.com id 1QgEID-00059G-16; Mon, 11 Jul 2011 13:04:49 +0200 Received: by avocado.emlix.com (Postfix, from userid 2059) id C68305DB381; Mon, 11 Jul 2011 12:58:20 +0200 (CEST) From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= To: Alessandro Zummo Cc: "George G. Davis" , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Subject: [rtc-linux] [PATCH] rtc-omap: Fix initialization of control register Date: Mon, 11 Jul 2011 12:57:46 +0200 Message-Id: <1310381866-25584-1-git-send-email-dg@emlix.com> MIME-Version: 1.0 Organization: emlix gmbh, Goettingen, Germany X-Original-Sender: dg@emlix.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of dg@emlix.com designates 193.175.82.238 as permitted sender) smtp.mail=dg@emlix.com 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: , As the comment explains, the intention of the code is to clear the OMAP_RTC_CTRL_MODE_12_24 bit, but instead it only clears the OMAP_RTC_CTRL_SPLIT and OMAP_RTC_CTRL_AUTO_COMP bits, which should be kept. OMAP_RTC_CTRL_DISABLE, OMAP_RTC_CTRL_SET_32_COUNTER, OMAP_RTC_CTRL_TEST, and OMAP_RTC_CTRL_ROUND_30S are also better off being cleared. Signed-off-by: Daniel Glöckner --- drivers/rtc/rtc-omap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index bcae8dd..7789002 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -368,7 +368,7 @@ static int __init omap_rtc_probe(struct platform_device *pdev) pr_info("%s: already running\n", pdev->name); /* force to 24 hour mode */ - new_ctrl = reg & ~(OMAP_RTC_CTRL_SPLIT|OMAP_RTC_CTRL_AUTO_COMP); + new_ctrl = reg & (OMAP_RTC_CTRL_SPLIT|OMAP_RTC_CTRL_AUTO_COMP); new_ctrl |= OMAP_RTC_CTRL_STOP; /* BOARD-SPECIFIC CUSTOMIZATION CAN GO HERE: