From patchwork Tue Jul 5 10:17:52 2016
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Philipp Zabel
X-Patchwork-Id: 9213989
Return-Path:
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id
BF64A60752 for ;
Tue, 5 Jul 2016 10:20:03 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFAF62897E
for ;
Tue, 5 Jul 2016 10:20:03 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id A31CC289C3; Tue, 5 Jul 2016 10:20:03 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED
autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.9])
(using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A297D2897E
for ;
Tue, 5 Jul 2016 10:20:02 +0000 (UTC)
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux))
id 1bKNQy-0001LE-Ag; Tue, 05 Jul 2016 10:18:28 +0000
Received: from metis.ext.pengutronix.de
([2001:67c:670:201:290:27ff:fe1d:cc33])
by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat
Linux)) id 1bKNQv-0001J5-F8
for linux-arm-kernel@lists.infradead.org;
Tue, 05 Jul 2016 10:18:26 +0000
Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]
helo=dude.pengutronix.de.)
by metis.ext.pengutronix.de with esmtp (Exim 4.80)
(envelope-from )
id 1bKNQT-0002ud-Jp; Tue, 05 Jul 2016 12:17:57 +0200
From: Philipp Zabel
To: linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] reset: socfpga: use readl/writel_relaxed
Date: Tue, 5 Jul 2016 12:17:52 +0200
Message-Id: <1467713872-4051-3-git-send-email-p.zabel@pengutronix.de>
X-Mailer: git-send-email 2.8.1
In-Reply-To: <1467713872-4051-1-git-send-email-p.zabel@pengutronix.de>
References: <1467713872-4051-1-git-send-email-p.zabel@pengutronix.de>
X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7
X-SA-Exim-Mail-From: p.zabel@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);
SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20160705_031825_700078_331F23FE
X-CRM114-Status: UNSURE ( 9.87 )
X-CRM114-Notice: Please train this message.
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id:
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe:
,
Cc: Chen-Yu Tsai , Philipp Zabel ,
Dinh Nguyen ,
Steffen Trumtrar ,
Maxime Ripard ,
linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Sender: "linux-arm-kernel"
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
This just removes the rmb()/wmb() pair between register read and
write. Since no relevant reads follow the rmb and no relevant writes
precede the wmb, they should be safe to remove.
Signed-off-by: Philipp Zabel
---
drivers/reset/reset-socfpga.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 78ebf84..4a65128 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -44,8 +44,8 @@ static int socfpga_reset_assert(struct reset_controller_dev *rcdev,
spin_lock_irqsave(&data->lock, flags);
- reg = readl(data->membase + (bank * NR_BANKS));
- writel(reg | BIT(offset), data->membase + (bank * NR_BANKS));
+ reg = readl_relaxed(data->membase + (bank * NR_BANKS));
+ writel_relaxed(reg | BIT(offset), data->membase + (bank * NR_BANKS));
spin_unlock_irqrestore(&data->lock, flags);
return 0;
@@ -65,8 +65,8 @@ static int socfpga_reset_deassert(struct reset_controller_dev *rcdev,
spin_lock_irqsave(&data->lock, flags);
- reg = readl(data->membase + (bank * NR_BANKS));
- writel(reg & ~BIT(offset), data->membase + (bank * NR_BANKS));
+ reg = readl_relaxed(data->membase + (bank * NR_BANKS));
+ writel_relaxed(reg & ~BIT(offset), data->membase + (bank * NR_BANKS));
spin_unlock_irqrestore(&data->lock, flags);