From patchwork Thu May 24 07:06:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mLMJyU+9"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0qL2720z9s2S for ; Thu, 24 May 2018 17:09:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nvsVEUpVtSy31DaBxxUBGtV00NBI5ul3hSpelMY8eP0=; b=mLMJyU+9p2H3oOEy/9uieQJMvt Ekho5V6tIAdksOPkfG//zBcBAqysFRoLQ6dZqY6MzIAnGABBf+uB111pLwlRQ4AVkT/cUnf2+a4z2 /Wg5jmb4ckVY75FjkS8MFIdnrW4a+lT5RHtfprIR3RwtxVkZ9f+n62icilrZmFTPk4Ldn40Y2Ip/n HTaPP5mUFBb6AHFfH64F/Etz3B1KuFB/b3EOjlFzYHX6o9/GOENjAdSN7tmt9yJnlJDAsX62HmkQ6 NYsl0xoD7dZisKKhV0cNmYAif7oF42bu2C+FOKEgqY9c3bEOKG0nV01aPWF/ulN/22m3RHrDTmHJF QSk3eGNQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkMn-0003X3-H1; Thu, 24 May 2018 07:08:53 +0000 Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLZ-0002o5-QT for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:50 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377RRL; Thu, 24 May 2018 09:07:26 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:26 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 01/13] dmaengine: pxa: use a dma slave map Date: Thu, 24 May 2018 09:06:51 +0200 Message-Id: <20180524070703.11901-2-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_000738_222275_A2F7CD90 X-CRM114-Status: GOOD ( 20.12 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org In order to remove the specific knowledge of the dma mapping from PXA drivers, add a default slave map for pxa architectures. This won't impact MMP architecture, but is aimed only at all PXA boards. This is the first step, and once all drivers are converted, pxad_filter_fn() will be made static, and the DMA resources removed from device.c. Signed-off-by: Robert Jarzmik Reported-by: Arnd Bergmann Acked-by: Vinod Koul --- drivers/dma/pxa_dma.c | 10 +++++++++- include/linux/platform_data/mmp_dma.h | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index b53fb618bbf6..9505334f9c6e 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -179,6 +179,8 @@ static unsigned int pxad_drcmr(unsigned int line) return 0x1000 + line * 4; } +bool pxad_filter_fn(struct dma_chan *chan, void *param); + /* * Debug fs */ @@ -1396,9 +1398,10 @@ static int pxad_probe(struct platform_device *op) { struct pxad_device *pdev; const struct of_device_id *of_id; + const struct dma_slave_map *slave_map = NULL; struct mmp_dma_platdata *pdata = dev_get_platdata(&op->dev); struct resource *iores; - int ret, dma_channels = 0, nb_requestors = 0; + int ret, dma_channels = 0, nb_requestors = 0, slave_map_cnt = 0; const enum dma_slave_buswidth widths = DMA_SLAVE_BUSWIDTH_1_BYTE | DMA_SLAVE_BUSWIDTH_2_BYTES | DMA_SLAVE_BUSWIDTH_4_BYTES; @@ -1429,6 +1432,8 @@ static int pxad_probe(struct platform_device *op) } else if (pdata && pdata->dma_channels) { dma_channels = pdata->dma_channels; nb_requestors = pdata->nb_requestors; + slave_map = pdata->slave_map; + slave_map_cnt = pdata->slave_map_cnt; } else { dma_channels = 32; /* default 32 channel */ } @@ -1440,6 +1445,9 @@ static int pxad_probe(struct platform_device *op) pdev->slave.device_prep_dma_memcpy = pxad_prep_memcpy; pdev->slave.device_prep_slave_sg = pxad_prep_slave_sg; pdev->slave.device_prep_dma_cyclic = pxad_prep_dma_cyclic; + pdev->slave.filter.map = slave_map; + pdev->slave.filter.mapcnt = slave_map_cnt; + pdev->slave.filter.fn = pxad_filter_fn; pdev->slave.copy_align = PDMA_ALIGNMENT; pdev->slave.src_addr_widths = widths; diff --git a/include/linux/platform_data/mmp_dma.h b/include/linux/platform_data/mmp_dma.h index d1397c8ed94e..6397b9c8149a 100644 --- a/include/linux/platform_data/mmp_dma.h +++ b/include/linux/platform_data/mmp_dma.h @@ -12,9 +12,13 @@ #ifndef MMP_DMA_H #define MMP_DMA_H +struct dma_slave_map; + struct mmp_dma_platdata { int dma_channels; int nb_requestors; + int slave_map_cnt; + const struct dma_slave_map *slave_map; }; #endif /* MMP_DMA_H */ From patchwork Thu May 24 07:06:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Klwn8dHA"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0z8587tz9s0x for ; Thu, 24 May 2018 17:15:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=PW/KedllKrRus6mlSzmOkDI5h/EFuoNAMxSKuPlvZL0=; b=Klwn8dHAtPlPR18FHAGS2GwbB6 WGWnRRhr1hCPb09Gu9+n8blo43UL1cH9+KCRXMZFNMjjLqkzecAnvUCbn6K4O1O52FQW7oaxoB5I6 w7KrhatugRhHjPTRum/TuCOME4Dx2PTqGkKdlC9FARKnzfSUc/SQKX0hsF0qgZzPUGCo2DwNnl39P QRDFsw9PZWl4XI/hGVE2Xh/SsfYVLcXxG6MzqqM78wcUn8BpKy/GBk7BQQrzGvy0x1D2CuU/SEEoq 6WQd1e+e3CJYW6JecJvIAnimLCSAUvE61P3J3/m66sb6U7Vsp7wRv1r7xMCPLqA8TtIJ8b4CexWt6 P7Mp/H1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkTK-0001DM-DQ; Thu, 24 May 2018 07:15:38 +0000 Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLZ-0002oA-Pw for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:08:13 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377TRy; Thu, 24 May 2018 09:07:28 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:28 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 02/13] ARM: pxa: add dma slave map Date: Thu, 24 May 2018 09:06:52 +0200 Message-Id: <20180524070703.11901-3-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_000738_387474_BDC9805B X-CRM114-Status: GOOD ( 22.86 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org In order to remove the specific knowledge of the dma mapping from PXA drivers, add a default slave map for pxa architectures. This is the first step, and once all drivers are converted, pxad_filter_fn() will be made static, and the DMA resources removed from device.c. Signed-off-by: Robert Jarzmik Reported-by: Arnd Bergmann --- Since v1: revamped the SSP part, split into pxa25.c, pxa27x.c and pxa3xx.c, and add pxa-i2s. --- arch/arm/mach-pxa/devices.c | 12 +++--------- arch/arm/mach-pxa/devices.h | 6 +++++- arch/arm/mach-pxa/pxa25x.c | 41 ++++++++++++++++++++++++++++++++++++++++- arch/arm/mach-pxa/pxa27x.c | 42 +++++++++++++++++++++++++++++++++++++++++- arch/arm/mach-pxa/pxa3xx.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 132 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index d7c9a8476d57..1e8915fc340d 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -1202,11 +1203,6 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info) platform_device_add(pd); } -static struct mmp_dma_platdata pxa_dma_pdata = { - .dma_channels = 0, - .nb_requestors = 0, -}; - static struct resource pxa_dma_resource[] = { [0] = { .start = 0x40000000, @@ -1233,9 +1229,7 @@ static struct platform_device pxa2xx_pxa_dma = { .resource = pxa_dma_resource, }; -void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors) +void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata) { - pxa_dma_pdata.dma_channels = nb_channels; - pxa_dma_pdata.nb_requestors = nb_requestors; - pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata); + pxa_register_device(&pxa2xx_pxa_dma, dma_pdata); } diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index 11263f7c455b..498b07bc6a3e 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h @@ -1,4 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#define PDMA_FILTER_PARAM(_prio, _requestor) (&(struct pxad_param) { \ + .prio = PXAD_PRIO_##_prio, .drcmr = _requestor }) +struct mmp_dma_platdata; + extern struct platform_device pxa_device_pmu; extern struct platform_device pxa_device_mci; extern struct platform_device pxa3xx_device_mci2; @@ -55,7 +59,7 @@ extern struct platform_device pxa3xx_device_gpio; extern struct platform_device pxa93x_device_gpio; void __init pxa_register_device(struct platform_device *dev, void *data); -void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors); +void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata); struct i2c_pxa_platform_data; extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index ba431fad5c47..2d61de41a9d5 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -16,6 +16,8 @@ * initialization stuff for PXA machines which can be overridden later if * need be. */ +#include +#include #include #include #include @@ -26,6 +28,7 @@ #include #include #include +#include #include #include @@ -201,6 +204,42 @@ static struct platform_device *pxa25x_devices[] __initdata = { &pxa_device_asoc_platform, }; +static const struct dma_slave_map pxa25x_slave_map[] = { + /* PXA25x, PXA27x and PXA3xx common entries */ + { "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) }, + { "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) }, + { "pxa2xx-ac97", "pcm_pcm_aux_mono_out", + PDMA_FILTER_PARAM(LOWEST, 10) }, + { "pxa2xx-ac97", "pcm_pcm_stereo_in", PDMA_FILTER_PARAM(LOWEST, 11) }, + { "pxa2xx-ac97", "pcm_pcm_stereo_out", PDMA_FILTER_PARAM(LOWEST, 12) }, + { "pxa-ssp-dai.1", "rx", PDMA_FILTER_PARAM(LOWEST, 13) }, + { "pxa-ssp-dai.1", "tx", PDMA_FILTER_PARAM(LOWEST, 14) }, + { "pxa-ssp-dai.2", "rx", PDMA_FILTER_PARAM(LOWEST, 15) }, + { "pxa-ssp-dai.2", "tx", PDMA_FILTER_PARAM(LOWEST, 16) }, + { "pxa2xx-ir", "rx", PDMA_FILTER_PARAM(LOWEST, 17) }, + { "pxa2xx-ir", "tx", PDMA_FILTER_PARAM(LOWEST, 18) }, + { "pxa2xx-mci.0", "rx", PDMA_FILTER_PARAM(LOWEST, 21) }, + { "pxa2xx-mci.0", "tx", PDMA_FILTER_PARAM(LOWEST, 22) }, + { "smc911x.0", "rx", PDMA_FILTER_PARAM(LOWEST, -1) }, + { "smc911x.0", "tx", PDMA_FILTER_PARAM(LOWEST, -1) }, + { "smc91x.0", "data", PDMA_FILTER_PARAM(LOWEST, -1) }, + + /* PXA25x specific map */ + { "pxa25x-ssp.0", "rx", PDMA_FILTER_PARAM(LOWEST, 13) }, + { "pxa25x-ssp.0", "tx", PDMA_FILTER_PARAM(LOWEST, 14) }, + { "pxa25x-nssp.1", "rx", PDMA_FILTER_PARAM(LOWEST, 15) }, + { "pxa25x-nssp.1", "tx", PDMA_FILTER_PARAM(LOWEST, 16) }, + { "pxa25x-nssp.2", "rx", PDMA_FILTER_PARAM(LOWEST, 23) }, + { "pxa25x-nssp.2", "tx", PDMA_FILTER_PARAM(LOWEST, 24) }, +}; + +static struct mmp_dma_platdata pxa25x_dma_pdata = { + .dma_channels = 16, + .nb_requestors = 40, + .slave_map = pxa25x_slave_map, + .slave_map_cnt = ARRAY_SIZE(pxa25x_slave_map), +}; + static int __init pxa25x_init(void) { int ret = 0; @@ -215,7 +254,7 @@ static int __init pxa25x_init(void) register_syscore_ops(&pxa2xx_mfp_syscore_ops); if (!of_have_populated_dt()) { - pxa2xx_set_dmac_info(16, 40); + pxa2xx_set_dmac_info(&pxa25x_dma_pdata); pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); ret = platform_add_devices(pxa25x_devices, ARRAY_SIZE(pxa25x_devices)); diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 0c06f383ad52..b44e3c4f3013 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -11,6 +11,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include +#include #include #include #include @@ -23,6 +25,7 @@ #include #include #include +#include #include #include @@ -297,6 +300,43 @@ static struct platform_device *devices[] __initdata = { &pxa27x_device_pwm1, }; +static const struct dma_slave_map pxa27x_slave_map[] = { + /* PXA25x, PXA27x and PXA3xx common entries */ + { "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) }, + { "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) }, + { "pxa2xx-ac97", "pcm_pcm_aux_mono_out", + PDMA_FILTER_PARAM(LOWEST, 10) }, + { "pxa2xx-ac97", "pcm_pcm_stereo_in", PDMA_FILTER_PARAM(LOWEST, 11) }, + { "pxa2xx-ac97", "pcm_pcm_stereo_out", PDMA_FILTER_PARAM(LOWEST, 12) }, + { "pxa-ssp-dai.0", "rx", PDMA_FILTER_PARAM(LOWEST, 13) }, + { "pxa-ssp-dai.0", "tx", PDMA_FILTER_PARAM(LOWEST, 14) }, + { "pxa-ssp-dai.1", "rx", PDMA_FILTER_PARAM(LOWEST, 15) }, + { "pxa-ssp-dai.1", "tx", PDMA_FILTER_PARAM(LOWEST, 16) }, + { "pxa2xx-ir", "rx", PDMA_FILTER_PARAM(LOWEST, 17) }, + { "pxa2xx-ir", "tx", PDMA_FILTER_PARAM(LOWEST, 18) }, + { "pxa2xx-mci.0", "rx", PDMA_FILTER_PARAM(LOWEST, 21) }, + { "pxa2xx-mci.0", "tx", PDMA_FILTER_PARAM(LOWEST, 22) }, + { "pxa-ssp-dai.2", "rx", PDMA_FILTER_PARAM(LOWEST, 66) }, + { "pxa-ssp-dai.2", "tx", PDMA_FILTER_PARAM(LOWEST, 67) }, + { "smc911x.0", "rx", PDMA_FILTER_PARAM(LOWEST, -1) }, + { "smc911x.0", "tx", PDMA_FILTER_PARAM(LOWEST, -1) }, + { "smc91x.0", "data", PDMA_FILTER_PARAM(LOWEST, -1) }, + + /* PXA27x specific map */ + { "pxa2xx-i2s", "rx", PDMA_FILTER_PARAM(LOWEST, 2) }, + { "pxa2xx-i2s", "tx", PDMA_FILTER_PARAM(LOWEST, 3) }, + { "pxa27x-camera.0", "CI_Y", PDMA_FILTER_PARAM(HIGHEST, 68) }, + { "pxa27x-camera.0", "CI_U", PDMA_FILTER_PARAM(HIGHEST, 69) }, + { "pxa27x-camera.0", "CI_V", PDMA_FILTER_PARAM(HIGHEST, 70) }, +}; + +static struct mmp_dma_platdata pxa27x_dma_pdata = { + .dma_channels = 32, + .nb_requestors = 75, + .slave_map = pxa27x_slave_map, + .slave_map_cnt = ARRAY_SIZE(pxa27x_slave_map), +}; + static int __init pxa27x_init(void) { int ret = 0; @@ -313,7 +353,7 @@ static int __init pxa27x_init(void) if (!of_have_populated_dt()) { pxa_register_device(&pxa27x_device_gpio, &pxa27x_gpio_info); - pxa2xx_set_dmac_info(32, 75); + pxa2xx_set_dmac_info(&pxa27x_dma_pdata); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); } diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 4b8a0df8ea57..b5ca4be093ec 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -12,6 +12,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include +#include #include #include #include @@ -24,6 +26,7 @@ #include #include #include +#include #include #include @@ -421,6 +424,45 @@ static struct platform_device *devices[] __initdata = { &pxa27x_device_pwm1, }; +static const struct dma_slave_map pxa3xx_slave_map[] = { + /* PXA25x, PXA27x and PXA3xx common entries */ + { "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) }, + { "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) }, + { "pxa2xx-ac97", "pcm_pcm_aux_mono_out", + PDMA_FILTER_PARAM(LOWEST, 10) }, + { "pxa2xx-ac97", "pcm_pcm_stereo_in", PDMA_FILTER_PARAM(LOWEST, 11) }, + { "pxa2xx-ac97", "pcm_pcm_stereo_out", PDMA_FILTER_PARAM(LOWEST, 12) }, + { "pxa-ssp-dai.0", "rx", PDMA_FILTER_PARAM(LOWEST, 13) }, + { "pxa-ssp-dai.0", "tx", PDMA_FILTER_PARAM(LOWEST, 14) }, + { "pxa-ssp-dai.1", "rx", PDMA_FILTER_PARAM(LOWEST, 15) }, + { "pxa-ssp-dai.1", "tx", PDMA_FILTER_PARAM(LOWEST, 16) }, + { "pxa2xx-ir", "rx", PDMA_FILTER_PARAM(LOWEST, 17) }, + { "pxa2xx-ir", "tx", PDMA_FILTER_PARAM(LOWEST, 18) }, + { "pxa2xx-mci.0", "rx", PDMA_FILTER_PARAM(LOWEST, 21) }, + { "pxa2xx-mci.0", "tx", PDMA_FILTER_PARAM(LOWEST, 22) }, + { "pxa-ssp-dai.2", "rx", PDMA_FILTER_PARAM(LOWEST, 66) }, + { "pxa-ssp-dai.2", "tx", PDMA_FILTER_PARAM(LOWEST, 67) }, + { "smc911x.0", "rx", PDMA_FILTER_PARAM(LOWEST, -1) }, + { "smc911x.0", "tx", PDMA_FILTER_PARAM(LOWEST, -1) }, + { "smc91x.0", "data", PDMA_FILTER_PARAM(LOWEST, -1) }, + + /* PXA3xx specific map */ + { "pxa-ssp-dai.3", "rx", PDMA_FILTER_PARAM(LOWEST, 2) }, + { "pxa-ssp-dai.3", "tx", PDMA_FILTER_PARAM(LOWEST, 3) }, + { "pxa2xx-mci.1", "rx", PDMA_FILTER_PARAM(LOWEST, 93) }, + { "pxa2xx-mci.1", "tx", PDMA_FILTER_PARAM(LOWEST, 94) }, + { "pxa3xx-nand", "data", PDMA_FILTER_PARAM(LOWEST, 97) }, + { "pxa2xx-mci.2", "rx", PDMA_FILTER_PARAM(LOWEST, 100) }, + { "pxa2xx-mci.2", "tx", PDMA_FILTER_PARAM(LOWEST, 101) }, +}; + +static struct mmp_dma_platdata pxa3xx_dma_pdata = { + .dma_channels = 32, + .nb_requestors = 100, + .slave_map = pxa3xx_slave_map, + .slave_map_cnt = ARRAY_SIZE(pxa3xx_slave_map), +}; + static int __init pxa3xx_init(void) { int ret = 0; @@ -452,7 +494,7 @@ static int __init pxa3xx_init(void) if (of_have_populated_dt()) return 0; - pxa2xx_set_dmac_info(32, 100); + pxa2xx_set_dmac_info(&pxa3xx_dma_pdata); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret) return ret; From patchwork Thu May 24 07:06:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Kct9qc0V"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0xy3bLZz9s0x for ; Thu, 24 May 2018 17:14:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tCC/Ak2rTCXn4ENwzkzlH1WPGWFr6J+3SaVJUs5dhpU=; b=Kct9qc0VG+83UxLE9F/4Iz7i7j K0u0VYqRRFkhUh4jwrqo6L6jlLTZywGTdMPB7w609BznIegsLsm4ZqUhWol6/LgqB/2wQY8tlIyZ9 GHliRXci833PpaeF7C53aV2yE2/HOj2lmgzYrJvWP1wxB4v0mFkJEZ+WlTruKCmbtiihTB1U/y5n/ Ptt1eTLexpIPuDOStr9lTh3PDIdDHn3qs58bKjESPSsauDUxfo1vpWrpF5MEuc3+vbgkSuXX3nQVj 81j2G5a6UlKvbDmpfbivdcZ9qSFfM+sbwnCkLKu5eniXdYL+Uv7BZ2vHY8lbh+28HI7MISZnORI/j a8hH3t8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkSK-000885-E3; Thu, 24 May 2018 07:14:36 +0000 Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLZ-0002oD-Pv for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:49 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377USf; Thu, 24 May 2018 09:07:29 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:29 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 03/13] mmc: pxamci: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:53 +0200 Message-Id: <20180524070703.11901-4-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_000738_178289_12B7BDBF X-CRM114-Status: GOOD ( 18.30 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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; From patchwork Thu May 24 07:06:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="chc1pGkr"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0xS6XyYz9s0x for ; Thu, 24 May 2018 17:14:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0skPjLVyM3odOlrT2S4qNAF7zVl4xG1z+Z7wRkm40mg=; b=chc1pGkrFgHF7oGz3/1HKq10mB SqgHGD2ilGcso4kipCDixacZ/hHoG+IvDine72jBqNt25oyLUBrDsyC6aXaU+Sf3F7prcjTBpDvBB x/5FMVQtLeR1HvAbxMDKbQO6u8jEixImQCXFtJTHqZgNcSE1URtnqLWC4F/inF92yj3WqQaD6rbeF DOIX9jRQ2OibXecPiC3PYx+KBpWQntf5UEL3H4MJvb4WgbX33lY9KGuwjTupOA/Fks/fx4iYPxodm jaLe+JVkFdvGp7YcWcp/yXy3TUrrPdjgwKvSOGO2hzUBkzy2JgejXuP44fzXIF0tnhpdyCJrApmb+ 1IeH+1dg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkRs-0007pc-At; Thu, 24 May 2018 07:14:08 +0000 Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLZ-0002ob-QP for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:48 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377WTB; Thu, 24 May 2018 09:07:31 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:31 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 04/13] media: pxa_camera: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:54 +0200 Message-Id: <20180524070703.11901-5-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_000738_231499_98AFAA00 X-CRM114-Status: GOOD ( 17.26 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/media/platform/pxa_camera.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index c71a00736541..4c82d1880753 100644 --- a/drivers/media/platform/pxa_camera.c +++ b/drivers/media/platform/pxa_camera.c @@ -2357,8 +2357,6 @@ static int pxa_camera_probe(struct platform_device *pdev) .src_maxburst = 8, .direction = DMA_DEV_TO_MEM, }; - dma_cap_mask_t mask; - struct pxad_param params; char clk_name[V4L2_CLK_NAME_SIZE]; int irq; int err = 0, i; @@ -2432,34 +2430,20 @@ static int pxa_camera_probe(struct platform_device *pdev) pcdev->base = base; /* request dma */ - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - dma_cap_set(DMA_PRIVATE, mask); - - params.prio = 0; - params.drcmr = 68; - pcdev->dma_chans[0] = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶ms, &pdev->dev, "CI_Y"); + pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); if (!pcdev->dma_chans[0]) { dev_err(&pdev->dev, "Can't request DMA for Y\n"); return -ENODEV; } - params.drcmr = 69; - pcdev->dma_chans[1] = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶ms, &pdev->dev, "CI_U"); + pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); if (!pcdev->dma_chans[1]) { dev_err(&pdev->dev, "Can't request DMA for Y\n"); err = -ENODEV; goto exit_free_dma_y; } - params.drcmr = 70; - pcdev->dma_chans[2] = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶ms, &pdev->dev, "CI_V"); + pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); if (!pcdev->dma_chans[2]) { dev_err(&pdev->dev, "Can't request DMA for V\n"); err = -ENODEV; From patchwork Thu May 24 07:06:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D3cY2grn"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="gBB2Wcp7"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s1NR0KF1z9s2S for ; Thu, 24 May 2018 17:34:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=APmHig8UMiYPBMCxuvR8db6nC9RM5FImx+7tn03lFH0=; b=D3cY2grnKf+pqmG+dAHfhErrGY LUq/enYdeIsIyFOvOJaADCiVGErJrl+utWf41cE1+yI/WoyrsjMVD5cA7sQ0H5OWFgO1XtTY1jbcY adpoyra+nhHzCKnyQ5KQYLyXQoT4G5zKSPt1hKbyQLxP2je0i6J7E/DGaDRgS0B4cbxX894ZpT2cb FVpl9XHDBipuqlbhYvdo3SkYPY0WxUKUWZh2HJMlzZjJPQcIYBjzFZ3JLCs9L2ICHL0e/RBxieGqJ q2QxMzcF8MPI4cuaYHtrB7lEb2VrFWjYshvIl/O2A0mOD9nT9PUSDeWFk4lGfqIyT7TQMZMAr9m8l 4glCcb0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkl3-0004A5-K2; Thu, 24 May 2018 07:33:57 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLq-0002yj-3s for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5HEOSqrkbnRgg5E5pWKopSgxfvBwBFD+dj7QeH14Jic=; b=gBB2Wcp7i/eZBdvBZQJqySKmk taVS7QujMkYp2CVUUzIVV+/io7ef0dXIpo0qa44gYFnFpqD1iW6X1cxAslriu6XHO09Dnouk/X0D+ GX0KEf1gldzca66eg5NwZEFQMYhrj+PVN55LLVqWAsb8VqQkvIklswqFDGK76yR+NTkAB6RDCLYJ3 5nvZIaS8xUSTPzUaD4Srk94fwF7jHgfS2AHlD9IHqt1k4kcIREqn/QVbX21Tyee5XK397Qa0kIuYz K8vW0T2jQ4zYe9itdRd/NHS+ZiQhKUxS7tLNSTTv94d+1k5eS4DTrgp+3vyrEAMCY4N4/D1Zcr/RW 5fkLvtF7A==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLl-0003hm-7Q for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:51 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377XTn; Thu, 24 May 2018 09:07:32 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:32 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 05/13] mtd: rawnand: marvell: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:55 +0200 Message-Id: <20180524070703.11901-6-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_030749_561861_C6E33763 X-CRM114-Status: GOOD ( 15.31 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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: Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik Acked-by: Miquel Raynal --- drivers/mtd/nand/raw/marvell_nand.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c index 10e953218948..f9763be078ef 100644 --- a/drivers/mtd/nand/raw/marvell_nand.c +++ b/drivers/mtd/nand/raw/marvell_nand.c @@ -2613,8 +2613,6 @@ static int marvell_nfc_init_dma(struct marvell_nfc *nfc) dev); struct dma_slave_config config = {}; struct resource *r; - dma_cap_mask_t mask; - struct pxad_param param; int ret; if (!IS_ENABLED(CONFIG_PXA_DMA)) { @@ -2627,20 +2625,7 @@ static int marvell_nfc_init_dma(struct marvell_nfc *nfc) if (ret) return ret; - r = platform_get_resource(pdev, IORESOURCE_DMA, 0); - if (!r) { - dev_err(nfc->dev, "No resource defined for data DMA\n"); - return -ENXIO; - } - - param.drcmr = r->start; - param.prio = PXAD_PRIO_LOWEST; - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - nfc->dma_chan = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m, nfc->dev, - "data"); + nfc->dma_chan = dma_request_slave_channel(&nfc->dev, "data"); if (!nfc->dma_chan) { dev_err(nfc->dev, "Unable to request data DMA channel\n"); From patchwork Thu May 24 07:06:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BAoBbs1f"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="q0ZT2Qto"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0pk6Bt9z9s2L for ; Thu, 24 May 2018 17:08:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SaSmI4adugLJwModoEL69cAIbBv7Q9YV5C+FWiE0xII=; b=BAoBbs1fNv/T9ZMSs+X3uALCQ9 qGMVo+yfo4OiJkKczU+xhaI1fleF5fbPSL6S0JMl0DjEGZrscpKfKgmOYbonNiT4zXYGCjHXOu2d5 6WEi8ZRzDf0g4aFSFrIebu3KiIyVf1E1gQ3/VfyFxiQ34TIavkUJ10DYU04v3jv0UGtTxRVQV2C1n VgyWKPMV1KXa5EcjXNIMAAaOMpT0OLIwiFks9pHbyr+8BA1ceFiV1mD9e0US8n/hUNXPdXVx4SBFF p8uW/OVmj4EDXUHxR7KZJkj3Fxe4vKG3WgU4wjJ6f3ho2r4uG9eTaS/hZqwdMBQfbfwwytxiZOFB9 YHWgSeRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkMG-0003E1-NN; Thu, 24 May 2018 07:08:20 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLd-0002rn-90 for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=I+LbiVpD1R86ZMp5Jgp9PwAv+7Q1scQOgc0f0JD1Obk=; b=q0ZT2Qto0VZpvQ0Tfmeg1m7J6 kKS9yMGmccqFW+HgkZdF8nhK6U5ON/4uSq8xW0hloUn73jGRpa1JJtlyXoR7fK2FvJI3uuftIox5h voXHXJK6Xr1LtcNt+rbTEppPe7v47LVE2g3ycZ5pUA8VOAFReVHzkXDDPwEW35+U6Zj6fyPPjjmUU Cic8myJjVA9Cb47yQaas8/caa5jpYEHE7t0oJ2UHqdWq6nneF+0I7cTi9y3dNzULFPIIyPvqetM/1 eyNUWd0YFns1zvJaGLDHOt1sJ4imB3bmRu0k4uob523i8TaqLHfuEzobUOUMmYg+2p0AH9HGw4/fv aMOfiNxEQ==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLY-000825-Sj for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:39 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377YUU; Thu, 24 May 2018 09:07:33 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:33 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 06/13] net: smc911x: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:56 +0200 Message-Id: <20180524070703.11901-7-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_080737_083984_215F0195 X-CRM114-Status: GOOD ( 18.50 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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/net/ethernet/smsc/smc911x.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 05157442a980..4c3713bd5caa 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -74,7 +74,6 @@ static const char version[] = #include #include -#include #include @@ -1794,8 +1793,6 @@ static int smc911x_probe(struct net_device *dev) unsigned long irq_flags; #ifdef SMC_USE_DMA struct dma_slave_config config; - dma_cap_mask_t mask; - struct pxad_param param; #endif DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__); @@ -1969,17 +1966,8 @@ static int smc911x_probe(struct net_device *dev) #ifdef SMC_USE_DMA - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - param.prio = PXAD_PRIO_LOWEST; - param.drcmr = -1UL; - - lp->rxdma = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m, &dev->dev, "rx"); - lp->txdma = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m, &dev->dev, "tx"); + lp->rxdma = dma_request_slave_channel(&dev->dev, "rx"); + lp->txdma = dma_request_slave_channel(&dev->dev, "tx"); lp->rxdma_active = 0; lp->txdma_active = 0; From patchwork Thu May 24 07:06:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KfgzS2CT"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="cg4bJNeC"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0vD75KYz9s0x for ; Thu, 24 May 2018 17:12:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=w2/OgIbvmq2YfMRU3dsHbGpzcsGBwmrniCAHhr0+tdQ=; b=KfgzS2CTzzuHyPtvXS7NENgdHs 3472H2sd4cRakxU46cyxV1G354a133MaLJU4ZCpff9xZ5aFomSbUWzrah2CHxnSzRUTpLK99oZudm hIpiMC+lfLbZ9HpoCKQx5Ch6bYFDtZv+Z2QHfGlR8PsnptaMeM8NuOxYRvKh1/HL6rgq7LxkUmXpE vl6dlRkM5rJTErx0GdBM0515t24/spD8zl0Z3wCS9PjdMW6179G0rCCFBrblenIqoFLLc4774vG+W 8W7xky3Ls4uOKGvFxUZh+4H+4PAnJ2vSA9gjeVpcxlounIwIqHjeocDxl5mTsSBnntWtaST8Hylvo KIeYbh3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkQ4-0006lD-Vf; Thu, 24 May 2018 07:12:17 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLp-0002yP-M6 for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hPSOp4YaDP6km/zHiTNwHUWjOb/0/6TNT5zYcf0e91E=; b=cg4bJNeCE3CC8kxfAVUQLPQBW NPa8z5PCcru7o0hRmQJt2yGLGrSEn14UqGc81ntM/NQy1/MCgMr2cMaQPR7zKzNx6nl7gqUnlMOYw R61bBWpHU3Yp6i257VGitEY+UACHHh+a30pxuoXD+ADKhwwBX+EllH+AtCNdaQnLPEcMq1mkiugkz O+D13vRZwM0ao2Dx1aDobjHT85ES9e141ISOJe2NS3vE2goY/99eRx00KvfwbLYienG/EV0884mUv CTIRYLGIEO59i/cyezm8tqm/V3BM3TdErenPJ/rwZyL6LxyaV4knr8NxixQUHA3wAYZxPXcSkL0t2 GPZk8UE2g==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLl-0003hp-5j for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:51 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377aV4; Thu, 24 May 2018 09:07:35 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:35 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 07/13] net: smc91x: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:57 +0200 Message-Id: <20180524070703.11901-8-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_030749_553506_158711EC X-CRM114-Status: GOOD ( 15.19 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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/net/ethernet/smsc/smc91x.c | 12 +----------- drivers/net/ethernet/smsc/smc91x.h | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 080428762858..4c600f430f6d 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2018,18 +2018,8 @@ static int smc_probe(struct net_device *dev, void __iomem *ioaddr, lp->cfg.flags |= SMC91X_USE_DMA; # endif if (lp->cfg.flags & SMC91X_USE_DMA) { - dma_cap_mask_t mask; - struct pxad_param param; - - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - param.prio = PXAD_PRIO_LOWEST; - param.drcmr = -1UL; - lp->dma_chan = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m, &dev->dev, - "data"); + dma_request_slave_channel(lp->device, "data"); } #endif diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h index b337ee97e0c0..a27352229fc2 100644 --- a/drivers/net/ethernet/smsc/smc91x.h +++ b/drivers/net/ethernet/smsc/smc91x.h @@ -301,7 +301,6 @@ struct smc_local { * as RX which can overrun memory and lose packets. */ #include -#include #ifdef SMC_insl #undef SMC_insl From patchwork Thu May 24 07:06:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Qpx7wDZE"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="N7HbJoJW"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0t65Y5Lz9s0x for ; Thu, 24 May 2018 17:11:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Ax+Bx9158sqiyVPWNRnc+Ty2l9/Gv38zlegvimFOZLk=; b=Qpx7wDZE7gfU1Mccefsvnl0Nkv QdG5ekNP5durZut/D/gztJ+0ftbhQAGS2bFOEgOfFofe8CkzdUog0raavYgTEfuS6FdSE5xXf+feI zta2L11dHIBdzAdZA57FMCgcqP8u/BSd754g40j31J2F930qhEguK9y4Md1WNuIFDdoAYL8HFP6a/ bTS4my+msS7etE3chPu27QXgjEpen6l4at7eQgbgkp9LSVvHe8g1+TtZHdB04DMTfNkpP6o+9yYC1 JOrR/D9Yv2sHzEpJjbC4OXmSYICSKFCoqODYrjd0tzLZsR3de1VIzKwTkz3qCCA9D1IzkMGeqGaPk LkHb6Pnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkP6-0006Cp-8b; Thu, 24 May 2018 07:11:16 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLq-0002yi-4K for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=C7yWcFwV0fWvyS4yOgxtCwRTqV7FcI0sF1Gtzdda4kI=; b=N7HbJoJWS+QaKQRJdqsf7sjC7 QowVNjVXnYqp7VS58ZbSgsNJCuQUjdoNe+U2CX8eWVERYWVimLFCc1HvmAeUzKzQAxIbnH+a3F03L dNPVDws6t+tplYoPAYrKkISijYWd2C2a3Tip/5ZLN1p4Neu2e9qAgUkZnevodZuZ+1RQvdlIZhAGk Gm6/NTVbsG7jZu8du4eYmlR1y/Ay8/3N/UxAhrixHDencLlmj9ZHTnWd3BEzrymS+BH7KxZp2BlXh xuJPxj+zDVUMzNj6dbWpQYUrvOHy5Y4rWnJn0UwCrNY7nKWAL2PbtWtaMK5eDVHmMi9vmNZeqC+pJ qQ8J/tc7g==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLl-0003hr-6Y for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:51 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377bVi; Thu, 24 May 2018 09:07:37 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:37 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 08/13] ASoC: pxa: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:58 +0200 Message-Id: <20180524070703.11901-9-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_030749_611555_8E889BED X-CRM114-Status: GOOD ( 15.75 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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: Mark Brown Reviewed-by: Daniel Mack --- sound/arm/pxa2xx-ac97.c | 14 ++------------ sound/arm/pxa2xx-pcm-lib.c | 6 +++--- sound/soc/pxa/pxa2xx-ac97.c | 32 +++++--------------------------- sound/soc/pxa/pxa2xx-i2s.c | 6 ++---- 4 files changed, 12 insertions(+), 46 deletions(-) diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 4bc244c40f80..236a63cdaf9f 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -63,28 +63,18 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = { .reset = pxa2xx_ac97_legacy_reset, }; -static struct pxad_param pxa2xx_ac97_pcm_out_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 12, -}; - static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_out = { .addr = __PREG(PCDR), .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .chan_name = "pcm_pcm_stereo_out", .maxburst = 32, - .filter_data = &pxa2xx_ac97_pcm_out_req, -}; - -static struct pxad_param pxa2xx_ac97_pcm_in_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 11, }; static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_in = { .addr = __PREG(PCDR), .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .chan_name = "pcm_pcm_stereo_in", .maxburst = 32, - .filter_data = &pxa2xx_ac97_pcm_in_req, }; static struct snd_pcm *pxa2xx_ac97_pcm; diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index e8da3b8ee721..dcbe7ecc1835 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c @@ -125,9 +125,9 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) if (ret < 0) return ret; - return snd_dmaengine_pcm_open_request_chan(substream, - pxad_filter_fn, - dma_params->filter_data); + return snd_dmaengine_pcm_open( + substream, dma_request_slave_channel(rtd->cpu_dai->dev, + dma_params->chan_name)); } EXPORT_SYMBOL(__pxa2xx_pcm_open); diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 803818aabee9..1b41c0f2a8fb 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -68,61 +68,39 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = { .reset = pxa2xx_ac97_cold_reset, }; -static struct pxad_param pxa2xx_ac97_pcm_stereo_in_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 11, -}; - static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = { .addr = __PREG(PCDR), .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .chan_name = "pcm_pcm_stereo_in", .maxburst = 32, - .filter_data = &pxa2xx_ac97_pcm_stereo_in_req, -}; - -static struct pxad_param pxa2xx_ac97_pcm_stereo_out_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 12, }; static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = { .addr = __PREG(PCDR), .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .chan_name = "pcm_pcm_stereo_out", .maxburst = 32, - .filter_data = &pxa2xx_ac97_pcm_stereo_out_req, }; -static struct pxad_param pxa2xx_ac97_pcm_aux_mono_out_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 10, -}; static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_out = { .addr = __PREG(MODR), .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES, + .chan_name = "pcm_aux_mono_out", .maxburst = 16, - .filter_data = &pxa2xx_ac97_pcm_aux_mono_out_req, }; -static struct pxad_param pxa2xx_ac97_pcm_aux_mono_in_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 9, -}; static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_in = { .addr = __PREG(MODR), .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES, + .chan_name = "pcm_aux_mono_in", .maxburst = 16, - .filter_data = &pxa2xx_ac97_pcm_aux_mono_in_req, }; -static struct pxad_param pxa2xx_ac97_pcm_aux_mic_mono_req = { - .prio = PXAD_PRIO_LOWEST, - .drcmr = 8, -}; static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_mic_mono_in = { .addr = __PREG(MCDR), .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES, + .chan_name = "pcm_aux_mic_mono", .maxburst = 16, - .filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req, }; static int pxa2xx_ac97_hifi_startup(struct snd_pcm_substream *substream, diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 3fb60baf6eab..e7184de0de04 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c @@ -82,20 +82,18 @@ static struct pxa_i2s_port pxa_i2s; static struct clk *clk_i2s; static int clk_ena = 0; -static unsigned long pxa2xx_i2s_pcm_stereo_out_req = 3; static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = { .addr = __PREG(SADR), .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .chan_name = "tx", .maxburst = 32, - .filter_data = &pxa2xx_i2s_pcm_stereo_out_req, }; -static unsigned long pxa2xx_i2s_pcm_stereo_in_req = 2; static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = { .addr = __PREG(SADR), .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .chan_name = "rx", .maxburst = 32, - .filter_data = &pxa2xx_i2s_pcm_stereo_in_req, }; static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream, From patchwork Thu May 24 07:06:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aw7qcmcO"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="n8wuWGou"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s1Mx2zgzz9s29 for ; Thu, 24 May 2018 17:33:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=v5gyD1oNO2LnvfOnroOg21XWRqPVwElzqhzgV4rMwOw=; b=aw7qcmcOV1VUiR25zdqSM2BKR1 hgwgNCUQiunSkqutSoNN1m8u/Fl+4UDNnMJ38fxPAHU1eqW/qWNwsKxD4WTBrIQ+9J83Psptj9kHM dNklAwjEyRDwP6GaQmATuN0Jz2DSmIEBzjnJfpgX4JznEs1GnlQZPC4/NlnLMxoRKGkkJFgQbc6NU bsNoKicyB1979nytoooTgnozHyzYQSKVobrICZMeCsz6b5wVXmarTLdwHAC/6fyF9qKGMjjQXk1n1 2q8a8KidNy5qx1p+HjOvq2+YD/uFYKRpivsZ4cDuZb7ZP0/FUBLZZ8E5qKQoC1BGT/AYj0xbTRDs3 jAB/kM6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkkm-0003ys-2u; Thu, 24 May 2018 07:33:40 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLp-0002y9-B8 for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MUtttg80gJTha4Lb2MQTDcEKKEkrAqZv+0GRFaBBRGg=; b=n8wuWGoudU6pCTUenXZljYrG9 Q5rmDHa1NqZtiMIGXRWS4kS9r1YzI0Uhb1bHVZK7sxOgBB0gxXT/+WIBZrXTY4i6HVhr2Z8oHYrKk hQq8E5i3wNWz/dnrZtSN+9CKM7G9hLRHkXcakSjMfLanXjqUnrLfMIykO6HcgOeSFvKrIJvSccp5U nS2jWZ4MMOhVXQKdM6jA2qlhya56T3wYAP7y9PkEVCnQ6HmKOFFW0cBObK7NDqS58bk3pbynh8Fg9 nd1bslJYAXEc2sOieOFpX3VesAhc7EvnvjvRkr6NQjn4HlaYT0KH3FFprH+sKc1i+PauqR0jX8I8E dH4E6LiPg==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLl-0003hv-6F for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:50 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377dWJ; Thu, 24 May 2018 09:07:39 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:39 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 09/13] ata: pata_pxa: remove the dmaengine compat need Date: Thu, 24 May 2018 09:06:59 +0200 Message-Id: <20180524070703.11901-10-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_030749_532082_6F963F44 X-CRM114-Status: GOOD ( 15.92 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_pxa.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c index f6c46e9a4dc0..e8b6a2e464c9 100644 --- a/drivers/ata/pata_pxa.c +++ b/drivers/ata/pata_pxa.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -180,8 +179,6 @@ static int pxa_ata_probe(struct platform_device *pdev) struct resource *irq_res; struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev); struct dma_slave_config config; - dma_cap_mask_t mask; - struct pxad_param param; int ret = 0; /* @@ -278,10 +275,6 @@ static int pxa_ata_probe(struct platform_device *pdev) ap->private_data = data; - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - param.prio = PXAD_PRIO_LOWEST; - param.drcmr = pdata->dma_dreq; memset(&config, 0, sizeof(config)); config.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; config.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; @@ -294,8 +287,7 @@ static int pxa_ata_probe(struct platform_device *pdev) * Request the DMA channel */ data->dma_chan = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶m, &pdev->dev, "data"); + dma_request_slave_channel(&pdev->dev, "data"); if (!data->dma_chan) return -EBUSY; ret = dmaengine_slave_config(data->dma_chan, &config); From patchwork Thu May 24 07:07:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="S6osliee"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0vp5l79z9s0x for ; Thu, 24 May 2018 17:12:54 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Pbp2OCjxwJeVrcT617SSD9dSc0t9UnzlZwmn38rPvRM=; b=S6oslieeUTtjC417f9dVIvxsh9 Xju7dNk8N3Wb/dQoQrExpDcNUWy9JPB4j3F685rDx2lA/LMzBzPKE4buJLfpBr/8sTssZHvJ4RMy6 WxTCkQF8LO2hZxS8ijo7D2M/AqCJl+FiD7PkqGyL3ljbyanqn/2jOoRekF1k8y+OBkr2a27p5WmPd EDLSz8TXoW7WGnzkYrDRuLtanqYCMZjMGiPF7ako4XJuNUP+WzGQDK2k/Rs8+3ML6WU4Nwnwjc1AV Tq7FTDG/Q3M6aVZ0HaY6/fHUwKqffS5zwnXV/RmHS2e5BZ8NpKdnBRN35n9mvcbHBDG3GErd3RFoz RGBG5dag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkQX-00070S-5p; Thu, 24 May 2018 07:12:45 +0000 Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLo-0002sI-VB for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:57 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377fWs; Thu, 24 May 2018 09:07:40 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:40 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 10/13] dmaengine: pxa: document pxad_param Date: Thu, 24 May 2018 09:07:00 +0200 Message-Id: <20180524070703.11901-11-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_000753_329076_DDDA9AD8 X-CRM114-Status: GOOD ( 15.39 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add some documentation for the pxad_param structure, and describe the contract behind the minimal required priority of a DMA channel. Signed-off-by: Robert Jarzmik Acked-by: Vinod Koul --- include/linux/dma/pxa-dma.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/dma/pxa-dma.h b/include/linux/dma/pxa-dma.h index e56ec7af4fd7..9fc594f69eff 100644 --- a/include/linux/dma/pxa-dma.h +++ b/include/linux/dma/pxa-dma.h @@ -9,6 +9,15 @@ enum pxad_chan_prio { PXAD_PRIO_LOWEST, }; +/** + * struct pxad_param - dma channel request parameters + * @drcmr: requestor line number + * @prio: minimal mandatory priority of the channel + * + * If a requested channel is granted, its priority will be at least @prio, + * ie. if PXAD_PRIO_LOW is required, the requested channel will be either + * PXAD_PRIO_LOW, PXAD_PRIO_NORMAL or PXAD_PRIO_HIGHEST. + */ struct pxad_param { unsigned int drcmr; enum pxad_chan_prio prio; From patchwork Thu May 24 07:07:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919670 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TucvBZu0"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="URjL7OGK"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0wJ58W1z9s0x for ; Thu, 24 May 2018 17:13:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BHnbHsYBAZUv8qu4Bv0rfKUV6n3XepyE4XRXtawQ1+Q=; b=TucvBZu0IP5HMT1xOfW6tsm+a5 /MaCQ/w40CSdQJmGaFsuR2xW9w/yA7gNleXxHDJz68ylnAgkmzhldbcrm3w+BUbJHLhW5UbSXB9Zg reuZ5TFxH8HHyBvWgRNqZg143p+ixxxOHJiZaYno1Jpk9KKV//gqLN9IeAz5QOHllpsgt1zEpv2Zz e23eQ0Q5SXW8l/1aS8Qgop+R8PBE3Be6HhXCtvWUH0ofK1RKVTzKxnukS/ixA/uC2mcT7UI73DFiA 0elOJ3o/3csl538gDFyOWOLBM8dNOqY0ERf022B0TY0qI5CiQgnUBg6lxdAvB+6WYvQusdtCVWFJ/ FiolOPJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkQy-0007Gm-7Z; Thu, 24 May 2018 07:13:12 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLt-00031V-8D for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5C8d3XEVPJw3oAhSe02klOFH8TjrqrBV3cvYNbztPXM=; b=URjL7OGKSM96qYyjZwuQ0on5w 0XGLdKHafokP+4TCyv+ikuOoshUoIyhNqvNsAL5MnMkfq/tBEePgU3TY9stTIuBjLwC5IIv1vQWhh AX6dfCSLMxVvpQ2ORBaaDlyynNGVVyUEgWKocahCvMSpg+JLI11Bog0PlPqSkzLgL8vzA2Dj9my4R XESG31yTSj2VODfZaesHdv0dRPg0qHZl8auPL/59e+cNIorbliMmf7yW57YVJytunNnfecB1d4V/s 7maHStON1zrPBLU+1W3m1VQfHiiEFjuCRWRjyPf6ynbdho369QVlSO5JnKeenEvrd9JFem07+Jo54 uVr77ZHxg==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLn-00085N-Ds for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:55 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377hXg; Thu, 24 May 2018 09:07:42 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:42 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 11/13] dmaengine: pxa: make the filter function internal Date: Thu, 24 May 2018 09:07:01 +0200 Message-Id: <20180524070703.11901-12-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_080751_600892_404EA0CE X-CRM114-Status: GOOD ( 19.95 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org As the pxa architecture and all its related drivers do not rely anymore on the filter function, thanks to the slave map conversion, make pxad_filter_fn() static, and remove it from the global namespace. Signed-off-by: Robert Jarzmik Acked-by: Vinod Koul --- drivers/dma/pxa_dma.c | 5 ++--- include/linux/dma/pxa-dma.h | 11 ----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index 9505334f9c6e..a332ad1d7dfb 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -179,7 +179,7 @@ static unsigned int pxad_drcmr(unsigned int line) return 0x1000 + line * 4; } -bool pxad_filter_fn(struct dma_chan *chan, void *param); +static bool pxad_filter_fn(struct dma_chan *chan, void *param); /* * Debug fs @@ -1496,7 +1496,7 @@ static struct platform_driver pxad_driver = { .remove = pxad_remove, }; -bool pxad_filter_fn(struct dma_chan *chan, void *param) +static bool pxad_filter_fn(struct dma_chan *chan, void *param) { struct pxad_chan *c = to_pxad_chan(chan); struct pxad_param *p = param; @@ -1509,7 +1509,6 @@ bool pxad_filter_fn(struct dma_chan *chan, void *param) return true; } -EXPORT_SYMBOL_GPL(pxad_filter_fn); module_platform_driver(pxad_driver); diff --git a/include/linux/dma/pxa-dma.h b/include/linux/dma/pxa-dma.h index 9fc594f69eff..fceb5df07097 100644 --- a/include/linux/dma/pxa-dma.h +++ b/include/linux/dma/pxa-dma.h @@ -23,15 +23,4 @@ struct pxad_param { enum pxad_chan_prio prio; }; -struct dma_chan; - -#ifdef CONFIG_PXA_DMA -bool pxad_filter_fn(struct dma_chan *chan, void *param); -#else -static inline bool pxad_filter_fn(struct dma_chan *chan, void *param) -{ - return false; -} -#endif - #endif /* _PXA_DMA_H_ */ From patchwork Thu May 24 07:07:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EcLa4j5R"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="o46eIB7u"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0wv2rydz9s0x for ; Thu, 24 May 2018 17:13:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=sTqC+y4DNC38SZS8GnODoHHDW1po4zk9pegAGiLaJ1M=; b=EcLa4j5RBQ8UG/8WHEXCPb4ZW7 Wp+Ci5nx/f9AXV/2dP2rSOHGm0rtEK9Q+KyIREjGIX0lJQvRQ1UsPdJR9TF0QbimPWVDYU3xJ7WIs U7UKC4NYirqfLpbIkJot/XWKy+KVnrj6KmBT24l3KyD3GYAW8ne4Do5RpAInaY4CY85xXyAJgNz9o ipu8X2uR2sEevM3cjdTaK7GsBOREbbaZrHpYqLRWo29kFcXsfznWGgCTAN6kayYeDrO0FmV3srRim gW2HmHsotCw8B/jsy+3uU9x9I4tnmJSOpH6qqkxr0G9mQoFKVspv8jAqNYQ2UeJEMt7X31lQJ+8I3 Xd2CVIWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkRQ-0007X8-2n; Thu, 24 May 2018 07:13:40 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLu-00032J-Ig for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1moCLf7fkQrpEoz0jOcCQfDoUzFux0Bc6nsCLCMEi+E=; b=o46eIB7usxAG46JyqdeXseYkA INlrir3Va6aNV0z2lPq/6FLdCHabFA6ITPHXJTWCplE8wdbnfvqSlzu3PeX/7yM9exbQplaauTVx7 9kJPp1LONhK2Tb/dn0b01FppIhtaAhTZs1M2Gfpbd1Jj2HxM09w8yj0yBivCOK70sBFW29UM1FXNX LKh/DRfCvImJ0yEt86e3IglUcf3wAkl5DelQnkhpMKHRhN0DSAYJ6EW0TksM46ty6PkloeuuDHGpb UjFAqf68pkmSXxNJrJeFc98xOxiyu3lv1jR+8LWWiHDLRst5Cs1l5Huc506SApB67l2iklBl4DPEF qJqawDmNg==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLn-00085r-Dw for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:57 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377jYH; Thu, 24 May 2018 09:07:44 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:44 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 12/13] ARM: pxa: remove the DMA IO resources Date: Thu, 24 May 2018 09:07:02 +0200 Message-Id: <20180524070703.11901-13-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_080751_615190_277DA534 X-CRM114-Status: GOOD ( 18.60 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org As the last driver using the former mechanism to acquire the DMA requestor line has be converted to the dma_slave_map, remove all these resources from the PXA devices. Signed-off-by: Robert Jarzmik --- arch/arm/mach-pxa/devices.c | 136 -------------------------------------------- 1 file changed, 136 deletions(-) diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 1e8915fc340d..5a16ea74e28a 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -60,16 +60,6 @@ static struct resource pxamci_resources[] = { .end = IRQ_MMC, .flags = IORESOURCE_IRQ, }, - [2] = { - .start = 21, - .end = 21, - .flags = IORESOURCE_DMA, - }, - [3] = { - .start = 22, - .end = 22, - .flags = IORESOURCE_DMA, - }, }; static u64 pxamci_dmamask = 0xffffffffUL; @@ -407,16 +397,6 @@ static struct resource pxa_ir_resources[] = { .end = 0x40700023, .flags = IORESOURCE_MEM, }, - [5] = { - .start = 17, - .end = 17, - .flags = IORESOURCE_DMA, - }, - [6] = { - .start = 18, - .end = 18, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa_device_ficp = { @@ -545,18 +525,6 @@ static struct resource pxa25x_resource_ssp[] = { .end = IRQ_SSP, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 13, - .end = 13, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 14, - .end = 14, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa25x_device_ssp = { @@ -583,18 +551,6 @@ static struct resource pxa25x_resource_nssp[] = { .end = IRQ_NSSP, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 15, - .end = 15, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 16, - .end = 16, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa25x_device_nssp = { @@ -621,18 +577,6 @@ static struct resource pxa25x_resource_assp[] = { .end = IRQ_ASSP, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 23, - .end = 23, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 24, - .end = 24, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa25x_device_assp = { @@ -751,18 +695,6 @@ static struct resource pxa27x_resource_ssp1[] = { .end = IRQ_SSP, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 13, - .end = 13, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 14, - .end = 14, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa27x_device_ssp1 = { @@ -789,18 +721,6 @@ static struct resource pxa27x_resource_ssp2[] = { .end = IRQ_SSP2, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 15, - .end = 15, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 16, - .end = 16, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa27x_device_ssp2 = { @@ -827,18 +747,6 @@ static struct resource pxa27x_resource_ssp3[] = { .end = IRQ_SSP3, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 66, - .end = 66, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 67, - .end = 67, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa27x_device_ssp3 = { @@ -895,16 +803,6 @@ static struct resource pxa3xx_resources_mci2[] = { .end = IRQ_MMC2, .flags = IORESOURCE_IRQ, }, - [2] = { - .start = 93, - .end = 93, - .flags = IORESOURCE_DMA, - }, - [3] = { - .start = 94, - .end = 94, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa3xx_device_mci2 = { @@ -934,16 +832,6 @@ static struct resource pxa3xx_resources_mci3[] = { .end = IRQ_MMC3, .flags = IORESOURCE_IRQ, }, - [2] = { - .start = 100, - .end = 100, - .flags = IORESOURCE_DMA, - }, - [3] = { - .start = 101, - .end = 101, - .flags = IORESOURCE_DMA, - }, }; struct platform_device pxa3xx_device_mci3 = { @@ -1021,18 +909,6 @@ static struct resource pxa3xx_resources_nand[] = { .end = IRQ_NAND, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for Data DMA */ - .start = 97, - .end = 97, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for Command DMA */ - .start = 99, - .end = 99, - .flags = IORESOURCE_DMA, - }, }; static u64 pxa3xx_nand_dma_mask = DMA_BIT_MASK(32); @@ -1066,18 +942,6 @@ static struct resource pxa3xx_resource_ssp4[] = { .end = IRQ_SSP4, .flags = IORESOURCE_IRQ, }, - [2] = { - /* DRCMR for RX */ - .start = 2, - .end = 2, - .flags = IORESOURCE_DMA, - }, - [3] = { - /* DRCMR for TX */ - .start = 3, - .end = 3, - .flags = IORESOURCE_DMA, - }, }; /* From patchwork Thu May 24 07:07:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 919666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aS290Q21"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="j22xnkxh"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40s0tl0l3Cz9s0x for ; Thu, 24 May 2018 17:11:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=040+utAftHFI4lgal/QE2cE0HTMqUebWNlROlxzeDDQ=; b=aS290Q21uJZGY/EhlhI7Pt0QYv oNSAkHe2UG2sWbTsm+pZqDKguKN/U0crEcj6A68CN44ttmsQ0MX0fXizY6IK3Ktb/XnbMVj9mhEj6 rNSXTdumcJITeSM8TraOnEKIgvcMiGD7mBHGZtQjMQvk/jyBBYthUyk7bwyNQ4cf1aXOy/IdXqqlI 6pPqYsMIEK0gincelCVyEOCoJIZxlRPCjqiWUCE0qKrKXLPXxmhwdvQ/2gTx3mt4QyaFYLukTCR4K PC+BSHNBZN+jYjwy29YvGmxe+GlzWTHlrTQ0mZRNQDrqKqvbgoXozNCgB1XtJYdGWPxwQbmBL68Hk PR1UeNag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkPb-0006W2-OV; Thu, 24 May 2018 07:11:47 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLq-0002zt-TG for linux-mtd@bombadil.infradead.org; Thu, 24 May 2018 07:07:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=q1EZoasuNEfQOaCUUO3SNY7xclIxnv9XpHz8osKjwnA=; b=j22xnkxhEWT4Nz6+Ee18HYTkQ 3v04a4aSpuMks0PH7psYlgJhHf/jNpuPurvjUmruozKREyA/SF3y+yoiYt59bPBHvJ2w+R8AdkC4o t+l5BhwuYNlh2Yi81NQiHQdF7ZdPRhgry5kDJ0NP8DXtGFxFZ6JTBE61deiwMOOKfB+XYNA1VyC9j 28NVejTblngN5/HhN+A8bVkDIPvch6z76WiJOLf1IveZ3x98loqkTyOtJRB9Yso8It3U5URNwYwZx hNADRQBVscDY/siSRTs+r/6GG6DJF2aWeKWPreop25xMDinDLM9Yd6bkoUJ+72I6123/JyVUwAlWL 1QQi08mqw==; Received: from smtp01.smtpout.orange.fr ([80.12.242.123] helo=smtp.smtpout.orange.fr) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLkLn-00086K-Dr for linux-mtd@lists.infradead.org; Thu, 24 May 2018 07:07:53 +0000 Received: from belgarion.home ([90.55.202.35]) by mwinf5d01 with ME id q77G1x00i0mKt3N0377kYx; Thu, 24 May 2018 09:07:45 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 24 May 2018 09:07:45 +0200 X-ME-IP: 90.55.202.35 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Subject: [PATCH v2 13/13] ARM: pxa: change SSP DMA channels allocation Date: Thu, 24 May 2018 09:07:03 +0200 Message-Id: <20180524070703.11901-14-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524070703.11901-1-robert.jarzmik@free.fr> References: <20180524070703.11901-1-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180524_080751_562643_05593505 X-CRM114-Status: GOOD ( 23.88 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.12.242.123 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.123 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.jarzmik[at]free.fr) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Now the dma_slave_map is available for PXA architecture, switch the SSP device to it. This specifically means that : - for platform data based machines, the DMA requestor channels are extracted from the slave map, where pxa-ssp-dai. is a 1-1 match to ssp., and the channels are either "rx" or "tx". - for device tree platforms, the dma node should be hooked into the pxa2xx-ac97 or pxa-ssp-dai node. Signed-off-by: Robert Jarzmik Acked-by: Daniel Mack --- Since v1: Removed channel names from platform_data --- arch/arm/plat-pxa/ssp.c | 47 ---------------------------------------------- include/linux/pxa2xx_ssp.h | 2 -- sound/soc/pxa/pxa-ssp.c | 5 ++--- 3 files changed, 2 insertions(+), 52 deletions(-) diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index ba13f793fbce..ed36dcab80f1 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -127,53 +127,6 @@ static int pxa_ssp_probe(struct platform_device *pdev) if (IS_ERR(ssp->clk)) return PTR_ERR(ssp->clk); - if (dev->of_node) { - struct of_phandle_args dma_spec; - struct device_node *np = dev->of_node; - int ret; - - /* - * FIXME: we should allocate the DMA channel from this - * context and pass the channel down to the ssp users. - * For now, we lookup the rx and tx indices manually - */ - - /* rx */ - ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", - 0, &dma_spec); - - if (ret) { - dev_err(dev, "Can't parse dmas property\n"); - return -ENODEV; - } - ssp->drcmr_rx = dma_spec.args[0]; - of_node_put(dma_spec.np); - - /* tx */ - ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", - 1, &dma_spec); - if (ret) { - dev_err(dev, "Can't parse dmas property\n"); - return -ENODEV; - } - ssp->drcmr_tx = dma_spec.args[0]; - of_node_put(dma_spec.np); - } else { - res = platform_get_resource(pdev, IORESOURCE_DMA, 0); - if (res == NULL) { - dev_err(dev, "no SSP RX DRCMR defined\n"); - return -ENODEV; - } - ssp->drcmr_rx = res->start; - - res = platform_get_resource(pdev, IORESOURCE_DMA, 1); - if (res == NULL) { - dev_err(dev, "no SSP TX DRCMR defined\n"); - return -ENODEV; - } - ssp->drcmr_tx = res->start; - } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { dev_err(dev, "no memory resource defined\n"); diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 8461b18e4608..03a7ca46735b 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h @@ -212,8 +212,6 @@ struct ssp_device { int type; int use_count; int irq; - int drcmr_rx; - int drcmr_tx; struct device_node *of_node; }; diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 0291c7cb64eb..e09368d89bbc 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c @@ -104,9 +104,8 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL); if (!dma) return -ENOMEM; - - dma->filter_data = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? - &ssp->drcmr_tx : &ssp->drcmr_rx; + dma->chan_name = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? + "tx" : "rx"; snd_soc_dai_set_dma_data(cpu_dai, substream, dma);