aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma
AgeCommit message (Collapse)AuthorFilesLines
2013-01-12dma: ste_dma40: reuse is_slave_direction helperAndy Shevchenko1-1/+1
The is_slave_direction helps to check if the transfer type is slave. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-12dma: ipu_idmac: reuse is_slave_direction helperAndy Shevchenko1-1/+1
The is_slave_direction helps to check if the transfer type is slave. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Cc: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-12dma: ep93xx_dma: reuse is_slave_direction helperAndy Shevchenko1-2/+1
The is_slave_direction helps to check if the transfer type is slave. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-12dma: dw_dmac: check direction properly in dw_dma_cyclic_prepAndy Shevchenko1-2/+3
dma_transfer_direction is a normal enum. It means we can't usually use the values as bit fields. Let's adjust this check and move it above the usage of the direction parameter, due to the nature of the following usage of it. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-12dma: at_hdmac: check direction properly for cyclic transfersAndy Shevchenko1-5/+5
dma_transfer_direction is a normal enum. It means we can't usually use the values as bit fields. Let's adjust this check and move it above the usage of the direction parameter, due to the nature of the following usage of it. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-11ARM: OMAP: Fix dmaengine init for multiplatformTony Lindgren1-19/+1
Otherwise omap dmaengine will initialized when booted on other SoCs. Fix this by initializing the platform device in arch/arm/*omap*/dma.c instead. Cc: Russell King <[email protected]> Cc: Dan Williams <[email protected]> Cc: Vinod Koul <[email protected]> Tested-by: Ezequiel Garcia <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2013-01-09dma: dw_dmac: add dwc_chan_pause and dwc_chan_resumeAndy Shevchenko1-9/+22
We will use at least the dwc_chan_resume() later. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-09dw_dmac: update tx_node_active in dwc_do_single_blockAndy Shevchenko1-8/+6
The "else" keyword in the dw_dma_tasklet is removed as well. All together simplifies the logic of the code and understanding of what is happening there. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-09dw_dmac: remove redundant checkAndy Shevchenko1-1/+1
There is no need to check the callback_required parameter, due to we check the callback pointer to be a non-NULL. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-09dw_dmac: check for mapping errorsAndy Shevchenko1-6/+14
Otherwise we get a warning in case of CONFIG_DMA_API_DEBUG=y [ 45.775943] WARNING: at lib/dma-debug.c:933 check_unmap+0x5d6/0x6ac() [ 45.782369] dw_dmac dw_dmac.0: DMA-API: device driver failed to check map error[device address=0x00000000356efcc0] [size=28 bytes] [mapped as single] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-09dw_dmac: absence of pdata isn't critical when autocfg is setAndy Shevchenko1-7/+16
The patch allows to probe the device when platform data is absent and hardware auto configuration is enabled. In that case the default platform data is used where the channel allocation order is set to ascending, channel priority is set to ascending, and private property is set to true. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-09dma: tegra: implement flags parameters for cyclic transferLaxman Dewangan1-2/+6
The flag parameter is added in the cyclic transfer request. Use the flag option of: - DMA_PREP_INTERRUPT for enabling interrupt. - DMA_CTRL_ACK for deciding whether ack is requred or not for descriptor. Signed-off-by: Laxman Dewangan <[email protected]> CC: <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-08Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-3/+6
Pull ARM SoC fixes from Olof Johansson: "People are back from the holiday breaks, and it shows. Here are a bunch of fixes for a number of platforms: - A couple of small fixes for Nomadik - A larger set of changes for kirkwood/mvebu - uart driver selection, dt clocks, gpio-poweroff fixups, a few __init annotation fixes and some error handling improvement in their xor dma driver. - i.MX had a couple of minor fixes (and a critical one for flexcan2 clock setup) - MXS has a small board fix and a framebuffer bugfix - A set of fixes for Samsung Exynos, fixing default bootargs and some Exynos5440 clock issues - A set of OMAP changes including PM fixes and a few sparse warning fixups All in all a bit more positive code delta than we'd ideally want to see here, mostly from the OMAP PM changes, but nothing overly crazy." * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits) ARM: clps711x: Fix bad merge of clockevents setup ARM: highbank: save and restore L2 cache and GIC on suspend ARM: highbank: add a power request clear ARM: highbank: fix secondary boot and hotplug ARM: highbank: fix typos with hignbank in power request functions ARM: dts: fix highbank cpu mpidr values ARM: dts: add device_type prop to cpu nodes on Calxeda platforms ARM: mx5: Fix MX53 flexcan2 clock ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array pinctrl: mvebu: make pdma clock on dove mandatory ARM: Dove: Add pinctrl clock to DT dma: mv_xor: fix error handling for clocks dma: mv_xor: fix error handling of mv_xor_channel_add() arm: mvebu: Add missing ; for cpu node. arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces arm: mvebu: Armada XP MV78230 has two cores, not one clk: mvebu: Remove inappropriate __init tagging ARM: Kirkwood: Use fixed-regulator instead of board gpio call ARM: Kirkwood: Fix missing sdio clock ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers ...
2013-01-08dmaengine: imx-dma: Disable use of hw_chain to fix sg_dma transfers.Javier Martin1-3/+2
HW chaining is currently broken in imx-dma. It can be easily reproduced doing intensive accesses to a external MMC card and checking how the file system is corrupted. Preventing the driver to use HW chaining solves these issues. Signed-off-by: Javier Martin <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-08dma: mxs-dma: Fix build warnings with W=1Fabio Estevam1-4/+4
Fix the following warnings when building with W=1 option: drivers/dma/mxs-dma.c: In function 'mxs_dma_alloc_chan_resources': drivers/dma/mxs-dma.c:368:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/dma/mxs-dma.c: In function 'mxs_dma_prep_slave_sg': drivers/dma/mxs-dma.c:481:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/dma/mxs-dma.c:494:3: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/dma/mxs-dma.c:515:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/dma/mxs-dma.c: In function 'mxs_dma_prep_dma_cyclic': drivers/dma/mxs-dma.c:563:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-08dma: tegra: add support for Tegra114 SoCLaxman Dewangan1-1/+12
NVIDIA's Tegra114 has APB DMA controller which has 32 dma channels and support support channel wise pause control. Add support for Tegra114 which uses the channel wise pause control hardware feature. Signed-off-by: Laxman Dewangan <[email protected]> Reviewed-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-08dma: tegra: add support for channel wise pauseLaxman Dewangan1-5/+38
NVIDIA's some SoCs like Tegra114 support the channel wise pause control inplace of global pause which pauses all DMA channels. When SoCs support the channel wise pause control then it uses the global pause for clock gating for register access as well as all DMA channel pause. Hence DMA registers are not accessible if DMAs are globally paused on these new SoCs. Add support for channel wise pause feature if SoCs support it. Signed-off-by: Laxman Dewangan <[email protected]> Reviewed-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dma: ipu: Drop unused spinlockJean Delvare1-1/+0
I was checking why this spinlock was never initialized, but it turns out it's not used anywhere, so we can drop it. Signed-off-by: Jean Delvare <[email protected]> Cc: Vinod Koul <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2013-01-07ioat: remove chanerr mask setting for IOAT v3.xDave Jiang1-6/+1
The existing code set a value in the PCI_CHANERRMSK_INT register for a workaround to address a pre-silicon bug on the Intel 5520 IO hub that has been fixed when the hardware was released. There is no need for this code. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2013-01-07ioat: Add alignment workaround for IVB platformsDave Jiang3-12/+32
The PCI IDs for IvyBridge IOAT DMA needs to go into a header file since dma_v3.c looks them up for certain hardware workarounds. Need to add to the alignment workaround for IOAT 3.2 since it wasn't fixed in IVB. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2013-01-07dmaengine: add cpu_relax() to busy-loop in dma_sync_wait()Bartlomiej Zolnierkiewicz1-1/+4
Removal of the busy-loop from dma_sync_wait() is not a trivial task so just add cpu_relax() to the loop for now. Cc: Vinod Koul <[email protected]> Cc: Tomasz Figa <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2013-01-07ioat3: add missing DMA unmap to ioat_xor_val_self_test()Bartlomiej Zolnierkiewicz1-17/+59
Make ioat_xor_val_self_test() do DMA unmapping itself and fix handling of failure cases. Cc: Dan Williams <[email protected]> Cc: Tomasz Figa <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2013-01-07dmaengine/dmatest: terminate transfers only in case of errorsShiraz Hashim1-1/+3
dmatest erroneously terminated transfers in normal cases also leading to test failures for multiple threads over a channel. Fix this and terminate transfers only in case of errors. Signed-off-by: Shiraz Hashim <[email protected]> Signed-off-by: Deepak Sikri <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dma: sh: Don't use ENODEV for failing slave lookupGuennadi Liakhovetski1-1/+1
If dmaengine driver's .device_alloc_chan_resources() method returns -ENODEV, dma_request_channel() will decide, that the driver has been removed and will remove the device from its list. To prevent this use ENXIO if a slave lookup fails. Reported-by: Kuninori Morimoto <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: [email protected] Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dmatest: Fix NULL pointer dereference on ioatJon Mason1-2/+2
device_control is an optional and not implemented in all DMA drivers. Any calls to these will result in a NULL pointer dereference. dmatest makes two of these calls when completing the kernel thread and removing the module. These are corrected by calling the dmaengine_device_control wrapper and checking for a non-existant device_control function pointer there. Signed-off-by: Jon Mason <[email protected]> CC: Vinod Koul <[email protected]> CC: Dan Williams <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07DMA: PL330: Use devm_* functionsSachin Kamat1-27/+10
devm_* functions are device managed and make the code and error handling a bit simpler. Cc: Jassi Brar <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dmaengine: sirf: enable the driver support new SiRFmarco SoCBarry Song2-8/+21
The driver supports old up SiRFprimaII SoCs, this patch makes it support the new SiRFmarco as well. SiRFmarco, as a SMP SoC, adds new DMA_INT_EN_CLR and DMA_CH_LOOP_CTRL_CLR registers, to disable IRQ/Channel, we should write 1 to the corresponding bit in the two CLEAR register. Tested on SiRFmarco using SPI driver: $ /mnt/spidev-sirftest -D /dev/spidev32766.0 spi mode: 0 bits per word: 8 max speed: 500000 Hz (500 KHz) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 $ cat /proc/interrupts CPU0 CPU1 32: 1593 0 GIC sirfsoc_timer0 33: 0 3533 GIC sirfsoc_timer1 44: 0 0 GIC sirfsoc_dma 45: 16 0 GIC sirfsoc_dma 47: 6 0 GIC sirfsoc_spi 50: 5654 0 GIC sirfsoc-uart ... Signed-off-by: Barry Song <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07ioat: add missing DMA unmap to ioat_dma_self_test()Bartlomiej Zolnierkiewicz1-4/+7
Make ioat_dma_self_test() do DMA unmapping itself and fix handling of failure cases. Cc: Dan Williams <[email protected]> Cc: Tomasz Figa <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2013-01-07dma: Convert dev_printk(KERN_<LEVEL> to dev_<level>(Joe Perches3-51/+42
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Coalesce formats for easier grep. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dmatest: adjust invalid module parameters for number of source buffersAkinobu Mita1-3/+13
DMA Engine test module has module parameters to set the number of source buffers for xor and pq operations. We can set these values larger than the maximum number of sources that the device can support. These values are not adjusted and the unsupported number of source buffers are passed to the device. But most drivers don't check it, so unexpected results will happen. This makes an appropriate adjustment for these module parameters before use. Signed-off-by: Akinobu Mita <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Dan Williams <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dma: amba-pl08x: use vchan_dma_desc_free_listAkinobu Mita1-7/+1
vchan_dma_desc_free_list() iterates through each virt_dma_desc in the specified list_head and calls vchan->desc_free(). We can use it instead of repeated execution of pl08x_desc_free() for each virt_dma_desc in the list_head. Because vchan->desc_free callback is set as pl08x_desc_free() for amba-pl08x driver. Signed-off-by: Akinobu Mita <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Dan Williams <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dw_dmac: introduce to_dw_desc() macroAndy Shevchenko2-4/+4
The to_dw_desc() macro helps to retrieve the dw_desc node from the corresponding list_head structure. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dw_dmac: change dev_crit to dev_WARN in dwc_handle_errorAndy Shevchenko1-3/+3
In case of handling a bad descriptor the dwc_handle_error() will dump a stack as well. It's a lot more verbose and more likely to get user's attention. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dw_dmac: don't call platform_get_drvdata twiceAndy Shevchenko1-2/+2
There is no need to call platform_get_drvdata twice as we have it already in dw variable. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dw_dmac: change dev_printk() to corresponding macrosAndy Shevchenko1-9/+6
Change printk(KERN_INFO ..., dev_name(...), ...) to dev_info() as well. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dmaengine: dw_dmac: amend description and indentationHeikki Krogerus1-3/+3
The driver will be used as a core part for various implementations of the DesignWare DMA device. The patch adjusts description on the top and corrects paragraph indentation in few places across the code. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dmaengine: dw_dmac: remove CLK dependencyHeikki Krogerus1-1/+0
This driver could be used on different platforms. Thus, the HAVE_CLK dependency is dropped away. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dmaengine: dw_dmac: Enhance device tree supportViresh Kumar2-0/+138
dw_dmac driver already supports device tree but it used to have its platform data passed the non-DT way. This patch does following changes: - pass platform data via DT, non-DT way still takes precedence if both are used. - create generic filter routine - Earlier slave information was made available by slave specific filter routines in chan->private field. Now, this information would be passed from within dmac DT node. Slave drivers would now be required to pass bus_id (a string) as parameter to this generic filter(), which would be compared against the slave data passed from DT, by the generic filter routine. - Update binding document Signed-off-by: Viresh Kumar <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> [Fixed __devinit usage] Signed-off-by: Vinod Koul <[email protected]>
2013-01-07dma: coh901318: cut down on platform data abstractionLinus Walleij1-67/+7
Since we merged the platform data into the driver we can remove the middle-man abstraction. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: merge header filesLinus Walleij4-124/+108
We do not need two header files for the two parts of the driver to talk to each other so merge them into one. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: push definitions into driverLinus Walleij3-212/+209
Move everything in the header file that is not used in both the main driver and the LLI portions into the driver, including register definitions and such. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: push header down into the DMA subsystemLinus Walleij4-4/+247
The defines in U300's <mach/coh901318.h> are now only used by the DMA engine driver itself, so move the header down into the DMA subsystem. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: skip hard-coded addressesLinus Walleij1-22/+13
Remove hard-coded target addresses altogether. Skip the prefix "runtime_*" from the variables, since all of these are now runtime and their names are unique enough already. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: remove hardcoded target addressesLinus Walleij1-19/+0
Nowadays the clients should use the dmaengine framework to tell the DMA driver what target address to use, so delete these addresses, they are for an out-of-tree driver anyway. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: push platform data into driverLinus Walleij1-3/+1085
We're only ever going to support the U300 with this driver so skip the separation of platform data from driver, and push it down into the driver itself. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-07dma: coh901318: create a proper platform data fileLinus Walleij1-0/+1
This extracts the platform data that we will keep generic from the U300 platform and associates it with the COH901318 driver in <linux/platform_data/dma-coh901318.h>. Acked-by: Vinod Koul <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-06pch_dma: use module_pci_driver to simplify the codeWei Yongjun1-12/+1
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-06drivers/dma: remove CONFIG_EXPERIMENTALKees Cook1-1/+1
This config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it. CC: Vinod Koul <[email protected]> CC: Dan Williams <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-06dmaengine: add helper function to request a slave DMA channelJon Hunter1-0/+16
Currently slave DMA channels are requested by calling dma_request_channel() and requires DMA clients to pass various filter parameters to obtain the appropriate channel. With device-tree being used by architectures such as arm and the addition of device-tree helper functions to extract the relevant DMA client information from device-tree, add a new function to request a slave DMA channel using device-tree. This function is currently a simple wrapper that calls the device-tree of_dma_request_slave_channel() function. Cc: Nicolas Ferre <[email protected]> Cc: Benoit Cousson <[email protected]> Cc: Stephen Warren <[email protected]> Cc: Grant Likely <[email protected]> Cc: Russell King <[email protected]> Cc: Rob Herring <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Dan Williams <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Jon Hunter <[email protected]> Reviewed-by: Stephen Warren <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-01-06dma: mv_xor: fix error handling for clocksThomas Petazzoni1-2/+5
When a channel fails to initialize, we release all ressources, including clocks. However, a XOR unit is not necessarily associated to a clock (some variants of Marvell SoCs have a clock for XOR units, some don't), so we shouldn't unconditionally be releasing the clock. Instead, just like we do in the mv_xor_remove() function, we should check if one clock was found before releasing it. Signed-off-by: Thomas Petazzoni <[email protected]> Signed-off-by: Jason Cooper <[email protected]>