From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965070AbeEXHJj (ORCPT ); Thu, 24 May 2018 03:09:39 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:29465 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755084AbeEXHHb (ORCPT ); Thu, 24 May 2018 03:07:31 -0400 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:29 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, dmaengine@vger.kernel.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH v2 03/13] mmc: pxamci: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:53 +0200 Message-Id: <20180524070703.11901-4-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the pxa architecture switched towards the dmaengine slave map, the old compatibility mechanism to acquire the dma requestor line number and priority are not needed anymore. This patch simplifies the dma resource acquisition, using the more generic function dma_request_slave_channel(). Signed-off-by: Robert Jarzmik Acked-by: Ulf Hansson --- drivers/mmc/host/pxamci.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index c763b404510f..6c94474e36f4 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -637,10 +636,8 @@ static int pxamci_probe(struct platform_device *pdev) { struct mmc_host *mmc; struct pxamci_host *host = NULL; - struct resource *r, *dmarx, *dmatx; - struct pxad_param param_rx, param_tx; + struct resource *r; int ret, irq, gpio_cd = -1, gpio_ro = -1, gpio_power = -1; - dma_cap_mask_t mask; ret = pxamci_of_init(pdev); if (ret) @@ -739,34 +736,14 @@ static int pxamci_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mmc); - if (!pdev->dev.of_node) { - dmarx = platform_get_resource(pdev, IORESOURCE_DMA, 0); - dmatx = platform_get_resource(pdev, IORESOURCE_DMA, 1); - if (!dmarx || !dmatx) { - ret = -ENXIO; - goto out; - } - param_rx.prio = PXAD_PRIO_LOWEST; - param_rx.drcmr = dmarx->start; - param_tx.prio = PXAD_PRIO_LOWEST; - param_tx.drcmr = dmatx->start; - } - - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - - host->dma_chan_rx = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m_rx, &pdev->dev, "rx"); + host->dma_chan_rx = dma_request_slave_channel(&pdev->dev, "rx"); if (host->dma_chan_rx == NULL) { dev_err(&pdev->dev, "unable to request rx dma channel\n"); ret = -ENODEV; goto out; } - host->dma_chan_tx = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m_tx, &pdev->dev, "tx"); + host->dma_chan_tx = dma_request_slave_channel(&pdev->dev, "tx"); if (host->dma_chan_tx == NULL) { dev_err(&pdev->dev, "unable to request tx dma channel\n"); ret = -ENODEV; -- 2.11.0