Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754879AbbK0LFa (ORCPT ); Fri, 27 Nov 2015 06:05:30 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:58619 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754674AbbK0LAs (ORCPT ); Fri, 27 Nov 2015 06:00:48 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Peter Ujfalusi , vinod.koul@intel.com, andy.shevchenko@gmail.com, linux-mmc@vger.kernel.org, nsekhar@ti.com, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [RFC 3/6] dmaengine: core: Introduce new, universal API to request a channel Date: Fri, 27 Nov 2015 12:00:10 +0100 Message-ID: <24788322.ynD35Kf0xi@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1448612982-28141-4-git-send-email-peter.ujfalusi@ti.com> References: <1448612982-28141-1-git-send-email-peter.ujfalusi@ti.com> <1448612982-28141-4-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:HSPcKiqxCsKzt1Qyyy1XuE0GNo5zIIxZ3Eym0D6Ej8Eq3CQZGQQ RqE0h7FibK/V3U2wqM2Wa6RvT1ANsmAwnJWyZA2xkFaxE/aE+tD4iQ5YVg32kYCjxzBrkME IGovY46tzvQ31Dr2wJ3rUIbBuG2/fQxDyivMvxighRdbora6AO9SjL27iop8NPXJvhcPBpR Ct+Tb3maiZJwrodZYlM/A== X-UI-Out-Filterresults: notjunk:1;V01:K0:YC7K5++QEwM=:ZKefyDZfSOjXoCWZux7XZD tuZwbaaZf7i2Beq8gFIttmB98jhQb/4b8wV37ZTi0XsBtU37amtvgGnvcd5plT9L5LrLsPZI0 pIOdBa6HQeTOwvuuf82Np2RB1EZSsJFo5iNPHTitM3FT2tf2Ml022u70QpuA3T1efE7nn2bUT 30+WIa2SwE2JnTXcTTwJvEgE0ntmLC+LWGMkrl43Ao0bjzRetdnkNElqsuj6h3elV188xjyJq q8h84r7dt381d0IHXL/EUvW5V1QT/epYGtdTRsdcdUL+Oj5Y97pviUlYhIPgtUPp56s0xvfk6 f1Y1+NgMaT7jjO9Xfi/3+l47zd7dPrAl1Zo2p+KevDVioriCFhMrOMdh5zc/vmcr2sc0Zcmbe Hs5Hvdaay1HA3JqfjtQCxSWxV7L+TKGEmcgSFsiiR7EGq0Hb/tfbxJqys3px4uV7rnu+NKyuh 9pjErKDR20VKK82QNOqu2uCh6DxnjMyrnSrPOKL19COQeDnNpLLn/w696hD4naj6b07JNkwCe 2ZNEaIakOVibXhpTUtopQA9u9hDw0sgx/nt/mzdJlqBibD758i8sWyJdK7LiWpGz2PkhJMB+9 t7zhDdP9Q6o64n8XDHlRcXRjfmY8X0++4GAigQEYi4znyCPrtj8KVfeeZNOVdmh03tDSDqt1u T36Lbq2CKU8g6lqgpAt7ynKX8t68O51TxXMfyEPNTNlennW9gclnYhofzH3ijKepsO6iRlfMv HmGyovSG7Uyy3hye Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2224 Lines: 48 On Friday 27 November 2015 10:29:39 Peter Ujfalusi wrote: > struct dma_chan *dma_request_chan(struct device *dev, const char *name, > const dma_cap_mask_t *mask); > To request a slave channel. The mask parameter is optional and it is used > to check if the received channel's capabilities can satisfy the requested > mask. The dma_request_chan() will try to find the 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 RESOURCE_DMA from the requester's device. > This legacy mode needs changes in platform code, in dmaengine drivers and > finally the dmaengine user drivers can be converted: I think we should not introduce the mask parameter at all. In the rare case that we actually need to pass a mask other than DMA_SLAVE today, we should be able to encode that in the data we pass to the filter function. > RESOURCE_DMA needs to be added to the platform devices with names > > For each dmaengine driver a string array listing the devices handled by the > given DMA driver: > > static char *da8xx_edma0_devices[] = { > "davinci-mcasp.0", > "da830-mmc.0", > }; > > This information is going to be needed by the dmaengine driver, so > modification to the platform_data is needed, and the driver map should be > added to the pdata of the DMA driver: However, a lot of drivers definitely need to pass a data pointer for each device. I see that you currently rely on the IORESOURCE_DMA method that a couple of platforms use today, but I think it would be backwards to do it that way for the platforms that require passing more than an integer number today. Having a pointer as the filter function argument is intentional and I'd prefer to change the platforms that currently use IORESOURCE_DMA (davinci, pxa, omap1, blackfin, alchemy) to stop doing it instead, and return IORESOURCE_DMA to its original meaning that was limited to ISAPNP style devices not using the dmaengine API. 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/