Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4165450imd; Mon, 29 Oct 2018 19:40:54 -0700 (PDT) X-Google-Smtp-Source: AJdET5fp+hYofNg1+mHa9vUrbwt/4O15f4r+HUX352pWuiFM+Lxu/AoP2MfdO2iaFE6aqRr9I0ZI X-Received: by 2002:a63:4a08:: with SMTP id x8-v6mr150631pga.34.1540867254854; Mon, 29 Oct 2018 19:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540867254; cv=none; d=google.com; s=arc-20160816; b=0yfkqyyc4yWzoJxXcINoFEWiQ325Banv4wkkRgHwdRo7C7TrH92wGPkYtPM3RK8z4e F3eddGy9Rv9su79wXEamQqYiUM0bZh3ZiI/83JeXplvi6e6eU6GpeOtvNdqmzVQQ2JLh s3KG2sChdUyddspaYwgf4a6XH86vzy/8zDKub8eSPz3LwUVtQGiWTHZDO88AjbL4V4pj MKWhzeCkgZELV2mdiI8L2h+141IeLhH+LvvEibeQhq9EwXRHQt9zmqUbe5qc7LsQQlXc 1EJkjVBjRB+9rGTzK71qNBazNB5oJ7PtP2tW+A/Wwe3/gNTwfmzfQMbZRNK4WODLeFfV XdYA== 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=j1BPYVE1s37TpwrS+amrgTZ5caKyWzvYUu67eM74OPE=; b=kujfjfGz7E28mE9aKPuaI0qhEkVa3QxX9Lp6lwwVizgtU2WJaOBcc4xBoQk1Z9dM4b aorpBUadMcfmbyJab4hLKw+4fMZH18cvu7Y7sHZsG5+44yLXDqZI9xVLWvYT5BRa9Qqq DNZD2J9r6ylK0Q2JvikBW2PdahoFJExs50pYkAza9Kg+IjV/Dg6YvUnr6+SIvVZYFbSt PKXlZFm2eo7DWqhV95Y+c8wxtQVJ9Yk6XNKYPNhKD2csP3cxTdzYobeE/f+EUaGjmb+n ZC0ndW6iTFsu1qi+gFsJ0qQahVAOkktuBq5VFMDlaWx5S7QyhyCzkbEvPst8Fes8spJT B2FA== 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 u2-v6si21506879pgr.97.2018.10.29.19.40.37; Mon, 29 Oct 2018 19:40:54 -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 S1726040AbeJ3Lbt (ORCPT + 99 others); Tue, 30 Oct 2018 07:31:49 -0400 Received: from inva020.nxp.com ([92.121.34.13]:39076 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbeJ3Lbt (ORCPT ); Tue, 30 Oct 2018 07:31:49 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D91371A0059; Tue, 30 Oct 2018 03:40:15 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7052B1A0043; Tue, 30 Oct 2018 03:40:09 +0100 (CET) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2BC70402A4; Tue, 30 Oct 2018 10:40:01 +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: [v11 1/7] dmaengine: fsldma: Replace DMA_IN/OUT by FSL_DMA_IN/OUT Date: Tue, 30 Oct 2018 10:35:58 +0800 Message-Id: <20181030023604.34027-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 v11: - 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