summaryrefslogtreecommitdiff
path: root/drivers/dma
AgeCommit message (Collapse)AuthorFilesLines
2014-09-24dmaengine: sun6i: Remove obsolete clk muxing codeChen-Yu Tsai1-23/+0
The sun6i DMA controller requires the AHB1 bus clock to be clocked from PLL6. This was originally done by the dmaengine driver during probe time. The AHB1 clock driver has since been unified, so the original code does not work. Remove the clk muxing code, and replace it with DT clk default properties. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: Kconfig: Include mx6 in the IMX_SDMA help sectionFabio Estevam1-1/+1
MX6 processors also use the IMX_SDMA driver, so include it in the help text. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dmatest: prevent memory leakage on error path in threadAndy Shevchenko1-2/+2
When we fail to allocate memory for thread->srcs or thread->dsts and src_cnt or dst_cnt great than 1 we leak memory on error path. This patch fixes the issue. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Add support for DMA_INTERRUPTLior Amsalem2-5/+40
The driver is capable of supporting DMA_INTERRUPT by issuing a dummy 128-byte transfer. This helps removing a poll in the async_tx stack, replacing it with a completion interrupt. Signed-off-by: Lior Amsalem <alior@marvell.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Remove dead codeEzequiel Garcia2-22/+0
The driver currently defines the USE_TIMER macro, but the timer-feature is never used in the code. The XOR and CRC32 results are never used. The 'unmap_xxx' fields are no longer needed, they were made obsolete in commit: 54f8d501e842 dmaengine: remove DMA unmap from drivers. Let's remove all this dead code. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Reduce interrupts by enabling EOD only when neededLior Amsalem2-5/+11
This commit unmasks the end-of-chain interrupt and removes the end-of-descriptor command setting on all transactions, except those explicitly flagged with DMA_PREP_INTERRUPT. This allows to raise an interrupt only on chain completion, instead of on each descriptor completion, which reduces interrupt count. Signed-off-by: Lior Amsalem <alior@marvell.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Remove all interrupt magic numbersEzequiel Garcia2-20/+30
This commit replaces the current magic numbers in the interrupt handling with proper macros, which makes more readable and self-documenting. While here replace the BUG() with a noisy WARN_ON(). There's no reason to tear down the entire system for an DMA IRQ error. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Remove multi-slot supportLior Amsalem2-93/+32
Although the driver supported multiple-slot allocation, only one slot was ever allocated for each transaction. So, given we have no users of the multi-slot support, we can remove it and greatly simplify the code. Signed-off-by: Lior Amsalem <alior@marvell.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Simplify the DMA_MEMCPY operationLior Amsalem1-65/+12
A memory copy operation can be expressed as an XOR operation with one source. This commit removes code duplication in the driver by reusing the XOR operation for the MEMCPY. As an added benefit, we can now put MEMCPY and XOR descriptors on the same chain, which improves performance. Signed-off-by: Lior Amsalem <alior@marvell.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dma: mv_xor: Replace printk with dev_infoEzequiel Garcia1-2/+3
This commit replaces a printk(KERN_INFO ...) call with a dev_info() call, which is prefered for drivers. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dmaengine: omap-dma: Restore the CLINK_CTRL in resume pathPeter Ujfalusi1-0/+3
When the audio stream is paused or suspended we stop the sDMA and when it is unpaused/resumed we start the channel without reconfiguring it. The omap_dma_stop() clears the link configuration when we pause the dma, but it is not setting it back on start. This will result only one audio buffer to be played back and the DMA will stop, since the linking is disabled. We need to restore the CLINK_CTRL register in case of resume. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-23dmaengine: omap-dma: Add memory barrier to dma_resume pathPeter Ujfalusi1-0/+2
Add mb() call to resume path to ensure the necessary barrier. Resume can happen after waking up from suspend for example. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: dw: add PCI IDs for Braswell DMAsAndy Shevchenko1-0/+4
Braswell SoC has two DMA controllers for LPSS. This patch adds them to supported list in the PCI driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: dw: move clock operations to platform.cAndy Shevchenko4-20/+24
On BayTrail platform DMA is not functional in the PCI mode, whereby it always failed and exit at the point when it tries to get a clock. It causes the PCI mode probe to exit with the error message: dw_dmac_pci: probe of 0000:00:1e.0 failed with error -2 This patch moves clock operations to where it belongs to. Thus, the clock is provided only in ACPI / non-PCI cases. Reported-by: Chew, Chiau Ee <chiau.ee.chew@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: dw: introduce generic filter functionAndy Shevchenko3-67/+40
The introduced filter function would be reused in the ACPI and DT cases since in those cases we have to apply mandatory data to the requested channel. Thus, patch moves platform driver to use it in that case. The function unlikely can't be used by users of the driver due to an implicit dependency to the dw_dmac_core module. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: dw: apply both HS interfaces and remove slave_id usageAndy Shevchenko3-35/+10
Instead of one request line member let's use both source and destination ones. Usually we have no such hardware except Atmel MMC controller found on AVR32 platform (see arch/avr32/mach-at32ap/at32ap700x.c and drivers/mmc/host/atmel-mci.c). This patch removes slave_id usage since it'll be removed from the generic structure in later. This breaks the non-ACPI / non-DT cases for the users of the driver, i.e. SPI and HSUART. However, these cases mean only PCI enumerated devices for now, which is anyway broken (considering more than one DMA controller in the system) and this patch series is intended to fix that eventually. The ACPI and DT cases shall be aware of the channel direction when setting request lines, but this is a minor problem that would be addressed in future. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: dw: convert dw_dma_slave to use explicit HS interfacesAndy Shevchenko1-2/+2
Instead of exposing the possibility to set DMA registers CFG_HI and CFG_LO strict user to provide handshake interfaces explicitly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: dw: move dw_dmac.h to where it belongs toAndy Shevchenko2-4/+4
There is a common storage for platform data related structures and definitions inside kernel source tree. The patch moves file from include/linux to include/linux/platform_data and renames it acoordingly. The users are also updated. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> [For the arch/avr32/.* and .*sound/atmel.*] Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: jz4740: Fix non-cyclic descriptor completionLars-Peter Clausen1-1/+2
We need to make sure to deqeueue the descriptor from the active list before we call vchan_cookie_complete(). Also we need obviously only set chan->desc to NULL after we stopped using it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11dmaengine: mmp_tdma: add DMA_PREP_INTERRUPT flag supportQiao Zhou1-5/+14
add DMA_PREP_INTERRUPT flag to support no_period_wakeup, in which user space app doesn't want audio interrupt to wake up audio threads. Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-28dma: imx-sdma: Remove spurious __init annotation on sdma_probe()Mark Brown1-1/+1
We can't annotate probe functions as __init since binding can occur at any time, not just during kernel init. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-28dma: rcar-audmapp: Fix for no corresponding slave IDRyo Kataoka1-5/+10
In case of no corresponding slave ID, the audmapp_set_slave() returns -ENXIO same as sh_dmae_set_slave() of shdmac.c. DMAEngine might return wrong channel without this patch Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com> Signed-off-by: Jun Watanabe <jun.watanabe.ue@renesas.com>, Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-22dmatest: prevent memory leakage on error path in threadAndy Shevchenko1-2/+2
When we fail to allocate memory for thread->srcs or thread->dsts and src_cnt or dst_cnt great than 1 we leak memory on error path. This patch fixes the issue. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2014-08-21ioat: Use time_before_jiffies()Manuel Schölling1-1/+2
To be future-proof and for better readability the time comparisons are modified to use time_before_jiffies() instead of plain, error-prone math. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> [djbw: use time_before_jiffies() to make argument order more clear] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2014-08-19dma: xilinx: Remove .owner field for driverMichal Simek1-1/+0
There is no need to init .owner field. Based on the patch from Peter Griffin <peter.griffin@linaro.org> "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Levente Kurusa <lkurusa@redhat.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-19dma: imx-sdma: Adding tasklet_kill() in sdma_remove function.Vignesh Raman1-0/+7
Several dma drivers calls tasklet_kill() in remove function. This is done because all running tasklets should be killed on remove. This is missing in imx sdma driver, so adding tasklet_kill() in sdma_remove function. Signed-off-by: Vignesh Raman <Vignesh_Raman@mentor.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-19dma: imx-sdma: use module_platform_driver for SDMA driverVignesh Raman1-6/+18
Currently there is no module_exit declared in SDMA driver, so that once sdma module is inserted, it's shown with permanent attribute by lsmod, and it can't be removed. Use module_platform_driver to register/unregister SDMA driver and modify SDMA's remove operation, to make SDMA driver possible to be removed. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-11Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds38-873/+3526
Pull slave-dma updates from Vinod Koul: "Some notable changes are: - new driver for AMBA AXI NBPF by Guennadi - new driver for sun6i controller by Maxime - pl330 drivers fixes from Lar's - sh-dma updates and fixes from Laurent, Geert and Kuninori - Documentation updates from Geert - drivers fixes and updates spread over dw, edma, freescale, mpc512x etc.." * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (72 commits) dmaengine: sun6i: depends on RESET_CONTROLLER dma: at_hdmac: fix invalid remaining bytes detection dmaengine: nbpfaxi: don't build this driver where it cannot be used dmaengine: nbpf_error_get_channel() can be static dma: pl08x: Use correct specifier for size_t values dmaengine: Remove the context argument to the prep_dma_cyclic operation dmaengine: nbpfaxi: convert to tasklet dmaengine: nbpfaxi: fix a theoretical race dmaengine: add a driver for AMBA AXI NBPF DMAC IP cores dmaengine: add device tree binding documentation for the nbpfaxi driver dmaengine: edma: Do not register second device when booted with DT dmaengine: edma: Do not change the error code returned from edma_alloc_slot dmaengine: rcar-dmac: Add device tree bindings documentation dmaengine: shdma: Allocate cyclic sg list dynamically dmaengine: shdma: Make channel filter ignore unrelated devices dmaengine: sh: Rework Kconfig and Makefile dmaengine: sun6i: Fix memory leaks dmaengine: sun6i: Free the interrupt before killing the tasklet dmaengine: sun6i: Remove switch statement from buswidth convertion routine dmaengine: of: kconfig: select DMA_ENGINE when DMA_OF is selected ...
2014-08-08dmaengine: sun6i: depends on RESET_CONTROLLERMaxime Ripard1-0/+1
Fixes a compilation error when RESET_CONTROLLER is not enabled in the configuration. drivers/dma/sun6i-dma.c: In function 'sun6i_dma_probe': drivers/dma/sun6i-dma.c:911:2: error: implicit declaration of function 'devm_reset_control_get' [-Werror=implicit-function-declaration] Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-07dma: at_hdmac: fix invalid remaining bytes detectionAlexandre Belloni1-5/+7
Found using smatch: drivers/dma/at_hdmac.c:299 atc_get_bytes_left() warn: unsigned 'atchan->remain_desc' is never less than zero. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-07dmaengine: nbpfaxi: don't build this driver where it cannot be usedGuennadi Liakhovetski1-0/+1
Although this driver doesn't have any explicit compile-time architecture dependencies, it is better not to bloat kernels on those platforms, where this driver isn't needed, unless a compile test is being performed. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-07Merge tag 'sound-3.17-rc1' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "There've been many updates in ASoC side at this time, especially the framework enhancement for multiple CODECs on a single DAI and more componentization works. The only major change in ALSA core is the addition of timestamp type in sw_params field. This should behave in backward compatible way. Other than that, there are lots of small changes and new drivers in wide range, including a large code cut in HD-audio driver for deprecated static quirks. Some highlights are below: ALSA Core: - Add the new timestamp type field to sw_params to choose MONOTONIC_RAW type HD-audio: - Continued conversion to standard printk macros, generic code cleanups - Removal of obsoleted static quirk codes for Conexant and C-Media codecs - Fixups for HP Envy TS, Dell XPS 15, HP and Dell mute/mic LED, Gigabyte BXBT-2807 mobo - Intel Braswell support ASoC: - Support for multiple CODECs attached to a single DAI, enabling systems with for example multiple DAC/speaker drivers on a single link, contributed by Benoit Cousson based on work from Misael Lopez Cruz - Support for byte controls larger than 256 bytes based on the use of TLVs contributed by Omair Mohammed Abdullah - More componentisation work from Lars-Peter Clausen - The remainder of the conversions of CODEC drivers to params_width() by Mark Brown - Drivers for Cirrus Logic CS4265, Freescale i.MX ASRC blocks, Realtek RT286 and RT5670, Rockchip RK3xxx I2S controllers and Texas Instruments TAS2552 - Lots of updates and fixes, especially to the DaVinci, Intel, Freescale, Realtek, and rcar drivers" * tag 'sound-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (402 commits) ALSA: usb-audio: Whitespace cleanups for sound/usb/midi.* ALSA: usb-audio: Respond to suspend and resume callbacks for MIDI input sound/oss/pss: Remove typedefs pss_mixerdata and pss_confdata sound/oss/opl3: Remove typedef opl_devinfo ALSA: fireworks: fix specifiers in format strings for propper output ASoC: imx-audmux: Use uintptr_t for port numbers ASoC: davinci: Enable menuconfig entry for McASP ASoC: fsl_asrc: Don't access members of config before checking it ASoC: fsl_sarc_dma: Check pair before using it ASoC: adau1977: Fix truncation warning on 64 bit architectures ALSA: virtuoso: add Xonar Essence STX II support ALSA: riptide: fix %d confusingly prefixed with 0x in format strings ALSA: fireworks: fix %d confusingly prefixed with 0x in format strings ALSA: hda - add codec ID for Braswell display audio codec ALSA: hda - add PCI IDs for Intel Braswell ALSA: usb-audio: Adjust Gamecom 780 volume level ALSA: usb-audio: improve dmesg source grepability ASoC: rt5670: Fix duplicate const warnings ASoC: rt5670: Staticise non-exported symbols ASoC: Intel: update stream only on stream IPC msgs ...
2014-08-05dmaengine: nbpf_error_get_channel() can be staticFengguang Wu1-1/+1
CC: Guennadi Liakhovetski <g.liakhovetski@gmx.de> CC: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-04Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown1-0/+1
2014-08-04dma: pl08x: Use correct specifier for size_t valuesMark Brown1-2/+2
When printing size_t values we should use the %zd or %zx format specifier in order to ensure the value is displayed correctly and avoid warnings from sparse. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-04dmaengine: Remove the context argument to the prep_dma_cyclic operationLaurent Pinchart20-26/+20
The argument is always set to NULL and never used. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-04dmaengine: nbpfaxi: convert to taskletGuennadi Liakhovetski1-7/+12
It is common among dmaengine drivers to use a tasklet for bottom half interrupt processing. Convert nbpfaxi to do the same. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-04dmaengine: nbpfaxi: fix a theoretical raceGuennadi Liakhovetski1-0/+1
A race possibility exists if a DMA slave driver tries to free channel resources witout waiting for all transfers to complete and without explicitly terminating all requests. In such a case the IRQ processing thread can race with .device_free_chan_resources(). To fix this race empty all descriptor lists before freeing descriptor cache. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-04dmaengine: add a driver for AMBA AXI NBPF DMAC IP coresGuennadi Liakhovetski3-0/+1518
This patch adds a driver for NBPF DMAC IP cores from Renesas, designed for the AMBA AXI bus. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-31dmaengine: edma: Do not register second device when booted with DTPeter Ujfalusi1-1/+2
DT boot does not yet support more than one edma device. To avoid issues at runtime we should not register the second device when the kernel is booted with DT. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-31dmaengine: edma: Do not change the error code returned from edma_alloc_slotPeter Ujfalusi1-1/+1
In case of edma_alloc_slot() failure during probe we should return the error unchanged to make debugging easier. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-31dmaengine: shdma: Allocate cyclic sg list dynamicallyLaurent Pinchart1-2/+15
The sg list used to prepare cyclic DMA descriptors is currently allocated statically on the stack as an array of 32 elements. This makes the shdma_prep_dma_cyclic() function consume a lot of stack space, as reported by the compiler: drivers/dma/sh/shdma-base.c: In function ‘shdma_prep_dma_cyclic’: drivers/dma/sh/shdma-base.c:715:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] Given the limited Linux kernel stack size, this could lead to stack overflows. Fix the problem by allocating the sg list dynamically. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-31dmaengine: shdma: Make channel filter ignore unrelated devicesLaurent Pinchart1-39/+45
The shdma_chan_filter() function relies on the DMA channel being embedded in an shdma_chan structure. If this assumption isn't true, for instance when the system contains DMA channels supported by an unrelated driver, the function will crash. Avoid this by returning false directly when the channel belongs to an unrelated device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-31dmaengine: sh: Rework Kconfig and MakefileLaurent Pinchart3-10/+32
Separate helpers and drivers in the Kconfig and Makefile to improve readability and move the CONFIG_OF dependency from the Makefile to Kconfig. [pebolle@tiscali.nl: reported need to rename SHDMA_R8A73A4 instances] Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> [horms+renesas@verge.net.au: squashed rename of SHDMA_R8A73A4 instances] Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-30dmaengine: sun6i: Fix memory leaksMaxime Ripard1-9/+12
The sun6i_dma_prep_memcpy and sun6i_dma_prep_slave_sg functions were both leaking the descriptor they allocated if an error was happening after a successful dma_pool_alloc call. It also fixes a memleak that was happening in the scatter gather list traversal, that was allocating as much descriptor as there was scatter gather items, but only freeing the current descriptor if an error was to arise. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-30dmaengine: sun6i: Free the interrupt before killing the taskletMaxime Ripard1-2/+2
There's still a small window between the call to sun6i_kill_tasklet and the end of the driver remove function where a spurious interrupt might trigger, and start using deallocated resources. Replace the call to synchronize_irq by a free_irq, so that we're sure that we won't get any further interrupts when we're deallocating resources. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-30dmaengine: sun6i: Remove switch statement from buswidth convertion routineMaxime Ripard1-12/+3
Since the conversion routine is quite trivial, we don't need this switch, and we can just use a simple calculation. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-30dmaengine: of: kconfig: select DMA_ENGINE when DMA_OF is selectedAlexander Popov1-0/+1
Select DMA_ENGINE when DMA_OF is selected since of_dma_xlate_by_chan_id() from drivers/dma/of-dma.c uses dma_get_slave_channel() from drivers/dma/dmaengine.c This resolves error reported: drivers/built-in.o: In function `of_dma_xlate_by_chan_id': drivers/dma/of-dma.c:253: undefined reference to `dma_get_slave_channel' Signed-off-by: Alexander Popov <a13xp0p0v88@gmail.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-28Merge commit 'renesas-rcar-audmapp-for-v3.17' into for-linusVinod Koul1-30/+84
2014-07-28dmaengine: edma: Serve cyclic (audio) channels with high priority queuePeter Ujfalusi1-0/+8
Move the DMA channel used in cyclic mode (audio) to the highest priority event queue which helps to reduce audio problems. When the channel is terminated, move it back to the default queue. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>