Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3059101imm; Sun, 17 Jun 2018 10:05:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL67++tna9ooCqoksE4epCLr37Dv07WhooazB44Es8WaeYaTiDTTO4dJ7NnQrl+WabUYYcc X-Received: by 2002:a17:902:8d8b:: with SMTP id v11-v6mr10900121plo.20.1529255147321; Sun, 17 Jun 2018 10:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529255147; cv=none; d=google.com; s=arc-20160816; b=Ie2GLvB0VQFkCgi1Bs/DpZTNalfmldW+uZaYyj+F6hXu1FEWrvGheiNKkoXber9csu j6YjgnXdvBQOm+sW5cdBx2lXjUoQOEigb6yFuxFF8bnDMsfyw5166Jbe6E8cdrhBdB+F GLeO6ZBVpkPqutUd6DmzAXkX7EOlRk+a4S3hZZrhKbXg1BHd6ywLyPO/yk3mC2DCBr1v Oa1dDD6VbXsjMiwBHYmRM5au+EFxyX035So1fNBBhAalzy6A2l4NnylYMhJ0rd3x3drj g/CBpjmr3dk/Uo7wBycerxytZj4NFb5vWE/x75YI9TLj1Y2H6cprwvs3Dxib8v3R+EWl WX1A== 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=0+QVSR5oq/OSM8eQcU+PLHCmGFAVfbQJqb9NikDSVLcP/+fG77iNURmuzqIIejGgDZ PoDYSDTSbhlLTc/hMGfYkDQtnsuWfbxhTEgTKyy13u5w0k4QQaqUAED1ToeM/fpMpNhu NA13G8/dhum334FlEWJfstV4gaJ7/fYs98qkf72k0al07TZGl2HRHBedXwCrKe3qg7Xr 2gITOb4fZkd8CLtZVnrkBH66d4NYJj/ZYYdRgDynFgY1bH+RVrFjAVLMH2PRP2mBjqOX 8BtxYOtphqOlL0PnPujGmpTNoTgiKxt7XTON6b2WfHZdfZkZWIpY3Wplw8W9UYNCX0od RQyg== 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 y187-v6si10483039pgb.120.2018.06.17.10.05.33; Sun, 17 Jun 2018 10:05: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 S934471AbeFQRDR (ORCPT + 99 others); Sun, 17 Jun 2018 13:03:17 -0400 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:23745 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934495AbeFQRDF (ORCPT ); Sun, 17 Jun 2018 13:03:05 -0400 Received: from belgarion.home ([90.55.203.186]) by mwinf5d83 with ME id zt2e1x00N41oiFu03t32PN; Sun, 17 Jun 2018 19:03:04 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Sun, 17 Jun 2018 19:03:04 +0200 X-ME-IP: 90.55.203.186 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Bartlomiej Zolnierkiewicz , Tejun Heo , Vinod Koul , Mauro Carvalho Chehab , Ulf Hansson , Miquel Raynal , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Nicolas Pitre , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown 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 v3 04/14] mmc: pxamci: remove the dmaengine compat need Date: Sun, 17 Jun 2018 19:02:07 +0200 Message-Id: <20180617170217.24177-5-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180617170217.24177-1-robert.jarzmik@free.fr> References: <20180617170217.24177-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