From patchwork Fri Mar 21 12:14:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 26824 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 64559203AB for ; Fri, 21 Mar 2014 12:15:20 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id bj1sf5631107pad.3 for ; Fri, 21 Mar 2014 05:15:19 -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=nFBsqgv126jSjnih+J1+UiTdbPZaw5pPI76GlfZ5EgU=; b=PGTWytmAGNbMyk6rJFdx4WUTnsubam0Srf7N3e0hS45iN/rIQlaFznG08cHJrNMziM e6XtZYjoshQPe+rTMlIxX68f6taTrsTGbqeIdBksgQkcRFY5QOhRwm5Fdug1t2l3akl0 1YS8KfowFIkuO9VM3GA5DTdajZVrsUEXaRnkxcU4Hun9ruWMpLv249AwCr1nb1xBPJu/ D90f2HEEXIkbFqnL0KqGciWxEvcjuYabdt/336qxB97F/pldR5YtFIDwavhQqm+hQW5r B4D4MHxHuMyiXLPfhimAzfmX0FA8AVZDrYQ9sTXgmyMPK25oTYOTGbwm14TvUjNiPQ5T 5bgw== X-Gm-Message-State: ALoCoQn5BBuZ5ugefYCpBDgKflf00eNSmWiATKfHE4A0KRdgItez/J4JktJIGEUFlgqQ4hd4f5MM X-Received: by 10.66.65.202 with SMTP id z10mr22079940pas.45.1395404119547; Fri, 21 Mar 2014 05:15:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.198 with SMTP id h64ls628880qgf.84.gmail; Fri, 21 Mar 2014 05:15:19 -0700 (PDT) X-Received: by 10.58.200.168 with SMTP id jt8mr7898530vec.30.1395404119397; Fri, 21 Mar 2014 05:15:19 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id la9si1079252veb.200.2014.03.21.05.15.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 05:15:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id cz12so2431482veb.2 for ; Fri, 21 Mar 2014 05:15:19 -0700 (PDT) X-Received: by 10.58.154.10 with SMTP id vk10mr37324619veb.18.1395404119326; Fri, 21 Mar 2014 05:15:19 -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.78.9 with SMTP id i9csp26013vck; Fri, 21 Mar 2014 05:15:18 -0700 (PDT) X-Received: by 10.112.142.68 with SMTP id ru4mr834608lbb.49.1395404117994; Fri, 21 Mar 2014 05:15:17 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by mx.google.com with ESMTPS id o5si3884041lae.245.2014.03.21.05.15.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 05:15:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.43 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id e16so1597013lan.16 for ; Fri, 21 Mar 2014 05:15:17 -0700 (PDT) X-Received: by 10.112.163.69 with SMTP id yg5mr12656564lbb.14.1395404117367; Fri, 21 Mar 2014 05:15:17 -0700 (PDT) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id tq9sm3255263lbb.10.2014.03.21.05.15.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 05:15:16 -0700 (PDT) From: Ulf Hansson To: linux-arm-kernel@lists.infradead.org, Russell King , Linus Walleij Cc: devicetree@vger.kernel.org, Ulf Hansson Subject: [PATCH 19/20] mmc: mmci: Enforce DMA configuration through DT Date: Fri, 21 Mar 2014 13:14:16 +0100 Message-Id: <1395404057-27835-20-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395404057-27835-1-git-send-email-ulf.hansson@linaro.org> References: <1395404057-27835-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.171 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 a7bda79..181445e 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -367,7 +367,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; @@ -381,25 +380,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 @@ -447,11 +427,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