Received: by 10.213.65.68 with SMTP id h4csp2431798imn; Mon, 2 Apr 2018 07:29:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZDKYK9VDnf0+QR7Idl5i2efwCijQtM5C0dtVQDIRD7rOYtrnqGhkncR5nHhtpprBjlBE2 X-Received: by 10.98.174.23 with SMTP id q23mr7595975pff.103.1522679363740; Mon, 02 Apr 2018 07:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522679363; cv=none; d=google.com; s=arc-20160816; b=QrB+cIHCLFaRMWYcJRtzDh1ZVwkvpC6L5jGbeOuNzhYziCLm+uR6eDpRG7w8jgoEaO B64UcFxe9nnCDjrDoZvfnvcjwTx89DhuKDSZDH3gA2irXm7uLqB0FENsMzSN6u2fmRof PjxgGcT0vJhbcSWRxI0waEvTDAviAPF3vWVmHZ0ZXioU3b5CLeggMZw+NZMh+NodNJFP SxcUb1zlYScdvLq6jHX7D1f2sSHop6AyIMIT9ugNF0mbYFa0tfuAC7j6TwkViMUmChWX cwkV8OiOXnaS/nFRVcI7r/ugL2yNUuRAiBhaxmrQc/oUCVbNiPiRVGox1Dv+iQkA6M0x q51A== 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=QSE4x+Mn0Rg6czmeVAG+5Q0deMIPQNl8KkJneAPnKTM=; b=keH3zV8/Y1Q7fCR30ZwKkBjpw8p0htn4sj49i9re9ErhTGiuLFK+UdnHRbDfUnYMAS Pc72C7F5Mlv+p+hEhTMWpAMxvIUv3sigbtQXVCw546FD8jMh/0bX07OeYUcb8fGVeuGJ CDWfeyJ3h/5PvNgHp1hfeWcd5oqJUUAPVp1Ua8SC24CpJcPLOTkpSMQ89pcsydDgmsLe 1AfxFwQTygqN93BQ9Jp+eWSnk7qc8I0TtFNnFNVP+ujPBqq6BVoPJmV3SYjCg1lzsV36 hsSi8saKUNeHdVvgdzXLxCqk0ZwAg26atxZCpvdOW9j7KqAbBWXOtM/jTUhcK7ME2W8t w5tA== 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 1-v6si421004plt.283.2018.04.02.07.29.09; Mon, 02 Apr 2018 07:29:23 -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 S1752454AbeDBO1k (ORCPT + 99 others); Mon, 2 Apr 2018 10:27:40 -0400 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:36846 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384AbeDBO1d (ORCPT ); Mon, 2 Apr 2018 10:27:33 -0400 Received: from belgarion.home ([86.201.130.131]) by mwinf5d63 with ME id VSSy1x00R2qEl8e03STWDr; Mon, 02 Apr 2018 16:27:32 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 02 Apr 2018 16:27:32 +0200 X-ME-IP: 86.201.130.131 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Bartlomiej Zolnierkiewicz , Tejun Heo , Vinod Koul , Mauro Carvalho Chehab , Ulf Hansson , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Nicolas Pitre , Samuel Ortiz , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Arnd Bergmann , Linus Walleij 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, devel@driverdev.osuosl.org, alsa-devel@alsa-project.org Subject: [PATCH 03/15] mmc: pxamci: remove the dmaengine compat need Date: Mon, 2 Apr 2018 16:26:44 +0200 Message-Id: <20180402142656.26815-4-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180402142656.26815-1-robert.jarzmik@free.fr> References: <20180402142656.26815-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 --- 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