From patchwork Wed May 29 09:08:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10966531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE2F1112C for ; Wed, 29 May 2019 09:07:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEB691FE8B for ; Wed, 29 May 2019 09:07:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2D3D288C7; Wed, 29 May 2019 09:07:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 694F91FE8B for ; Wed, 29 May 2019 09:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pRdtEdYz6fHgdGk1VZgRLSQq93zQCCMv9cQbVSFOVRc=; b=seW1HXmd+3fOt/RBhL7/pGIQHL 1eYnuUj5+yQakqBNAa/kOx67ple7r8lGW8T4Z0I1XK9EJFO61+VIEa2goED4IQTeAlO9aN0mmfWGL 5HXi12uLO4WW6lVGWELr4g97iVoOj3S5S4pPNXGoR/C3P107sEr0VkturR5Arv8Y4wu+Bx2Lb5lhv vNdfewa+XcgAxZLnMTtx3P4E4LrkBaRz5/bwUobA8b4msD7wQlB9JK+8kIiTkRnFeExAREjX80P7b QtrHAvHKj8DZQ4Hm+YPE1dn6BOwLJ5JYenwjZSxwEQr14fLKJKbC/itR7zZmdT96xQlFUJSRW4rkM 9Y5buJ2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVuYK-0002ex-Jh; Wed, 29 May 2019 09:07:20 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVuYB-0002Ve-Ed for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2019 09:07:12 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4195A1A03CE; Wed, 29 May 2019 11:07:10 +0200 (CEST) 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 90DC51A11DD; Wed, 29 May 2019 11:07:04 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4E132402FA; Wed, 29 May 2019 17:06:57 +0800 (SGT) From: yibin.gong@nxp.com To: robh@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, mark.rutland@arm.com, vkoul@kernel.org, dan.j.williams@intel.com Subject: [PATCH v3 2/8] dmaengine: mcf-edma: update to 'dmamux_nr' Date: Wed, 29 May 2019 17:08:42 +0800 Message-Id: <20190529090848.34350-3-yibin.gong@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190529090848.34350-1-yibin.gong@nxp.com> References: <20190529090848.34350-1-yibin.gong@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190529_020711_621889_4536CA33 X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robin Gong Update to 'dmamux_nr' instead of static macro DMAMUX_NR since new version edma only has one dmamux. Signed-off-by: Robin Gong --- drivers/dma/fsl-edma-common.c | 2 +- drivers/dma/mcf-edma.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index 680b2a0..c9a17fc 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -84,7 +84,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan, void __iomem *muxaddr; unsigned int chans_per_mux, ch_off; - chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR; + chans_per_mux = fsl_chan->edma->n_chans / fsl_chan->edma->dmamux_nr; ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux; muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux]; slot = EDMAMUX_CHCFG_SOURCE(slot); diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c index 7de54b2f..4484190 100644 --- a/drivers/dma/mcf-edma.c +++ b/drivers/dma/mcf-edma.c @@ -189,6 +189,7 @@ static int mcf_edma_probe(struct platform_device *pdev) /* Set up version for ColdFire edma */ mcf_edma->version = v2; + mcf_edma->dmamux_nr = DMAMUX_NR; mcf_edma->big_endian = 1; if (!mcf_edma->n_chans) {