- 27 7月, 2020 2 次提交
-
-
由 Serge Semin 提交于
Some devices may lack the support of the hardware accelerated SG list entries automatic walking through and execution. In this case a burden of the SG list traversal and DMA engine re-initialization lies on the DMA engine driver (normally implemented by using a DMA transfer completion IRQ to recharge the DMA device with a next SG list entry). But such solution may not be suitable for some DMA consumers. In particular SPI devices need both Tx and Rx DMA channels work synchronously in order to avoid the Rx FIFO overflow. In case if Rx DMA channel is paused for some time while the Tx DMA channel works implicitly pulling data into the Rx FIFO, the later will be eventually overflown, which will cause the data loss. So if SG list entries aren't automatically fetched by the DMA engine, but are one-by-one manually selected for execution in the ISRs/deferred work/etc., such problem will eventually happen due to the non-deterministic latencies of the service execution. In order to let the DMA consumer know about the DMA device capabilities regarding the hardware accelerated SG list traversal we introduce the max_sg_burst capability. It is supposed to be initialized by the DMA engine driver with 0 if there is no limitation of the number of SG entries atomically executed and with non-zero value if there is such constraints, so the upper limit is determined by the number set to the property. Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200723005848.31907-5-Sergey.Semin@baikalelectronics.ruSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Serge Semin 提交于
Some hardware aside from default 0/1 may have greater minimum burst transactions length constraints. Here we introduce the DMA device and slave capability, which if required can be initialized by the DMA engine driver with the device-specific value. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200723005848.31907-4-Sergey.Semin@baikalelectronics.ruSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 18 7月, 2020 1 次提交
-
-
由 Randy Dunlap 提交于
Drop the doubled word "has" in a comment. Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: Vinod Koul <vkoul@kernel.org> Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/06e64046-ebf1-15db-dbaf-73698de3b493@infradead.orgSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 17 6月, 2020 1 次提交
-
-
由 Dave Jiang 提交于
The cookie tracking in dmaengine expects all submissions completed in order. Some DMA devices like Intel DSA can complete submissions out of order, especially if configured with a work queue sharing multiple DMA engines. Add a status DMA_OUT_OF_ORDER that tx_status can be returned for those DMA devices. The user should use callbacks to track the completion rather than the DMA cookie. This would address the issue of dmatest complaining that descriptors are "busy" when the cookie count goes backwards due to out of order completion. Add DMA_COMPLETION_NO_ORDER DMA capability to allow the driver to flag the device's ability to complete operations out of order. Reported-by: NSwathi Kovvuri <swathi.kovvuri@intel.com> Signed-off-by: NDave Jiang <dave.jiang@intel.com> Tested-by: NSwathi Kovvuri <swathi.kovvuri@intel.com> Link: https://lore.kernel.org/r/158939557151.20335.12404113976045569870.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 27 4月, 2020 1 次提交
-
-
由 Dave Jiang 提交于
When the channel register code was changed to allow hotplug operations, dynamic indexing wasn't taken into account. When channels are randomly plugged and unplugged out of order, the serial indexing breaks. Convert channel indexing to using IDA tracking in order to allow dynamic assignment. The previous code does not cause any regression bug for existing channel allocation besides idxd driver since the hotplug usage case is only used by idxd at this point. With this change, the chan->idr_ref is also not needed any longer. We can have a device with no channels registered due to hot plug. The channel device release code no longer should attempt to free the dma device id on the last channel release. Fixes: e81274cd ("dmaengine: add support to dynamic register/unregister of channels") Reported-by: NYixin Zhang <yixin.zhang@intel.com> Signed-off-by: NDave Jiang <dave.jiang@intel.com> Tested-by: NYixin Zhang <yixin.zhang@intel.com> Link: https://lore.kernel.org/r/158679961260.7674.8485924270472851852.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 16 4月, 2020 1 次提交
-
-
由 Maciej Grochowski 提交于
Signed-off-by: NMaciej Grochowski <maciej.grochowski@pm.me> Link: https://lore.kernel.org/r/20200414041703.6661-1-maciek.grochowski@gmail.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 11 3月, 2020 2 次提交
-
-
由 Peter Ujfalusi 提交于
Create a placeholder directory for each registered DMA device. DMA drivers can use the dmaengine_get_debugfs_root() call to get their debugfs root and can populate with custom files to aim debugging. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200306142839.17910-4-peter.ujfalusi@ti.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Peter Ujfalusi 提交于
Via the /sys/kernel/debug/dmaengine/summary users can get information about the DMA devices and the used channels. Example output on am654-evm with audio using two channels and after running dmatest on 4 channels: dma0 (285c0000.dma-controller): number of channels: 96 dma1 (31150000.dma-controller): number of channels: 267 dma1chan0 | 2b00000.mcasp:tx dma1chan1 | 2b00000.mcasp:rx dma1chan2 | in-use dma1chan3 | in-use dma1chan4 | in-use dma1chan5 | in-use For slave channels we can show the device and the channel name a given channel is requested. For non slave devices the only information we know is that the channel is in use. DMA drivers can implement the optional dbg_summary_show callback to provide controller specific information instead of the generic one. It is easy to extend the generic dmaengine_summary_show() to print additional information about the used channels. I have taken the idea from gpiolib and clk subsystems. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200306142839.17910-2-peter.ujfalusi@ti.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 02 3月, 2020 4 次提交
-
-
由 Andy Shevchenko 提交于
There is no need to have 'break;' statement in the default case followed by return certain string literal when all other cases have returned the string literals. So, refactor it accordingly. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200226101842.29426-4-andriy.shevchenko@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Andy Shevchenko 提交于
It's obvious that 'else' keyword is redundant in the code like if (foo) return bar; else if (baz) ... Drop it for good. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200226101842.29426-3-andriy.shevchenko@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Andy Shevchenko 提交于
When negative condition is in use we may decrease indentation level and make the main part of logic better visible. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200226101842.29426-2-andriy.shevchenko@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Andy Shevchenko 提交于
There is no need to have branch and temporary variable in the function. Simple convert it to be a set of bit and arithmetic operations. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200226101842.29426-1-andriy.shevchenko@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 24 1月, 2020 2 次提交
-
-
由 Geert Uytterhoeven 提交于
Currently it is not easy to find out which DMA channels are in use, and which slave devices are using which channels. Fix this by creating two symlinks between the DMA channel and the actual slave device when a channel is requested: 1. A "slave" symlink from DMA channel to slave device, 2. A "dma:<name>" symlink slave device to DMA channel. When the channel is released, the symlinks are removed again. The latter requires keeping track of the slave device and the channel name in the dma_chan structure. Note that this is limited to channel request functions for requesting an exclusive slave channel that take a device pointer (dma_request_chan() and dma_request_slave_channel*()). Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Tested-by: NNiklas Söderlund <niklas.soderlund@ragnatech.se> Link: https://lore.kernel.org/r/20200117153056.31363-1-geert+renesas@glider.beSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Dave Jiang 提交于
With the channel registration routines broken out, now add support code to allow independent registering and unregistering of channels in a hotplug fashion. Signed-off-by: NDave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/157965023364.73301.7821862091077299040.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 21 1月, 2020 5 次提交
-
-
由 Geert Uytterhoeven 提交于
The functions dma_get_slave_channel() and dma_get_any_slave_channel() are called from DMA engine drivers only. Hence move their declarations from the public header file <linux/dmaengine.h> to the private header file drivers/dma/dmaengine.h. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20200121093311.28639-4-geert+renesas@glider.beSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Geert Uytterhoeven 提交于
At its original introduction, dma_request_slave_channel_compat() used a wrapper, to accommodate filter functions that modify the mask passed. Filter functions can no longer modify masks, and the mask parameter was made const in commit a53e28da ("dma: Make the 'mask' parameter of __dma_request_channel const") consecutively. Hence remove the wrapper, and rename __dma_request_slave_channel_compat() to dma_request_slave_channel_compat(), to get rid of one more function name starting with a double underscore. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20200121093311.28639-3-geert+renesas@glider.beSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Peter Ujfalusi 提交于
dmaengine_get_direction_text() can be useful when the direction is printed out. The text is easier to comprehend than the number. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20191223110458.30766-7-peter.ujfalusi@ti.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Peter Ujfalusi 提交于
A DMA hardware can have big cache or FIFO and the amount of data sitting in the DMA fabric can be an interest for the clients. For example in audio we want to know the delay in the data flow and in case the DMA have significantly large FIFO/cache, it can affect the latenc/delay Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NTero Kristo <t-kristo@ti.com> Tested-by: NKeerthy <j-keerthy@ti.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Link: https://lore.kernel.org/r/20191223110458.30766-6-peter.ujfalusi@ti.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Peter Ujfalusi 提交于
The metadata is best described as side band data or parameters traveling alongside the data DMAd by the DMA engine. It is data which is understood by the peripheral and the peripheral driver only, the DMA engine see it only as data block and it is not interpreting it in any way. The metadata can be different per descriptor as it is a parameter for the data being transferred. If the DMA supports per descriptor metadata it can implement the attach, get_ptr/set_len callbacks. Client drivers must only use either attach or get_ptr/set_len to avoid misconfiguration. Client driver can check if a given metadata mode is supported by the channel during probe time with dmaengine_is_metadata_mode_supported(chan, DESC_METADATA_CLIENT); dmaengine_is_metadata_mode_supported(chan, DESC_METADATA_ENGINE); and based on this information can use either mode. Wrappers are also added for the metadata_ops. To be used in DESC_METADATA_CLIENT mode: dmaengine_desc_attach_metadata() To be used in DESC_METADATA_ENGINE mode: dmaengine_desc_get_metadata_ptr() dmaengine_desc_set_metadata_len() Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NTero Kristo <t-kristo@ti.com> Tested-by: NKeerthy <j-keerthy@ti.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Link: https://lore.kernel.org/r/20191223110458.30766-5-peter.ujfalusi@ti.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 24 12月, 2019 2 次提交
-
-
由 Logan Gunthorpe 提交于
Adding a reference count helps drivers to properly implement the unbind while in use case. References are taken and put every time a channel is allocated or freed. Once the final reference is put, the device is removed from the dma_device_list and a release callback function is called to signal the driver to free the memory. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/20191216190120.21374-5-logang@deltatee.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Logan Gunthorpe 提交于
dma_chan_to_owner() dereferences the driver from the struct device to obtain the owner and call module_[get|put](). However, if the backing device is unbound before the dma_device is unregistered, the driver will be cleared and this will cause a NULL pointer dereference. Instead, store a pointer to the owner module in the dma_device struct so the module reference can be properly put when the channel is put, even if the backing device was destroyed first. This change helps to support a safer unbind of DMA engines. If the dma_device is unregistered in the driver's remove function, there's no guarantee that there are no existing clients and a users action may trigger the WARN_ONCE in dma_async_device_unregister() which is unlikely to leave the system in a consistent state. Instead, a better approach is to allow the backing driver to go away and fail any subsequent requests to it. Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/20191216190120.21374-2-logang@deltatee.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 11 12月, 2019 1 次提交
-
-
由 Lukas Wunner 提交于
dmaengine_desc_set_reuse() allocates a struct dma_slave_caps on the stack, populates it using dma_get_slave_caps() and then accesses one of its members. However dma_get_slave_caps() may fail and this isn't accounted for, leading to a legitimate warning of gcc-4.9 (but not newer versions): In file included from drivers/spi/spi-bcm2835.c:19:0: drivers/spi/spi-bcm2835.c: In function 'dmaengine_desc_set_reuse': >> include/linux/dmaengine.h:1370:10: warning: 'caps.descriptor_reuse' is used uninitialized in this function [-Wuninitialized] if (caps.descriptor_reuse) { Fix it, thereby also silencing the gcc-4.9 warning. The issue has been present for 4 years but surfaces only now that the first caller of dmaengine_desc_set_reuse() has been added in spi-bcm2835.c. Another user of reusable DMA descriptors has existed for a while in pxa_camera.c, but it sets the DMA_CTRL_REUSE flag directly instead of calling dmaengine_desc_set_reuse(). Nevertheless, tag this commit for stable in case there are out-of-tree users. Fixes: 27242021 ("dmaengine: Add DMA_CTRL_REUSE") Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NLukas Wunner <lukas@wunner.de> Cc: stable@vger.kernel.org # v4.3+ Link: https://lore.kernel.org/r/ca92998ccc054b4f2bfd60ef3adbab2913171eac.1575546234.git.lukas@wunner.deSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 10 12月, 2019 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20191206132435.29139-1-geert+renesas@glider.beSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 27 5月, 2019 1 次提交
-
-
由 Baolin Wang 提交于
When user try to request one DMA channel by __dma_request_channel(), it won't validate if it is the correct DMA device to request, that will lead each DMA engine driver to validate the correct device node in their filter function if it is necessary. Thus we can add the matching device node validation in the DMA engine core, to remove all of device node validation in the drivers. Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 21 5月, 2019 1 次提交
-
-
由 Thomas Gleixner 提交于
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details the full gnu general public license is included in this distribution in the file called copying extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NSteve Winslow <swinslow@gmail.com> Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org> Reviewed-by: NJilayne Lovejoy <opensource@jilayne.com> Reviewed-by: NAllison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154041.244154651@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 30 7月, 2018 1 次提交
-
-
由 Huang Shijie 提交于
This patch adds the dmaenginem_async_device_register for DMA code. Use the Devres to call the release for the DMA engine driver. Signed-off-by: NHuang Shijie <sjhuang@iluvatar.ai> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 10 7月, 2018 1 次提交
-
-
由 Marek Szyprowski 提交于
'cmd_pause' DMA channel capability means that respective DMA engine supports both pausing and resuming given DMA channel. However, in some cases it is important to know if DMA channel can be paused without the need to resume it. This is a typical requirement for proper residue reading on transfer timeout in UART drivers. There are also some DMA engines with limited hardware, which doesn't really support resuming. Reporting pause and resume capabilities separately allows UART drivers to properly check for the really required capabilities and operate in DMA mode also in systems with limited DMA hardware. On the other hand drivers, which rely on full channel suspend/resume support, should now check for both 'pause' and 'resume' features. Existing clients of dma_get_slave_caps() have been checked and the only driver which rely on proper channel resuming is soc-generic-dmaengine-pcm driver, which has been updated to check the newly added capability. Existing 'cmd_pause' now only indicates that DMA engine support pausing given DMA channel. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 12 2月, 2018 1 次提交
-
-
由 Zi Yan 提交于
When CONFIG_DMA_ENGINE_RAID is enabled, unmap pool size can reach to 256. But in struct dmaengine_unmap_data, map_cnt is only u8, wrapping to 0, if the unmap pool is maximally used. This triggers BUG() when struct dmaengine_unmap_data is freed. Use u16 to fix the problem. Signed-off-by: NZi Yan <zi.yan@cs.rutgers.edu> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 22 9月, 2017 2 次提交
-
-
由 Stefan Brüns 提交于
struct dma_slave_caps documentation omitted the correct kernel-doc opening comment mark. Document byte granularity and interpretation of the src/dst_addr_widths bit flag fields used by struct dma_slave_caps and struct dma_device. Add punctuation to their "directions" member documentations, and cleanup wording of the description. Signed-off-by: NStefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
由 Stefan Brüns 提交于
Commit 93c6ee94 ("dma: Support for 3 bytes word size") and commit 534a7298 ("dmaengine: Add 16 bytes, 32 bytes and 64 bytes bus widths") added additional values for the allowed word size, but omitted these from the struct dma_slave_config documentation. Signed-off-by: NStefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 28 8月, 2017 1 次提交
-
-
由 Abhishek Sahu 提交于
Some of the DMA controllers are capable of issuing the commands to peripheral by the DMA. These commands can be list of register reads/writes and its different from normal data reads/writes. This patch adds new flag DMA_PREP_CMD in DMA API which tells the driver that the data passed to DMA API is command data and DMA controller driver will form descriptor in the required format. This flag can be used by any DMA controller driver which requires the descriptor in different format for non-Data descriptors. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 22 8月, 2017 1 次提交
-
-
由 Dave Jiang 提交于
There are no in kernel consumers for DMA_SG op. Removing operation, dead code, and test code in dmatest. Signed-off-by: NDave Jiang <dave.jiang@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Cc: Gary Hook <gary.hook@amd.com> Cc: Ludovic Desroches <ludovic.desroches@microchip.com> Cc: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Cc: Li Yang <leoyang.li@nxp.com> Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 31 1月, 2017 1 次提交
-
-
由 Boris Brezillon 提交于
Almost all ->device_prep_dma_xx() methods have a wrapper defined in dmaengine.h. Add one for ->device_prep_dma_memcpy(). Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 30 11月, 2016 1 次提交
-
-
由 Peter Ujfalusi 提交于
Some slave devices uses address window instead of single register for read and/or write of data. With the src/dst_port_window_size the address window can be specified and the DMAengine driver should use this information to correctly set up the transfer to loop within the provided window. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 08 8月, 2016 1 次提交
-
-
由 Dave Jiang 提交于
Adding a new callback that will provide the error result for a transaction. The result is allocated on the stack and the callback should create a copy if it wishes to retain the information after exiting. The result parameter is now defined and takes over the dummy void pointer we placed in the helper functions previously. dmaengine drivers should start converting to the new "callback_result" callback in order to receive transaction results. Signed-off-by: NDave Jiang <dave.jiang@intel.com> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 12 4月, 2016 1 次提交
-
-
由 Vinod Koul 提交于
dmaengine has various device callbacks and exposes helper functions to invoke these. These helpers should check if channel, device and callback is valid or not before invoking them. Reported-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 22 2月, 2016 1 次提交
-
-
由 Vinod Koul 提交于
The slave dmaengine semantics required the client to map dma addresses and pass DMA address to dmaengine drivers. This was a convenient notion coming from generic dma offload cases where dmaengines are interchangeable and client is not aware of which engine to map to. But in case of slave, we know the dmaengine and always use a specific one. Further the IOMMU cases can lead to failure of this notion, so make this as physical address and now dmaengine driver will do the required mapping. Original-patch-by: NLinus Walleij <linus.walleij@linaro.org> Original-patch-Acked-by: NLee Jones <lee.jones@linaro.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 09 2月, 2016 1 次提交
-
-
由 Shawn Lin 提交于
This patch add max_burst to dma_get_slave_caps for clients to get the burst capability of slave dma controller. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 18 12月, 2015 1 次提交
-
-
由 Peter Ujfalusi 提交于
The two API function can cover most, if not all current APIs used to request a channel. With minimal effort dmaengine drivers, platforms and dmaengine user drivers can be converted to use the two function. struct dma_chan *dma_request_chan_by_mask(const dma_cap_mask_t *mask); To request any channel matching with the requested capabilities, can be used to request channel for memcpy, memset, xor, etc where no hardware synchronization is needed. struct dma_chan *dma_request_chan(struct device *dev, const char *name); To request a slave channel. 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 needed information from the dma_slave_map provided by the DMA drivers. This legacy mode needs changes in platform code, in dmaengine drivers and finally the dmaengine user drivers can be converted: For each dmaengine driver an array of DMA device, slave and the parameter for the filter function needs to be added: static const struct dma_slave_map da830_edma_map[] = { { "davinci-mcasp.0", "rx", EDMA_FILTER_PARAM(0, 0) }, { "davinci-mcasp.0", "tx", EDMA_FILTER_PARAM(0, 1) }, { "davinci-mcasp.1", "rx", EDMA_FILTER_PARAM(0, 2) }, { "davinci-mcasp.1", "tx", EDMA_FILTER_PARAM(0, 3) }, { "davinci-mcasp.2", "rx", EDMA_FILTER_PARAM(0, 4) }, { "davinci-mcasp.2", "tx", EDMA_FILTER_PARAM(0, 5) }, { "spi_davinci.0", "rx", EDMA_FILTER_PARAM(0, 14) }, { "spi_davinci.0", "tx", EDMA_FILTER_PARAM(0, 15) }, { "da830-mmc.0", "rx", EDMA_FILTER_PARAM(0, 16) }, { "da830-mmc.0", "tx", EDMA_FILTER_PARAM(0, 17) }, { "spi_davinci.1", "rx", EDMA_FILTER_PARAM(0, 18) }, { "spi_davinci.1", "tx", EDMA_FILTER_PARAM(0, 19) }, }; 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: da8xx_edma0_pdata.slave_map = da830_edma_map; da8xx_edma0_pdata.slavecnt = ARRAY_SIZE(da830_edma_map); The DMA driver then needs to configure the needed device -> filter_fn mapping before it registers with dma_async_device_register() : ecc->dma_slave.filter_map.map = info->slave_map; ecc->dma_slave.filter_map.mapcnt = info->slavecnt; ecc->dma_slave.filter_map.fn = edma_filter_fn; When neither DT or ACPI lookup is available the dma_request_chan() will try to match the requester's device name with the filter_map's list of device names, when a match found it will use the information from the dma_slave_map to get the channel with the dma_get_channel() internal function. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 05 12月, 2015 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Implementations of dmaengine_synchronize() are allowed to sleep, hence the function must not be called to from atomic context. Add might_sleep() to dmaengine_synchronize() to make it easier to detect non-compliant callers. Suggested-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-