Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp563184ima; Fri, 26 Oct 2018 03:00:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5eZx+bqiC4wC6sHqDLYCy45QvxjTqJhcHur8XERYSqLlM/XPiVRX/FHMXbQPe4U1oqMJJnl X-Received: by 2002:a63:4904:: with SMTP id w4-v6mr2807226pga.303.1540548020784; Fri, 26 Oct 2018 03:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540548020; cv=none; d=google.com; s=arc-20160816; b=eX+5ztEz7/QiRmYL7h2+FwQQS+UpWMmQf+0QKupLZvlbvWySwBP4doG1f6PXPLKn8t bVW/XlIUFfZMWOmRjR3FH2HvcnVQBkL5cW/XpgO7ao/XrUZj6OWMonVCYmjUAfeX6XrQ QyadCs3qJ7EQ+5nS2mUYi8Ze5UYj9KC1b2cFaRXM9Qg3wamFI0DMLubiKsHLUvi1e/pc QXanqeb9OhbRPMH98fjm5CfsqvVbW7vwTSK2KBbfR9fS3VuExxJ0jkcrGsjgSzLm5onu AgTrqMnsJaJKyg7pPN3nk3ae7cc1jWU8E0lsEqCQB6KDy31X6v3nPO7P8vyUW8TpABQv 4QGQ== 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=Rv/UUCT2btQ48mSYrNgJdAe1DzVO7hep/OeD/BebhQ8=; b=kUKMiMseYlt6TzIh60H+zH3xqUS/EAHRihahjolXw7pn0yR5UtJD3J7GuV2F27bOW7 GIYoSUarQKTGeRRyr1lAmEe+d4Qqf/V0BB/cVGfIsOw9gfZlb6Rt1kDGthcu3xuoMasi 9ClEmxe3hvvgVqE7Ljm7xJ1EyA/UOB72B1E7qp2smV94qv0eJEZLSSw2hV9gwYz0wSgh jN3KzD/JOUJZV6lMIBpYAZbl68WHHWY7TcqV32xKF65xLMYQ7Oe2q4A5Bzol+V/ru2XK UwD9ywb39UqfuY6BYbXC19OzkfMQJdT/rpZB79Fruo6bhfGmCToMNaQ4ASXYj3n2XGrB yAUQ== 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 b2-v6si9807753plr.431.2018.10.26.03.00.04; Fri, 26 Oct 2018 03:00:20 -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 S1726815AbeJZSdP (ORCPT + 99 others); Fri, 26 Oct 2018 14:33:15 -0400 Received: from inva021.nxp.com ([92.121.34.21]:35546 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbeJZSdP (ORCPT ); Fri, 26 Oct 2018 14:33:15 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A238D200172; Fri, 26 Oct 2018 11:56:47 +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 F0B82200075; Fri, 26 Oct 2018 11:56:40 +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 0E2C04028B; Fri, 26 Oct 2018 17:56:32 +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: [PATCH 1/7] dmaengine: fsldma: Replace DMA_IN/OUT by FSL_DMA_IN/OUT Date: Fri, 26 Oct 2018 17:52:34 +0800 Message-Id: <20181026095240.33668-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 v10: - 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