Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1965270imm; Thu, 11 Oct 2018 02:51:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Cn9Rkx8AyGMS8X8dDpaaBpSY+XIrN4kCVr+MOcdk1alLhugQ4WeOcZjWH7Is5IJXku9L6 X-Received: by 2002:a17:902:29e3:: with SMTP id h90-v6mr854058plb.215.1539251501220; Thu, 11 Oct 2018 02:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539251501; cv=none; d=google.com; s=arc-20160816; b=l3htseHDEjyMoOteRRCyuSOBvzoKUQlmZPc2NqDg7777WLS6FCMLR3hjxVQJo/8Ety TL95p5YeKrrMrA0Eo0l7Tdcd0l7bNZDHYAWptbjpqxpxT8xLDw2HFte2DaVQaJKCo7eJ cxnozL1gT+RfUWjoB0AK2Rr7mK5/rmlCYuJPEGuFsmekGiLJ8SC8LhRyCF3CQmJ+59Qv wv+DouMEeCoNVca1+vHr8yk4+0tEwiehO0sQ0K+wlleDvggXq8oGKmmzwLLMleOcVe7d d3tqvKVugBhLR6DLiDCUwMmq/qgp4wPpvg7JvR2SBUMo3s05HaHq4hgMMpcSjU3D9aeH 5Gsg== 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=X54YPbZEzohV3KZJ52ChRfG1iHI3UzbdHixOZt231Jo=; b=gDSBbii/ZMRhjagdy3ia3OVJ/FYhjb5AgMneh1GSsQSArOJmmrqDLo0l8BbMj8Ypsk W6XUOzm5PuJ/AuUgrMMU3Bbtuq2nGoiDbljV3QoLMcoAmeTcuyRzE+LKsJErcbRmhutB N6wKMHwm+3nHePgtKgDlgcQZNIwieBIsGPj3TqxGWUZ8ReAEqFkg8S0SoB9M3ZWDZjMF xkHLt9BodanCfakxkFEIHooFmMk2D9BuH0zD7z8aBdPBJ6u0Sp0J1t0Wdk+tfu7YGfEM F5hzj6pGW2WkDXjoae/h++8aagr5X+squVb/uArPUuxfRbQid0EXnRTru61cIJsytTtn a/PQ== 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 w18-v6si26257072ply.66.2018.10.11.02.51.26; Thu, 11 Oct 2018 02:51:41 -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 S1727749AbeJKRRS (ORCPT + 99 others); Thu, 11 Oct 2018 13:17:18 -0400 Received: from inva021.nxp.com ([92.121.34.21]:34268 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbeJKRRS (ORCPT ); Thu, 11 Oct 2018 13:17:18 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2C0E520017C; Thu, 11 Oct 2018 11:50:45 +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 5DED320002C; Thu, 11 Oct 2018 11:50:39 +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 6769B402EE; Thu, 11 Oct 2018 17:50:32 +0800 (SGT) From: Peng Ma To: vkoul@kernel.org, leoyang.li@nxp.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, 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 Subject: [PATCH 1/7] dmaengine: fsldma: Replace DMA_IN/OUT by FSL_DMA_IN/OUT Date: Thu, 11 Oct 2018 17:46:49 +0800 Message-Id: <20181011094655.45707-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 --- 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