From patchwork Thu Apr 10 12:21:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 28182 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7911B20671 for ; Thu, 10 Apr 2014 12:21:43 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf12162119yha.11 for ; Thu, 10 Apr 2014 05:21:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=n6SEwHIxV907Zux/5kHbnTGj6B/0KZk9amFND1NJU3M=; b=LeV/5GQeiwxQluXyavPAmNS4j0egyrZhffO+MEkO5OUQgAWAVp+csZw/Yj2513TacO YDw4mDxROk3W8p4H1B4zmpsksqAwktco9TRbx79vn9R2grZ2ag5SghEihv4V43hdNW0n Ak/VSOhsDE/auo5pTvbUZ4d++1DcaideFCAP82BncijCEPy1vYgYeHpA1eF1ULyDMdNz GZla9YFACXYSMHZOgXBP9iPZaWP9Gg/EF33LKS39zzfEm81t7V6XPFuyHvqPHe9Khxuu HeuXsv3vWUrhcmYWDjR/QEUhsr/eRfIDQJrplZiCU1Fc29EoIJi/Q3n5fVDP+ZCCP1f3 j67g== X-Gm-Message-State: ALoCoQkeXHbLRNTsRaAir3JUaHib0n/h4JrUluAtaNmIH5kC2afI1iWlN/XSvu8RCD5nsKahtBmV X-Received: by 10.236.109.169 with SMTP id s29mr7089173yhg.43.1397132503255; Thu, 10 Apr 2014 05:21:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.112 with SMTP id p103ls1177708qga.41.gmail; Thu, 10 Apr 2014 05:21:43 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr257492vdc.34.1397132503102; Thu, 10 Apr 2014 05:21:43 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id ya4si664943vec.1.2014.04.10.05.21.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 05:21:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so3253349veb.36 for ; Thu, 10 Apr 2014 05:21:43 -0700 (PDT) X-Received: by 10.58.211.69 with SMTP id na5mr77844vec.30.1397132503039; Thu, 10 Apr 2014 05:21:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp54599vcb; Thu, 10 Apr 2014 05:21:42 -0700 (PDT) X-Received: by 10.180.97.37 with SMTP id dx5mr14941905wib.53.1397132502140; Thu, 10 Apr 2014 05:21:42 -0700 (PDT) Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by mx.google.com with ESMTPS id ht5si1466452wjb.236.2014.04.10.05.21.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 05:21:42 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.169 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=74.125.82.169; Received: by mail-we0-f169.google.com with SMTP id w62so3912485wes.28 for ; Thu, 10 Apr 2014 05:21:41 -0700 (PDT) X-Received: by 10.194.80.7 with SMTP id n7mr15114032wjx.8.1397132501721; Thu, 10 Apr 2014 05:21:41 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ej7sm16437292wib.9.2014.04.10.05.21.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 05:21:41 -0700 (PDT) From: Ulf Hansson To: linux-arm-kernel@lists.infradead.org, Russell King , Linus Walleij Cc: devicetree@vger.kernel.org, Rob Herring , Ulf Hansson Subject: [PATCH V3 18/19] mmc: mmci: Enforce DMA configuration through DT Date: Thu, 10 Apr 2014 14:21:01 +0200 Message-Id: <1397132462-8005-19-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397132462-8005-1-git-send-email-ulf.hansson@linaro.org> References: <1397132462-8005-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Remove the option to provide DMA configuration as platform data, enforce it through DT. Signed-off-by: Ulf Hansson --- drivers/mmc/host/mmci.c | 24 +----------------------- include/linux/amba/mmci.h | 17 ----------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 9a87bad..04cff5e 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -366,7 +366,6 @@ static void mmci_init_sg(struct mmci_host *host, struct mmc_data *data) #ifdef CONFIG_DMA_ENGINE static void mmci_dma_setup(struct mmci_host *host) { - struct mmci_platform_data *plat = host->plat; const char *rxname, *txname; dma_cap_mask_t mask; @@ -380,25 +379,6 @@ static void mmci_dma_setup(struct mmci_host *host) dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); - if (plat && plat->dma_filter) { - if (!host->dma_rx_channel && plat->dma_rx_param) { - host->dma_rx_channel = dma_request_channel(mask, - plat->dma_filter, - plat->dma_rx_param); - /* E.g if no DMA hardware is present */ - if (!host->dma_rx_channel) - dev_err(mmc_dev(host->mmc), "no RX DMA channel\n"); - } - - if (!host->dma_tx_channel && plat->dma_tx_param) { - host->dma_tx_channel = dma_request_channel(mask, - plat->dma_filter, - plat->dma_tx_param); - if (!host->dma_tx_channel) - dev_warn(mmc_dev(host->mmc), "no TX DMA channel\n"); - } - } - /* * If only an RX channel is specified, the driver will * attempt to use it bidirectionally, however if it is @@ -446,11 +426,9 @@ static void mmci_dma_setup(struct mmci_host *host) */ static inline void mmci_dma_release(struct mmci_host *host) { - struct mmci_platform_data *plat = host->plat; - if (host->dma_rx_channel) dma_release_channel(host->dma_rx_channel); - if (host->dma_tx_channel && plat->dma_tx_param) + if (host->dma_tx_channel) dma_release_channel(host->dma_tx_channel); host->dma_rx_channel = host->dma_tx_channel = NULL; } diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index b992fc9..bf339ff 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h @@ -6,9 +6,6 @@ #include -/* Just some dummy forwarding */ -struct dma_chan; - /** * struct mmci_platform_data - platform configuration for the MMCI * (also known as PL180) block. @@ -29,17 +26,6 @@ struct dma_chan; * @gpio_wp: read this GPIO pin to see if the card is write protected * @gpio_cd: read this GPIO pin to detect card insertion * @cd_invert: true if the gpio_cd pin value is active low - * @dma_filter: function used to select an appropriate RX and TX - * DMA channel to be used for DMA, if and only if you're deploying the - * generic DMA engine - * @dma_rx_param: parameter passed to the DMA allocation - * filter in order to select an appropriate RX channel. If - * there is a bidirectional RX+TX channel, then just specify - * this and leave dma_tx_param set to NULL - * @dma_tx_param: parameter passed to the DMA allocation - * filter in order to select an appropriate TX channel. If this - * is NULL the driver will attempt to use the RX channel as a - * bidirectional channel */ struct mmci_platform_data { unsigned int f_max; @@ -49,9 +35,6 @@ struct mmci_platform_data { int gpio_wp; int gpio_cd; bool cd_invert; - bool (*dma_filter)(struct dma_chan *chan, void *filter_param); - void *dma_rx_param; - void *dma_tx_param; }; #endif