Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1769531imm; Thu, 24 May 2018 00:10:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrQFSNVgM7T6Dkd0CtcuV+rcDamu/xzSeCwZJLvC7A1XoaQ2XbmpfO8NhtkHgXqLKQCg++S X-Received: by 2002:a17:902:7402:: with SMTP id g2-v6mr6288213pll.246.1527145847241; Thu, 24 May 2018 00:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527145847; cv=none; d=google.com; s=arc-20160816; b=fW5XZGx/TXv5avZQdHb/bwOBeR5z5Ps8a/cs2Dv2MZAiv6w2zoctT8jFr/i29sW1Zv FB34iS1tTvDE8GWSXX8K+DMOKmdc+Z8Rm9s/XLePZYsbv2TWaQgDp2OjBC3yoEJhPPFP 8eD+iaomk+NnCFzSwX69dkYHcI519SYNYByMQhdroMp82X/3ZvLGp3u2Ge5vw+es/Svf 7F7KM1I4B3p/aWL9tE7h2eWppJILEDZFxIrRy+2M6GlcN8A/vJw2GXff3lh6EkVlzli/ taOyi88nhRGDBWF3sT6f7bvlE83v3VBkOYN5y8yHJhXZ3XUzs6gDQ8HWJ5xkSBvZURnP nIRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=BNAbYslC7tNunHcB8gOomoyDERmVQr0BF1vM/llpKLs=; b=l0ZZcOnbic+VAXyRAOYyLjCBdaVueicCBkTNv/S0FVvtekw+b2yOMHOZv5ICYhmWhv VduQs8489pw00zI5CLEQl/t6XxbX/7J10jsqCMMNTB/iDaGc6yU5Rj+EC6pP0I4qbK1U RgiWoxIvibiB3qEsvUad0Odfx0+VWIdbL0x0y+kBmlXK8CnecoQftxWiM61kDPCsxvbV 1K4GKmfDrhh3XzHuht6AfjA03X495vWcEAFibWGkwpy9VYcRoioojBpA0QGx0UteuOX0 nuNITGaAwBEm5KhnBuSc12I6uwVHkNcakZXC+vGkByJ5fWXgmbnKjYxnakhrdzGB1TZ/ EU1A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z73-v6si148050pgd.122.2018.05.24.00.10.32; Thu, 24 May 2018 00:10:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965067AbeEXHJi (ORCPT + 99 others); Thu, 24 May 2018 03:09:38 -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 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377USf; Thu, 24 May 2018 09:07:29 +0200 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 Precedence: bulk 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