Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932101AbbLAURo (ORCPT ); Tue, 1 Dec 2015 15:17:44 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:65328 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755585AbbLAURl (ORCPT ); Tue, 1 Dec 2015 15:17:41 -0500 From: Arnd Bergmann To: Vinod Koul Cc: Peter Ujfalusi , andy.shevchenko@gmail.com, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, nsekhar@ti.com, linux-spi@vger.kernel.org Subject: Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel Date: Tue, 01 Dec 2015 21:17:06 +0100 Message-ID: <3124382.EhiMyQGKTA@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151201165954.GA1696@localhost> References: <1448891145-10766-1-git-send-email-peter.ujfalusi@ti.com> <20151201165954.GA1696@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:QcikONvhA2RrUZa2x1iXfj5lk1trvBTMgbb3j9KpH6QJmZCfiXd M7bIXW7vC8t8b+UhPzfxsMWOsY3YIIp9/OuzyPlC7TvYy5cUfn3AwGK9CUtb66rOFyJ7v/t eRKv/EWXwlfqTq7YQrbUkzTqzUB7NdAd2xqxkLf0YLr09S+d8+sOqXbz4AcgPFH5Zp3ZmYN dIwkPiOLi97Pn4ujtho/g== X-UI-Out-Filterresults: notjunk:1;V01:K0:WrBS1d4PdrA=:zRRCwJ/WzDOR6Ivw/9Iobp oxY9TEgMHXBdrv9hhljr2IfZnu+nDX8V0PzjS7GNvdeEmJp/PjvVONQ5KZx/oPFlpRsbQrawQ uESvdbGcSDHBt20s5PTm0Lpq/B9HaECLl7ZRpnjb2TS7VBgCaGL9cRYtHP+hhn0AR0eV/JOU9 mUdVkHlnwLMpt3R1fc7YGiN1uMzvBwPEAqAjAg7QQEbF3vAQyRc3NzJTyF1NfkTahKiaDW3W3 PhqsRMnARHX/8RmCowaSo8cxoDtMrMGiMpF9Gg7kUcuFrB0u1RE0sD3i8FltdbE8YedD2Xn5w Tx+5O5jJdx8dJaUEUkA4uqvwDrksNf3XU6/RLOjEp/9VyrDlBtG9NMyQtiKXJE5lHNnffP+PP xcO2hnz2PuiP48Q+kPloxDG7vicIGZ80qTd55D21KUZFLtKlCayq8TcY0OWK3ke/U9kZMhGs6 gvhmiDTYkopW+RWInQ2GXABa8ZMKlyUbtcYl+nJdAgCnmrYhPLE6TvY1F1iQ85dPKT6nt+E/e USxFq+cD3XMtoHrPY6kyXh2Um6AB8btEWDLJILt19maC2p6g06b+2uMFUDZGbtbLdswq8/SBv I4LSIj1MQfJTIVFWvNdy7EY4BAC0HgTC9Q/9u4GnF8zyMpcosYlCZ8mI6c3whBkMBK2fl9pTm EiU++NFR1b9PdCCiUw1Ng/vrr8CERRNo0VEOnprARVwxdmwCZGBODmr64FJayTbQZXD6SeYY/ bLb5UcVvaOQ1W2r9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3481 Lines: 83 On Tuesday 01 December 2015 22:29:54 Vinod Koul wrote: > On Mon, Nov 30, 2015 at 03:45:30PM +0200, Peter Ujfalusi wrote: > > channel via DT, ACPI or in case if the kernel booted in non DT/ACPI mode > > it will use a filter lookup table and retrieves the needed information from > > the dma_filter_map provided by the DMA drivers. > > That sounds right, for the third case would the arch, driver or someone else > configure this? The typical case is for the configuration to be defined in arch or platform code and passed down to the dmaengine driver. I just noticed that the text above (and probably the code too) should be changed so we always fall back to this. There are cases where the platform is booted with DT in principle, but the DMA engine does not (yet) use DT and still wants to be converted. I think we can easily handle that case by always trying this if the other methods fail. > > This legacy mode needs changes in platform code, in dmaengine drivers and > > finally the dmaengine user drivers can be converted: > > Are you marking the current APIs as dericated in the end of this series I think we practically stopped marking things as deprecated in general. Per Linus decree, whenever we want to get rid of something, we should instead change all users in tree and then remove the API, expecting driver maintainers to do something just because you marked it as deprecated often doesn't work. I can help out converting a few platforms, maybe one interface at a time. This is what I see: arnd@wuerfel:~/arm-soc$ for i in dma_request_slave_channel_reason dma_request_slave_channel dma_request_slave_channel_compat dma_request_channel ; do echo `git grep -wl $i drivers/ | grep -v drivers/dma | wc -l`\ $i ; done 14 dma_request_slave_channel_reason 27 dma_request_slave_channel 25 dma_request_slave_channel_compat 34 dma_request_channel I would probably leave the users of dma_request_channel() while converting the others, as that is still used by all the platforms that don't use any DT support. Changing dma_request_slave_channel_reason and dma_request_slave_channel is trivial, we can probably use coccinelle for that, as it does not require any platform changes. That brings us to the users of dma_request_slave_channel_compat, which currently includes these files: $ git grep -wl dma_request_slave_channel_compat drivers/ata/pata_pxa.c drivers/crypto/atmel-aes.c drivers/crypto/atmel-sha.c drivers/crypto/atmel-tdes.c drivers/crypto/omap-aes.c drivers/crypto/omap-des.c drivers/crypto/omap-sham.c drivers/media/platform/omap3isp/isphist.c drivers/mmc/host/davinci_mmc.c drivers/mmc/host/omap.c drivers/mmc/host/omap_hsmmc.c drivers/mmc/host/pxamci.c drivers/mmc/host/s3cmci.c drivers/mmc/host/tmio_mmc_dma.c drivers/mtd/nand/pxa3xx_nand.c drivers/net/ethernet/smsc/smc91x.c drivers/net/irda/pxaficp_ir.c drivers/spi/spi-omap2-mcspi.c drivers/spi/spi-pxa2xx-dma.c drivers/spi/spi-rspi.c drivers/spi/spi-s3c64xx.c drivers/spi/spi-sh-msiof.c drivers/tty/serial/8250/8250_dma.c drivers/tty/serial/samsung.c drivers/tty/serial/sh-sci.c include/linux/dmaengine.h In other words: arch/avr32 and arch/sh along with omap1, omap2, davinci, pxa, and s3c in terms of ARM platforms. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/