From patchwork Thu Mar 26 13:06:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 6099091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2DDBCBF90F for ; Thu, 26 Mar 2015 13:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C5D5203B7 for ; Thu, 26 Mar 2015 13:10:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68471203AC for ; Thu, 26 Mar 2015 13:10:46 +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 1Yb7WR-0002hp-Ov; Thu, 26 Mar 2015 13:08:31 +0000 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yb7Uw-0001tG-BT for linux-arm-kernel@lists.infradead.org; Thu, 26 Mar 2015 13:07:00 +0000 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id 2F73B460A79; Thu, 26 Mar 2015 13:06:36 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at ducie-dc1.codethink.co.uk Received: from ducie-dc1.codethink.co.uk ([127.0.0.1]) by localhost (ducie-dc1.codethink.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5odYTxCh7gOK; Thu, 26 Mar 2015 13:06:34 +0000 (GMT) Received: from rainbowdash.ducie.codethink.co.uk (rainbowdash.dyn.ducie.codethink.co.uk [10.24.2.193]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPS id 1139E4606BD; Thu, 26 Mar 2015 13:06:34 +0000 (GMT) Received: from ben by rainbowdash.ducie.codethink.co.uk with local (Exim 4.84) (envelope-from ) id 1Yb7UX-0000OU-Rw; Thu, 26 Mar 2015 13:06:33 +0000 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk Subject: [PATCH 1/3] dmaengine: at_hdmac: use endian agnostic IO accesors Date: Thu, 26 Mar 2015 13:06:29 +0000 Message-Id: <1427375191-1467-2-git-send-email-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427375191-1467-1-git-send-email-ben.dooks@codethink.co.uk> References: <1427375191-1467-1-git-send-email-ben.dooks@codethink.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150326_060658_626849_72738032 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: vinod.koul@intel.com, nicolas.ferre@atmel.com, Ben Dooks , dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the at_hdmac driver to use readl_relaxed and writel_relaxed to ensure it is properly taking into account the CPU versius the bus endian-ness. Signed-off-by: Ben Dooks --- CC: Nicolas Ferre CC: Dan Williams CC: Vinod Koul CC: linux-arm-kernel@lists.infradead.org CC: dmaengine@vger.kernel.org --- drivers/dma/at_hdmac_regs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h index d6bba6c..b4d0a54 100644 --- a/drivers/dma/at_hdmac_regs.h +++ b/drivers/dma/at_hdmac_regs.h @@ -264,10 +264,10 @@ struct at_dma_chan { }; #define channel_readl(atchan, name) \ - __raw_readl((atchan)->ch_regs + ATC_##name##_OFFSET) + readl_relaxed((atchan)->ch_regs + ATC_##name##_OFFSET) #define channel_writel(atchan, name, val) \ - __raw_writel((val), (atchan)->ch_regs + ATC_##name##_OFFSET) + writel_relaxed((val), (atchan)->ch_regs + ATC_##name##_OFFSET) static inline struct at_dma_chan *to_at_dma_chan(struct dma_chan *dchan) { @@ -332,9 +332,9 @@ struct at_dma { }; #define dma_readl(atdma, name) \ - __raw_readl((atdma)->regs + AT_DMA_##name) + readl_relaxed((atdma)->regs + AT_DMA_##name) #define dma_writel(atdma, name, val) \ - __raw_writel((val), (atdma)->regs + AT_DMA_##name) + writel_relaxed((val), (atdma)->regs + AT_DMA_##name) static inline struct at_dma *to_at_dma(struct dma_device *ddev) {