From patchwork Wed Jun 8 18:31:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Leach X-Patchwork-Id: 9165537 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 914B660832 for ; Wed, 8 Jun 2016 18:35:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87B112804C for ; Wed, 8 Jun 2016 18:35:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C6A02824F; Wed, 8 Jun 2016 18:35:48 +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=-3.2 required=2.0 tests=BAYES_00,FSL_HELO_HOME, 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 1A5082804C for ; Wed, 8 Jun 2016 18:35:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAiIz-0008RR-GD; Wed, 08 Jun 2016 18:34:17 +0000 Received: from mx0.mattleach.net ([176.58.118.143]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAiHk-0006gd-Pd for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2016 18:33:02 +0000 Received: by mx0.mattleach.net (Postfix, from userid 99) id 9B73F62242; Wed, 8 Jun 2016 19:32:44 +0100 (BST) Received: from victor.home (host109-154-191-76.range109-154.btcentralplus.com [109.154.191.76]) by mx0.mattleach.net (Postfix) with ESMTPSA id AC20162253; Wed, 8 Jun 2016 19:31:25 +0100 (BST) From: Matthew Leach To: Krzysztof Kozlowski , Ben Dooks Subject: [RFC PATCH 13/15] memory: samsung: endian fixes for IO Date: Wed, 8 Jun 2016 19:31:08 +0100 Message-Id: <20160608183110.13851-14-matthew@mattleach.net> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160608183110.13851-1-matthew@mattleach.net> References: <20160608183110.13851-1-matthew@mattleach.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160608_113301_255885_82BAC023 X-CRM114-Status: UNSURE ( 9.79 ) 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: linux-samsung-soc@vger.kernel.org, Pankaj Dubey , Pavel Fedin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-kernel@lists.codethink.co.uk 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 From: Ben Dooks Use the relaxed versions of the IO accessors to avoid any issues if running in big endian. Signed-off-by: Ben Dooks Reviewed-by: Krzysztof Kozlowski --- Cc: Pavel Fedin Cc: Krzysztof Kozlowski Cc: Pankaj Dubey Cc: linux-arm-kernel@lists.codethink.co.uk --- drivers/memory/samsung/exynos-srom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/memory/samsung/exynos-srom.c b/drivers/memory/samsung/exynos-srom.c index 96756fb..ac8f79c 100644 --- a/drivers/memory/samsung/exynos-srom.c +++ b/drivers/memory/samsung/exynos-srom.c @@ -91,11 +91,11 @@ static int exynos_srom_configure_bank(struct exynos_srom *srom, if (width == 2) cs |= 1 << EXYNOS_SROM_BW__DATAWIDTH__SHIFT; - bw = __raw_readl(srom->reg_base + EXYNOS_SROM_BW); + bw = readl_relaxed(srom->reg_base + EXYNOS_SROM_BW); bw = (bw & ~(EXYNOS_SROM_BW__CS_MASK << bank)) | (cs << bank); - __raw_writel(bw, srom->reg_base + EXYNOS_SROM_BW); + writel_relaxed(bw, srom->reg_base + EXYNOS_SROM_BW); - __raw_writel(pmc | (timing[0] << EXYNOS_SROM_BCX__TACP__SHIFT) | + writel_relaxed(pmc | (timing[0] << EXYNOS_SROM_BCX__TACP__SHIFT) | (timing[1] << EXYNOS_SROM_BCX__TCAH__SHIFT) | (timing[2] << EXYNOS_SROM_BCX__TCOH__SHIFT) | (timing[3] << EXYNOS_SROM_BCX__TACC__SHIFT) |