aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-20Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT"Arnd Bergmann6-72/+80
This reverts commit f9965aa20706860077cfa093d04a6351c0c1e940. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14ARM: dts: pl330: Add #dma-cells for generic dma binding supportPadmavathi Venna2-5/+28
This patch adds #dma-cells property to PL330 DMA controller nodes for supporting generic dma dt bindings on samsung exynos5250 platform. Signed-off-by: Padmavathi Venna <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14DMA: PL330: Register the DMA controller with the generic DMA helpersPadmavathi Venna1-0/+10
This patch registers the pl330 dma controller driver with the generic device tree dma helper functions. Signed-off-by: Padmavathi Venna <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14DMA: PL330: Add xlate functionPadmavathi Venna1-0/+25
Add xlate to translate the device-tree binding information into the appropriate format. The filter function requires the dma controller device and dma channel number as filter_params. Signed-off-by: Padmavathi Venna <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14DMA: PL330: Add new pl330 filter for DT case.Padmavathi Venna1-14/+15
This patch adds a new pl330_dt_filter for DT case to filter the required channel based on the new filter params and modifies the old filter only for non-DT case as suggested by Arnd Bergmann. Signed-off-by: Padmavathi Venna <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dma: tegra20-apb-dma: remove unnecessary assignmentAndy Shevchenko1-1/+0
There is no need to assign 0 to residue, because dma_cookie_status() does this for us. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Laxman Dewangan <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14edma: do not waste memory for dma_maskAndy Shevchenko1-2/+4
Accordingly to commentary in the platform_device_register_full the memory allocated for dma_mask will not going to be freed. That's why is better to assign dma_mask afterwards. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dma: coh901318: set residue only if dma is in progressAndy Shevchenko1-1/+3
When status is DMA_SUCCESS the residue should be zero. Otherwise it's a bug. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Cc: Linus Walleij <[email protected]> Cc: [email protected] Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dma: coh901318: avoid unbalanced lockingAndy Shevchenko1-1/+1
In case the len is 0 we must return without trying to unlock the lock that was not locked. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Cc: Linus Walleij <[email protected]> Cc: [email protected] Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dmaengine.h: remove redundant else keywordAndy Shevchenko1-2/+2
dmaengine_device_control returns -ENOSYS in case the dma driver doesn't have such functionality. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dma: of-dma: protect list write operation by spin_lockAndy Shevchenko1-0/+2
It's possible to have an inconsistency in the list due to unprotected operation on it. The patch adds a proper locking on the list operation. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dmaengine: ste_dma40: do not remove descriptors for cyclic transfersFabio Baltieri1-3/+3
Fix dma_tc_handle() to call d40_desc_remove() and d40_desc_done() only for non-cyclic transfers, as this was breaking ux500_pcm since introduced in: d49278e dmaengine: dma40: Add support to split up large elements Reported-by: Shreshtha Kumar Sahu <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dma: of-dma.c: fix memory leakageCong Ding1-0/+1
The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-14dw_dmac: apply default dma_mask if neededAndy Shevchenko1-0/+6
In some cases we got the device without dma_mask configured. We have to apply the default value to avoid crashes during memory mapping. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-13dmaengine: ioat - fix spare sparse complainFengguang Wu1-1/+1
>> drivers/dma/ioat/dma_v3.c:371:6: sparse: symbol 'ioat3_timer_event' was not declared. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Acked-by: Dave Jiang <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-13dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.cVinod Koul4-1/+7
as requested by Rob Suggested-by: Rob Herring <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-12ioatdma: fix race between updating ioat->head and IOAT_COMPLETION_PENDINGDave Jiang3-97/+128
There is a race that can hit during __cleanup() when the ioat->head pointer is incremented during descriptor submission. The __cleanup() can clear the PENDING flag when it does not see any active descriptors. This causes new submitted descriptors to be ignored because the COMPLETION_PENDING flag is cleared. This was introduced when code was adapted from ioatdma v1 to ioatdma v2. For v2 and v3, IOAT_COMPLETION_PENDING flag will be abandoned and a new flag IOAT_CHAN_ACTIVE will be utilized. This flag will also be protected under the prep_lock when being modified in order to avoid the race. Signed-off-by: Dave Jiang <[email protected]> Reviewed-by: Dan Williams <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-02-12dw_dmac: add support for Lynxpoint DMA controllersMika Westerberg1-0/+6
Intel Lynxpoint PCH Low Power Subsystem has DMA controller to support general purpose serial buses like SPI, I2C, and HSUART. This controller is enumerated from ACPI namespace with ACPI ID INTL9C60. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28dw_dmac: return proper residue valueAndy Shevchenko2-2/+46
Currently the driver returns full length of the active descriptor which is wrong. We have to go throught the active descriptor and substract the length of each sent children in the chain from the total length along with the actual data in the DMA channel registers. The cyclic case is not handled by this patch due to len field in the descriptor structure is left untouched by the original code. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28dw_dmac: fill individual length of descriptorAndy Shevchenko1-0/+3
It will be useful to have the length of the transfer in the descriptor. The cyclic transfer functions remained untouched. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28dw_dmac: introduce total_len field in struct dw_descAndy Shevchenko2-6/+7
By this new field we distinguish a total length of the chain and the individual length of each descriptor in the chain. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28dw_dmac: remove unnecessary tx_list field in dw_dma_chanAndy Shevchenko2-6/+15
The soft LLP mode is working for active descriptor only. So, we do not need to have a copy of its pointer. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28dw_dmac: print out DW_PARAMS and DWC_PARAMS when debugAndy Shevchenko1-0/+5
It's usefull to have the values of the DW_PARAMS and DWC_PARAMS printed when debug mode is enabled. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28DMAEngine: sirf: lock the shared registers access in sirfsoc_dma_terminate_allBarry Song1-1/+3
Just like Russell pointed out in "DMAEngine: sirf: add DMA pause/resume support" at http://www.spinics.net/lists/arm-kernel/msg212496.html here I find sirfsoc_dma_terminate_all() has same problem, so move the locking to the front of registers access. Signed-off-by: Barry Song <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-28DMAEngine: sirf: add DMA pause/resume supportBarry Song1-0/+46
pause/resume are important for users like ALSA sound drivers, this patches make the sirf prima2/marco support DMA commands DMA_PAUSE and DMA_RESUME. Signed-off-by: Barry Song <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-21Merge tag 'ux500-dma40' of //git.linaro.org/people/fabiobaltieri/linux.gitVinod Koul4-143/+518
Pull ste_dma40 fixes from Fabio Signed-off-by: Vinod Koul <[email protected]>
2013-01-20dw_dmac: move soft LLP code from tasklet to dwc_scan_descriptorsAndy Shevchenko1-22/+21
The proper place for the main logic of the soft LLP mode is dwc_scan_descriptors. It prevents to get the transfer unexpectedly aborted in case the user calls dwc_tx_status. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-20dw_dmac: don't exceed AHB master number in dwc_get_data_widthAndy Shevchenko1-13/+20
The driver assumes that hardware has two AHB masters which might not be always true. In such cases we must not exceed number of the AHB masters present in the hardware. In the proposed scheme in this patch, we would choose the master with highest possible number whenever we exceed max AHB masters. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-20dw_dmac: allocate dma descriptors from DMA_COHERENT memoryAndy Shevchenko2-64/+18
Currently descriptors are allocated from normal cacheable memory and that slows down filling the descriptors, as we need to call cache_coherency routines afterwards. It would be better to allocate memory for these descriptors from DMA_COHERENT memory. This would make code much cleaner too. Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Mika Westerberg <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-20dma: sh/shdma-base.c: remove unnecessary null pointer checkCong Ding1-3/+0
the variable chan is dereferenced in line 635, so it is no reason to check null again in line 641. Signed-off-by: Cong Ding <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-20dma: remove unnecessary null pointer check in mmp_pdma.cCong Ding1-4/+2
the pointer cfg is dereferenced in line 594, so it's no reason to check null again in line 620. Signed-off-by: Cong Ding <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-20dma: edma: fix slave config dependency on directionMatt Porter1-28/+27
The edma_slave_config() implementation depends on the direction field such that it will not properly configure a slave channel when called without direction set. This fixes the implementation so that the slave config is copied as is and prep_slave_sg() handles the direction dependent handling. spi-omap2-mcspi and omap_hsmmc both expose this bug as they configure the slave channel config from a common path with an unconfigured direction field. Signed-off-by: Matt Porter <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-14dmaengine: set_dma40: balance clock in probe fail codeFabio Baltieri1-1/+1
Clock code was changed to use clk_prepare_enable in: b707c65 dma/ste_dma40: Fixup clock usage during probe but clk_disable on probe fail path was not updated. This patch fix this by using clk_disable_unprepare in place of clk_disable. Acked-by: Ulf Hansson <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: set_dma40: ignore spurious interruptsFabio Baltieri1-3/+12
Some DMA channels may be used by other cores in the SoC. This patch modifies the dma interrupt handler to ignore interrupts from unknown channels. Cc: Rabin Vincent <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: add software lli supportFabio Baltieri2-1/+27
This patch add support to manage LLI by SW for select phy channels. There is a HW issue in certain controllers due to which on certain occassions HW LLI cannot be used on some physical channels. To avoid the HW issue on a specific phy channel, the phy channel number can be added to the list of soft_lli_channels and there after all the transfers on that channel will use software LLI, for peripheral to memory transfers. SoftLLI introduces relink overhead, that could impact performace for certain use cases. This is based on a previous patch of Narayanan Gopalakrishnan. Cc: Shreshtha Kumar Sahu <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: minor code readability fixesFabio Baltieri1-9/+8
Use internal variables to the cycles to improve code readability, no functional changes. Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: minor cosmetic fixesFabio Baltieri2-22/+13
This patch contains various non functional cosmetic fixes. Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: add missing kernel-doc entryFabio Baltieri1-0/+1
Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: add a done queue for completed descriptorsFabio Baltieri1-4/+33
This is to keep the active queue for only those transfers which are actually active in the hardware. Descriptors will be moved to the done queue after they are completed in the hardware (interrupt handler) but before all the cleanup work has been completed (tasklet). Mostly based on a previous patch by Rabin Vincent. Cc: Rabin Vincent <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: support more than 128 event linesTong Liu2-81/+355
U8540 DMA controller is different from u9540 we need define new registers and use them to support handling more than 128 event lines. Signed-off-by: Tong Liu <[email protected]> Reviewed-by: Per Forlin <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: physical channels number correctionGerald Baeza2-5/+14
DMAC_ICFG[0:2]=SCHNB only allows to count 'multiple of 4' physical channels so it was ok with platforms having 8 channels but cannot be used for next versions (with 10 or 14 channels). This patch allows to provide the number of physical channels for a DMA device via platform_data, or still rely on SCHNB if platform_data announces 0 channel. Signed-off-by: Gerald Baeza <[email protected]> Reviewed-by: Per Forlin <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: support fixed physical channel allocationGerald Baeza1-2/+11
This patch makes existing use_fixed_channel field (of stedma40_chan_cfg structure) applicable to physical channels. Signed-off-by: Gerald Baeza <[email protected]> Tested-by: Yannick Fertre <[email protected]> Reviewed-by: Per Forlin <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: don't allow high priority dest event linesRabin Vincent1-1/+14
Hardware bug: when a logical channel is triggerred by a high priority destination event line, an extra packet transaction is generated in case of important data write response latency on previous logical channel A and if the source transfer of current logical channel B is already completed and if no other channel with a higher priority than B is waiting for execution. Software workaround: do not set the high priority level for the destination event lines that trigger logical channels. Signed-off-by: Rabin Vincent <[email protected]> Reviewed-by: Shreshtha Kumar Sahu <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: don't check for pm_runtime_suspended()Narayanan G1-2/+0
The check for runtime suspend is not needed during a regular suspend, as the framework takes care of this. This fixes the issue of DMA driver not letting the system to go to deepsleep in the first attempt. Signed-off-by: Narayanan G <[email protected]> Reviewed-by: Rabin Vincent <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: limit burst size to 16Per Forlin1-0/+8
The client is not aware of the maximum burst size in the dma driver. If the size exceeds 16 set max to 16. Signed-off-by: Per Forlin <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: set dma max seg sizePer Forlin1-0/+8
Maximum DMA seg size is (0xffff x data_width). If max seg size is not set it deafults to 64k. This results in failure if transferring 64k in byte mode. Large seg sizes may be supported by splitting large transfer. Signed-off-by: Per Forlin <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: use writel_relaxed for lcxaPer Forlin1-8/+8
lcpa and lcla are written often and the cache_sync() overhead in writel is costly, especially for wlan where every single network packet (in RX mode) corresponds to a separate DMA transfer. Signed-off-by: Per Forlin <[email protected]> Reviewed-by: Narayanan Gopalakrishnan <[email protected]> Reviewed-by: Rabin Vincent <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-14dmaengine: ste_dma40: reset priority bit for logical channelsNarayanan1-5/+6
This patch sets the SSCFG/SDCFG bit[7] PRI only for physical channel requests with high priority. For logical channels, this bit will be zero. Signed-off-by: Narayanan G <[email protected]> Reviewed-by: Rabin Vincent <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]>
2013-01-13pl080.h: moved from arm/include/asm/hardware to include/linux/amba/Alessandro Rubini5-5/+4
The header is used by drivers/dma/amba-pl08x.c, which can be compiled under x86, where PL080 exists under a PCI-to-AMBA bridge. This patche moves it where it can be accessed by other architectures, and fixes all users. Signed-off-by: Alessandro Rubini <[email protected]> Acked-by: Giancarlo Asnaghi <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-12dma: dw_dmac: clear suspend bit during terminationHeikki Krogerus1-1/+1
The DMA transfer could not be established if previously it was paused and terminated. In that case the channel's suspend bit remains set that prevents to transfer anything until channel is resumed. The patch adds the dwc_chan_resume() call instead of a plain flag assignment. That clears the DWC_CFGL_CH_SUSP bit as well during termination. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>