From patchwork Thu Mar 26 18:02:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 6101281 Return-Path: X-Original-To: patchwork-dmaengine@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 97410BF90F for ; Thu, 26 Mar 2015 18:02:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AACE320425 for ; Thu, 26 Mar 2015 18:02:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52FF72035D for ; Thu, 26 Mar 2015 18:02:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbbCZSCP (ORCPT ); Thu, 26 Mar 2015 14:02:15 -0400 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]:44773 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbbCZSCO (ORCPT ); Thu, 26 Mar 2015 14:02:14 -0400 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id 0514B460793; Thu, 26 Mar 2015 18:02:13 +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 pnwvPMiDbOi1; Thu, 26 Mar 2015 18:02:11 +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 65A84460458; Thu, 26 Mar 2015 18:02:11 +0000 (GMT) Received: from ben by rainbowdash.ducie.codethink.co.uk with local (Exim 4.84) (envelope-from ) id 1YbC6d-0002lE-72; Thu, 26 Mar 2015 18:02:11 +0000 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk Cc: Ben Dooks , Russell King , Nicolas Ferre , Dan Williams , Vinod Koul , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org Subject: [PATCH] dma: at_hdmac: use __le32 for dma addresses Date: Thu, 26 Mar 2015 18:02:09 +0000 Message-Id: <1427392929-10578-1-git-send-email-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.1.4 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The at_dmac uses a lli structure with a mix of dma_addr_t and __le32 in it. As Russell King pointed out, dma_addr_t could be a non 32-bit size depending on the kernel configuration. Change all references of this to __le32 to better match the hardware representation. Note, this does nothing to fix the discussion of dma vs physical addresses also brought up during these discussions. This patch depends on the __le32 descriptor updates posted previously. Signed-off-by: Ben Dooks --- CC: Russell King 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h index bd4d174..b246beb 100644 --- a/drivers/dma/at_hdmac_regs.h +++ b/drivers/dma/at_hdmac_regs.h @@ -167,13 +167,13 @@ /* LLI == Linked List Item; aka DMA buffer descriptor */ struct at_lli { /* values that are not changed by hardware */ - dma_addr_t saddr; - dma_addr_t daddr; + __le32 saddr; + __le32 daddr; /* value that may get written back: */ __le32 ctrla; /* more values that are not changed by hardware */ __le32 ctrlb; - dma_addr_t dscr; /* chain to next lli */ + __le32 dscr; /* chain to next lli */ }; /**