From patchwork Tue Sep 23 14:48:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 392548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ee0-x23c.google.com (mail-ee0-x23c.google.com [IPv6:2a00:1450:4013:c00::23c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3DADC1400B2 for ; Wed, 24 Sep 2014 00:48:54 +1000 (EST) Received: by mail-ee0-f60.google.com with SMTP id c13sf459405eek.5 for ; Tue, 23 Sep 2014 07:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=5lCCTXVFpDOHaaXMt3B9feLeY19uqBxQDu30cDPjisU=; b=GiztWCPnAdtRItLPfeeL/xvBZrSY+wqMChnxK67dtvYwEHNsqDu6xz2gQcgtbhOrgg N1S5AY0CqOFlY1eIwmBgjDQhv/iEB0DDGzMlUh+V1NRCQ1kVO2ymGVXaL1v4HRpwYpSI Oxk6nqNMJ1Si/GrpzQXPe+lV1oy/9LCJDPO/F+FB6LvOmJL173IgnG3L6oGJpirHusL4 h2eFnq2VP2RzmS8oGiBeV88l98lG4LDeUnJTVwgFIp2BOUl5V1qrzSPzcZfOChlJIGHv lR2/2If+rP4fgXcXKODlBLJGAoh0bwJ8vC4IllvaEsospU0ApmpNbKIkbDfSTkaoVy0i 2wBA== X-Received: by 10.152.20.195 with SMTP id p3mr2486lae.1.1411483731843; Tue, 23 Sep 2014 07:48:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.152.28.73 with SMTP id z9ls54528lag.55.gmail; Tue, 23 Sep 2014 07:48:50 -0700 (PDT) X-Received: by 10.112.89.8 with SMTP id bk8mr36332lbb.6.1411483730944; Tue, 23 Sep 2014 07:48:50 -0700 (PDT) Received: from mail.free-electrons.com (top.free-electrons.com. [176.31.233.9]) by gmr-mx.google.com with ESMTP id f9si123658wib.2.2014.09.23.07.48.50 for ; Tue, 23 Sep 2014 07:48:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning boris.brezillon@free-electrons.com does not designate 176.31.233.9 as permitted sender) client-ip=176.31.233.9; Received: by mail.free-electrons.com (Postfix, from userid 106) id 38EB875E; Tue, 23 Sep 2014 16:48:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2B60073D; Tue, 23 Sep 2014 16:48:50 +0200 (CEST) From: Boris BREZILLON To: Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , Alessandro Zummo , rtc-linux@googlegroups.com, Samuel Ortiz , Lee Jones , Johan Hovold Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Acked-by: Arnd Bergmann" , Boris BREZILLON Subject: [rtc-linux] [PATCH v9 02/10] rtc: at91sam9: use standard readl/writel functions instead of raw versions Date: Tue, 23 Sep 2014 16:48:37 +0200 Message-Id: <1411483725-31532-3-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411483725-31532-1-git-send-email-boris.brezillon@free-electrons.com> References: <1411483725-31532-1-git-send-email-boris.brezillon@free-electrons.com> X-Original-Sender: boris.brezillon@free-electrons.com X-Original-Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: domain of transitioning boris.brezillon@free-electrons.com does not designate 176.31.233.9 as permitted sender) smtp.mail=boris.brezillon@free-electrons.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: , List-Unsubscribe: , Raw versions of writel and writel should not be directly used and should be replaced by their relaxed versions (readl/writel_relaxed), which take endianness conversion into account. In this driver we prefer the standard readl/writel function which add the appropriate memory barrier around the access (the performance penalty is negligible for this kind of application). Signed-off-by: Boris BREZILLON Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Acked-by: Johan Hovold Acked-by: Arnd Bergmann --- drivers/rtc/rtc-at91sam9.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 51f0038..74a9ca0 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c @@ -77,14 +77,14 @@ struct sam9_rtc { }; #define rtt_readl(rtc, field) \ - __raw_readl((rtc)->rtt + AT91_RTT_ ## field) + readl((rtc)->rtt + AT91_RTT_ ## field) #define rtt_writel(rtc, field, val) \ - __raw_writel((val), (rtc)->rtt + AT91_RTT_ ## field) + writel((val), (rtc)->rtt + AT91_RTT_ ## field) #define gpbr_readl(rtc) \ - __raw_readl((rtc)->gpbr) + readl((rtc)->gpbr) #define gpbr_writel(rtc, val) \ - __raw_writel((val), (rtc)->gpbr) + writel((val), (rtc)->gpbr) /* * Read current time and date in RTC