From patchwork Wed Oct 26 16:30:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9397649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 068AB60231 for ; Wed, 26 Oct 2016 16:31:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10549292AE for ; Wed, 26 Oct 2016 16:31:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04A4E29C59; Wed, 26 Oct 2016 16:31:23 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB92A292AE for ; Wed, 26 Oct 2016 16:31:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753639AbcJZQbS (ORCPT ); Wed, 26 Oct 2016 12:31:18 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:53702 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbcJZQbR (ORCPT ); Wed, 26 Oct 2016 12:31:17 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OFN029SWXW2QBD0@mailout3.samsung.com>; Thu, 27 Oct 2016 01:31:14 +0900 (KST) X-AuditID: cbfee61b-f793d6d000005a2a-5d-5810da52a149 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id EC.75.23082.25AD0185; Thu, 27 Oct 2016 01:31:14 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OFN007OEXVJL940@mmp2.samsung.com>; Thu, 27 Oct 2016 01:31:14 +0900 (KST) From: Sylwester Nawrocki To: ulf.hansson@linaro.org, linux-samsung-soc@vger.kernel.org Cc: sam.van.den.berge@telenet.be, arnd@arndb.de, linux-mmc@vger.kernel.org, b.zolnierkie@samsung.com, Sylwester Nawrocki Subject: [PATCH v2] mmc: s3cmci: Use DMA slave map rather than exported DMA filter Date: Wed, 26 Oct 2016 18:30:53 +0200 Message-id: <1477499453-22549-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsVy+t9jQd2gWwIRBr/mcVr8nXSM3WLjjPWs Fkf+9zNazDi/j8ni8Jt2VovVK9YzWxxfG+7A7vH71yRGjzvX9rB59G1Zxeix88d1No/Pm+QC WKPcbDJSE1NSixRS85LzUzLz0m2VQkPcdC2UFPISc1NtlSJ0fUOClBTKEnNKgTwjAzTg4Bzg Hqykb5fglnG0YzlzwRPeiubVp9gbGLdydzFyckgImEh8XtDIDGGLSVy4t56ti5GLQ0hgFqNE 3+NTUM4vRonOCw2sIFVsAoYSvUf7GEFsEQFbiXPvHrKDFDELTGaUuD79DdAoDg5hgRCJebcD QWpYBFQlPm0/yQ5i8wq4SfzqecAKsU1O4uSxyawTGLkXMDKsYpRILUguKE5KzzXKSy3XK07M LS7NS9dLzs/dxAgO0WfSOxgP73I/xCjAwajEw2uwSSBCiDWxrLgy9xCjBAezkgiv3Q2gEG9K YmVValF+fFFpTmrxIUZToAMmMkuJJucD4yevJN7QxNzE3NjAwtzS0sRISZy3cfazcCGB9MSS 1OzU1ILUIpg+Jg5OqQZGuw8fHpg8uHbh2x7u7QsfpBbwpZ2vmealdHfX451HTX63Z8xe/vVr QsTRjSWbk74wX/qaYTIlYou20Z7/rH8KmWQbL72JfCnFrPYsezvTor9HjpdMluF2LHt/pnNf 88HTIR+dtic3l1m/tb/f5zNXSUEv5qP94hVXbKQmn/jHsm1nc+dNlhMa1kosxRmJhlrMRcWJ AON/9AVnAgAA X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support for DMA slave map has been added to the s3c24xx-dma controller in commit 34681d84a0f7cc22ded1413dc79eef8a2f23d9c3 "dmaengine: s3c24xx: Add dma_slave_map for s3c2440 devices" This patch converts the s3cmci driver to also use it, so we can eventually get rid of the exported filter function once all related DMA clients are updated. Signed-off-by: Sylwester Nawrocki Reviewed-by: Arnd Bergmann --- Changes since v1: - dma_request_chan() used instead of dma_request_slave_channel() for better error handling. drivers/mmc/host/s3cmci.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index c531dee..932a4b1 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -28,7 +28,6 @@ #include #include -#include #include #include "s3cmci.h" @@ -1682,19 +1681,13 @@ static int s3cmci_probe(struct platform_device *pdev) gpio_direction_input(host->pdata->gpio_wprotect); } - /* depending on the dma state, get a dma channel to use. */ + /* Depending on the dma state, get a DMA channel to use. */ if (s3cmci_host_usedma(host)) { - dma_cap_mask_t mask; - - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - - host->dma = dma_request_slave_channel_compat(mask, - s3c24xx_dma_filter, (void *)DMACH_SDI, &pdev->dev, "rx-tx"); - if (!host->dma) { + host->dma = dma_request_chan(&pdev->dev, "rx-tx"); + ret = PTR_ERR_OR_ZERO(host->dma); + if (ret) { dev_err(&pdev->dev, "cannot get DMA channel.\n"); - ret = -EBUSY; goto probe_free_gpio_wp; } }