Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp270467imm; Tue, 16 Oct 2018 23:04:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV60NksYa4NBgro/oKV1Q/KEiseBSXn3RPpH2LNWfXQtShNNyehbLmztEpxr5ioVKfHCAtwNe X-Received: by 2002:a63:d52:: with SMTP id 18-v6mr23533634pgn.107.1539756272912; Tue, 16 Oct 2018 23:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539756272; cv=none; d=google.com; s=arc-20160816; b=nGChtONhKgpjAxFqanaPRgj1OrdahBK+/uIM/xmXOMNOYgD1gfvuFq3XuU7UY157qQ ppXybS/Lu6sLpzWkpnFPaL/WSgJQ4be18XIIT7Vo032MGcbi/sq6kcsPvf7sZrL7VJp2 5nt5MrV2Pr37bF38oOrTqofs583sFs9TVTYX20m9EpL9PMp7vrEKx+HsSjsaT3npzKgX +oCozCBsqolln+i0jsMNibZ124zWyEOM57a0P6xxkAnLFMybKYLGPL7PS6rUYq0awRV4 ZNPexNmfiXK8ZV7ESxORzEEfF8fMbgwHdgshyD0upqjwt3aizMhtL3CL9cBJ6NCLIs1K oIRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=/fyn5SDtT2JqP5+OHqDNZd+sGZnsVk83kNIUYwW65yY=; b=VCsy7UfF/C6e4HO8UV+fbqCLk6wdM6cfB9DYaD3TJUoouGTvYNH+EickWzYZh4Qrab KOgPQof5h9xrRm0TlUlGPo2/MUkpZ+53RzlZx0Cxoi0caZ6lFQhAzZrUmmiaEUvMWCek Xe9yZkD1DnXvq86myBN5ePfjh0wuLHc4YX7NbH/at1dc/cnoHYBbIjphAr5B8q7FGG+Y RHVqlwbrvqsJAAqyzGGA5bbEBDWx07xk/RTNFZB6cPWLfv2IfTZrEc4szVGAk1XJQakD mxWqkTQWmTeCCDN9EFzSPqwH54aqR0jTSfU26wnzkPH+ADAdrHhUEDvWFelcDEf/kAQf vzXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si12599718pll.131.2018.10.16.23.04.17; Tue, 16 Oct 2018 23:04:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727098AbeJQN54 (ORCPT + 99 others); Wed, 17 Oct 2018 09:57:56 -0400 Received: from inva021.nxp.com ([92.121.34.21]:46386 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726429AbeJQN54 (ORCPT ); Wed, 17 Oct 2018 09:57:56 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BEA6E2001C2; Wed, 17 Oct 2018 08:03:54 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6D2AD20019B; Wed, 17 Oct 2018 08:03:48 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7143D402AE; Wed, 17 Oct 2018 14:03:40 +0800 (SGT) From: Peng Ma To: vkoul@kernel.org Cc: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, leoyang.li@nxp.com, dan.j.williams@intel.com, zw@zh-kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Wen He , Peng Ma Subject: [v9 1/7] dmaengine: fsldma: Replace DMA_IN/OUT by FSL_DMA_IN/OUT Date: Wed, 17 Oct 2018 13:59:51 +0800 Message-Id: <20181017055957.542-1-peng.ma@nxp.com> X-Mailer: git-send-email 2.14.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wen He This patch implement a standard macro call functions is used to NXP dma drivers. Signed-off-by: Wen He Signed-off-by: Peng Ma --- change in v9: - no drivers/dma/fsldma.c | 16 ++++++++-------- drivers/dma/fsldma.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 1117b51..39871e0 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -53,42 +53,42 @@ static void set_sr(struct fsldma_chan *chan, u32 val) { - DMA_OUT(chan, &chan->regs->sr, val, 32); + FSL_DMA_OUT(chan, &chan->regs->sr, val, 32); } static u32 get_sr(struct fsldma_chan *chan) { - return DMA_IN(chan, &chan->regs->sr, 32); + return FSL_DMA_IN(chan, &chan->regs->sr, 32); } static void set_mr(struct fsldma_chan *chan, u32 val) { - DMA_OUT(chan, &chan->regs->mr, val, 32); + FSL_DMA_OUT(chan, &chan->regs->mr, val, 32); } static u32 get_mr(struct fsldma_chan *chan) { - return DMA_IN(chan, &chan->regs->mr, 32); + return FSL_DMA_IN(chan, &chan->regs->mr, 32); } static void set_cdar(struct fsldma_chan *chan, dma_addr_t addr) { - DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64); + FSL_DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64); } static dma_addr_t get_cdar(struct fsldma_chan *chan) { - return DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN; + return FSL_DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN; } static void set_bcr(struct fsldma_chan *chan, u32 val) { - DMA_OUT(chan, &chan->regs->bcr, val, 32); + FSL_DMA_OUT(chan, &chan->regs->bcr, val, 32); } static u32 get_bcr(struct fsldma_chan *chan) { - return DMA_IN(chan, &chan->regs->bcr, 32); + return FSL_DMA_IN(chan, &chan->regs->bcr, 32); } /* diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h index 4787d48..982845b 100644 --- a/drivers/dma/fsldma.h +++ b/drivers/dma/fsldma.h @@ -223,10 +223,10 @@ static void out_le64(u64 __iomem *addr, u64 val) } #endif -#define DMA_IN(fsl_chan, addr, width) \ +#define FSL_DMA_IN(fsl_chan, addr, width) \ (((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \ in_be##width(addr) : in_le##width(addr)) -#define DMA_OUT(fsl_chan, addr, val, width) \ +#define FSL_DMA_OUT(fsl_chan, addr, val, width) \ (((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \ out_be##width(addr, val) : out_le##width(addr, val)) -- 1.7.1