aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* dmaengine: nbpfaxi: don't build this driver where it cannot be usedGuennadi Liakhovetski2014-08-07
| | | | | | | | | 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>
* dmaengine: nbpf_error_get_channel() can be staticFengguang Wu2014-08-05
| | | | | | | 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>
* dma: pl08x: Use correct specifier for size_t valuesMark Brown2014-08-04
| | | | | | | | | 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>
* dmaengine: Remove the context argument to the prep_dma_cyclic operationLaurent Pinchart2014-08-04
| | | | | | | 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>
* dmaengine: nbpfaxi: convert to taskletGuennadi Liakhovetski2014-08-04
| | | | | | | | 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>
* dmaengine: nbpfaxi: fix a theoretical raceGuennadi Liakhovetski2014-08-04
| | | | | | | | | | | 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>
* dmaengine: add a driver for AMBA AXI NBPF DMAC IP coresGuennadi Liakhovetski2014-08-04
| | | | | | | | 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>
* dmaengine: add device tree binding documentation for the nbpfaxi driverGuennadi Liakhovetski2014-08-04
| | | | | | | | | | The nbpfaxi dmaengine driver doesn't define any new bindings, it only uses standard dmaengine bindings and defines 3 flags for the 3rd parameter of the "dmas" property. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* dmaengine: edma: Do not register second device when booted with DTPeter Ujfalusi2014-07-31
| | | | | | | | | 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>
* dmaengine: edma: Do not change the error code returned from edma_alloc_slotPeter Ujfalusi2014-07-31
| | | | | | | | 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>
* dmaengine: rcar-dmac: Add device tree bindings documentationLaurent Pinchart2014-07-31
| | | | | | | | | | Document the device tree bindings for the R-Car Generation 2 DMA Controller (DMAC). Cc: devicetree@vger.kernel.org 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>
* dmaengine: shdma: Allocate cyclic sg list dynamicallyLaurent Pinchart2014-07-31
| | | | | | | | | | | | | | | | | | 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>
* dmaengine: shdma: Make channel filter ignore unrelated devicesLaurent Pinchart2014-07-31
| | | | | | | | | | | | | | 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>
* dmaengine: sh: Rework Kconfig and MakefileLaurent Pinchart2014-07-31
| | | | | | | | | | | | | 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>
* dmaengine: sun6i: Fix memory leaksMaxime Ripard2014-07-30
| | | | | | | | | | | | | | 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>
* dmaengine: sun6i: Free the interrupt before killing the taskletMaxime Ripard2014-07-30
| | | | | | | | | | | | 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>
* dmaengine: sun6i: Remove switch statement from buswidth convertion routineMaxime Ripard2014-07-30
| | | | | | | | 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>
* dmaengine: of: kconfig: select DMA_ENGINE when DMA_OF is selectedAlexander Popov2014-07-30
| | | | | | | | | | | | | | | 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>
* Merge commit 'renesas-rcar-audmapp-for-v3.17' into for-linusVinod Koul2014-07-28
|\
| * dma: rcar-audmapp: add DT supportKuninori Morimoto2014-07-11
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds DT support to Audio DMAC peri peri driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> [horms+renesas@verge.net.au: Do not add trailing blank line to rcar-audmapp.txt] [horms+renesas@verge.net.au: squashed patch to add NULL terminater to audmapp_of_match] Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
| * dma: rcar-audmapp: don't keep audmapp_slave_config for each channelesKuninori Morimoto2014-07-08
| | | | | | | | | | | | | | | | | | | | | | Current audmapp driver is keeping audmapp_slave_config for each channeles, but, nessasary information is only "chcr". Current style (= keeping audmapp_slave_config) is not good match for DT support. Keep "chcr" instead of audmapp_slave_config Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
| * dma: rcar-audmapp: enable .set_slaveKuninori Morimoto2014-07-08
| | | | | | | | | | | | | | | | | | | | Current .set_slave callback did nothing, since it assumed src/dst address come from platform settings. But, it isn't good match to DT probing. This patch enables .set_slave callback to this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
* | dmaengine: edma: Serve cyclic (audio) channels with high priority queuePeter Ujfalusi2014-07-28
| | | | | | | | | | | | | | | | | | 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>
* | ARM: edma: Add edma_assign_channel_eventq() to move channel to a give queuePeter Ujfalusi2014-07-28
| | | | | | | | | | | | | | | | | | | | In some cases it is desired to move a channel to a specific event queue. Such a use case is audio, where it is preferred that it is served with highest priority compared to other DMA clients. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | ARM: edma: Set default queue to lowest priorityPeter Ujfalusi2014-07-28
| | | | | | | | | | | | | | | | Use the lowest priority queue as default for clients. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: edma: Support to suppress the period interrupts in cyclic modePeter Ujfalusi2014-07-28
| | | | | | | | | | | | | | | | | | | | If the client (audio) does not request interrupts for every period we can disable them. With updated audio driver stack we can play audio w/o the need to process any edma interrupts. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: edma: Update caps->residue_granularity to match with realityPeter Ujfalusi2014-07-28
| | | | | | | | | | | | | | | | The edma can report accurate DMA position so update the residue_granularity to DMA_RESIDUE_GRANULARITY_BURST. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: sun61: fix warning on bad print specfierVinod Koul2014-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The sg_dma_len() returns unsigned int but we had driver print it as %zu, use %u as documented in Documentation/printk-formats.txt drivers/dma/sun6i-dma.c: In function ‘sun6i_dma_prep_slave_sg’: drivers/dma/sun6i-dma.c:643: warning: format ‘%zu’ expects type ‘size_t’, but argument 8 has type ‘unsigned int’ drivers/dma/sun6i-dma.c:661: warning: format ‘%zu’ expects type ‘size_t’, but argument 8 has type ‘unsigned int’ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: sun6i: fix build failure on x86, xilinx targetsVinod Koul2014-07-28
| | | | | | | | | | | | | | | | | | | | | | | | Since the driver defined COMPILE_TEST, it gets compiled for different arch's The driver uses __virt_to_phys() insteadof virt_to_phys, so replace it drivers/dma/sun6i-dma.c: In function ‘sun6i_dma_dump_chan_regs’: drivers/dma/sun6i-dma.c:203: error: implicit declaration of function '__virt_to_phys' Reported-by: kbuild test robot <fengguang.wu@intel.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: mpc512x: register for device tree channel lookupAlexander Popov2014-07-25
| | | | | | | | | | | | | | | | | | Register the controller for device tree based lookup of DMA channels (non-fatal for backwards compatibility with older device trees) and provide the '#dma-cells' property in the shared mpc5121.dtsi file Signed-off-by: Alexander Popov <a13xp0p0v88@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: of: add common xlate function for matching by channel idAlexander Popov2014-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new common OF dma xlate callback function which will match a channel by it's id. The binding expects one integer argument which it will use to lookup the channel by the id. Unlike of_dma_simple_xlate this function is able to handle a system with multiple DMA controllers. When registering the of dma provider with of_dma_controller_register a pointer to the dma_device struct which is associated with the dt node needs to passed as the data parameter. New function will use this pointer to match only channels which belong to the specified DMA controller. Signed-off-by: Alexander Popov <a13xp0p0v88@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: mpc512x: add device tree binding documentAlexander Popov2014-07-25
| | | | | | | | | | | | | | Introduce a device tree binding document for the MPC512x DMA controller Signed-off-by: Alexander Popov <a13xp0p0v88@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: sun6i: Add driver for the Allwinner A31 DMA controllerMaxime Ripard2014-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Allwinner A31 has a 16 channels DMA controller that it shares with the newer A23. Although sharing some similarities with the DMA controller of the older Allwinner SoCs, it's significantly different, I don't expect it to be possible to share the driver for these two. The A31 Controller is able to memory-to-memory or memory-to-device transfers on the 16 channels in parallel. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | Documentation: dt: Add Allwinner A31 DMA controller bindingsMaxime Ripard2014-07-25
| | | | | | | | | | | | | | | | The Allwinner A31 DMA controller is rather simple to describe in the DT. Add the bindings documentation. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: ipu: use return value of request_irqVinod Koul2014-07-25
| | | | | | | | | | | | | | | | | | | | | | Commit - 653e67f7e5: "dmaengine: inherit debug settings from the subsystem for subdirectories" introduced debug option for subdirectories too This exposed issue with ipu driver not using return value For now just warn users about it Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: jz4740: Fix GPL v2 license string typoBjorn Helgaas2014-07-25
| | | | | | | | | | | | | | | | | | | | Per license_is_gpl_compatible(), the MODULE_LICENSE() string for GPL v2 is "GPL v2", not "GPLv2". Use "GPL v2" so this module doesn't taint the kernel. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: Remove unused definition of DMA_MAX_COOKIEGeert Uytterhoeven2014-07-25
| | | | | | | | | | | | | | | | As of commit commit f04cd40701deace2efb9edd7120e59366bda2118 ("fsldma: fix controller lockups"), its last (and only ever) user is gone. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: Clarify device parameter for dma_sync_*_for_*()Geert Uytterhoeven2014-07-25
| | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: fsl-edma: fix dmamux index calculating errorJingchang Lu2014-07-25
| | | | | | | | | | | | Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com> Tested-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: imx-sdma: Add a new DMATYPE for Shared Peripheral ASRCNicolin Chen2014-07-25
| | | | | | | | | | | | | | | | | | Shared Peripheral ASRC, running on SPBA, needs to use shp sciprts for DMA transfer. So this patch just adds a new DMATYPE for it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: imx-sdma: Save imx_dma_data into sdmacNicolin Chen2014-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | The filter() function is currently called by xlate() while it transfers imx_dma_data as a local variable to the filter() but releases the data right after returning a DMA channel pointer, which results chan->private pointing an invalid memory space. So this patch just stores the imx_dma_data into sdmac to make usre the private pointer valid as long as the channel exists. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: pl330: Check if the DMA descriptor is NULLJavier Martinez Canillas2014-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6079d38 ("dmaengine: pl330: Remove useless xfer_cb indirection") removed the __callback() function which created an unnecessary level of indirection to execute the tranfer callback .xfer_cb Unfortunately the commit also changed the semantics slightly since that function used to check if the request was not NULL before attempting to execute the callback function. Not checking this could lead to a kernel NULL pointer dereference error. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | Merge commit 'renesas-shdma-for-v3.17' into for-linusVinod Koul2014-07-21
|\ \
| * | dmaengine: shdma: Use defines instead of hardcoded numbersGeert Uytterhoeven2014-07-15
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
| * | sh: dma: Use defines instead of hardcoded numbersGeert Uytterhoeven2014-07-15
| | | | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
| * | dmaengine: shdma: Add more register documentationGeert Uytterhoeven2014-07-09
| |/ | | | | | | | | | | | | Also add a few definitions that were missing. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
* | dmaengine: dw: don't perform DMA when dmaengine_submit is calledAndy Shevchenko2014-07-15
| | | | | | | | | | | | | | | | | | | | | | | | Accordingly to discussion [1] and followed up documentation the DMA controller driver shouldn't start any DMA operations when dmaengine_submit() is called. This patch fixes the workflow in dw_dmac driver to follow the documentation. [1] http://www.spinics.net/lists/arm-kernel/msg125987.html Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: dw: add debug message to dwc_dostart_first_queuedAndy Shevchenko2014-07-15
| | | | | | | | | | | | | | | | It would be useful to know when the first descriptor in the queue is started along with its cookie. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: dw: introduce dwc_dostart_first_queued() helperAndy Shevchenko2014-07-15
| | | | | | | | | | | | | | | | We have a duplicate code which starts first descriptor in the queue. Let's make this as a separate helper that can be used in future as well. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | dmaengine: dma40: add signal documentation to the device tree bindingsLinus Walleij2014-07-15
| | | | | | | | | | | | | | | | | | | | | | | | The DMA40 device tree documentation was vague on the second cell passed in the configuration node for consumers, and did not specify what the available signals were connected to. Extend the documentation with this information for the DB8500 ASIC. Reported-by: Pawel Kulakowski <pawel.kulakowski@tieto.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>