aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-27dma: imx-dma: Fix kernel crash due to missing clock conversionFabio Estevam1-11/+25
With the new i.MX clock infrastructure we need to request the dma clocks seperately: ahb and ipg clocks. This fixes the following kernel crash and make audio to be functional again: root@freescale /home$ aplay audio48k16S.wav Playing WAVE 'audio48k16S.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c7b74000 [00000000] *pgd=a7bb5831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT ARM Modules linked in: CPU: 0 Not tainted (3.5.0-rc5-next-20120702-00007-g3028b64 #1128) PC is at snd_dmaengine_pcm_get_chan+0x8/0x10 LR is at snd_imx_pcm_hw_params+0x18/0xdc pc : [<c02d3cf8>] lr : [<c02e95ec>] psr: a0000013 sp : c7b45e30 ip : ffffffff fp : c7ae58e0 r10: 00000000 r9 : c7ae981c r8 : c7b88800 r7 : c7ae5a60 r6 : c7ae5b20 r5 : c7ae9810 r4 : c7afa060 r3 : 00000000 r2 : 00000001 r1 : c7b88800 r0 : c7afa060 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 0005317f Table: a7b74000 DAC: 00000015 Process aplay (pid: 701, stack limit = 0xc7b44270) Stack: (0xc7b45e30 to 0xc7b46000) 5e20: 00100000 00000029 c7b88800 c02db870 5e40: c7ae5a60 c02d4594 00000010 01ae5a60 c7ae5a60 c7ae9810 c7ae9810 c7afa060 5e60: c7ae5b20 c7ae5a60 c7b88800 c02e3ef0 c02e3e08 c7b1e400 c7afa060 c7b88800 5e80: 00000000 c0014da8 c7b44000 00000000 bec566ac c02cd400 c7afa060 c7afa060 5ea0: bec56800 c7b88800 c0014da8 c02cdd7c c04ee710 c04ee7b8 00000003 c005fc74 5ec0: 00000000 7fffffff c7b45f00 c7afa060 c7b67420 c7ba3070 00000004 c0014da8 5ee0: c7b44000 00000000 bec566ac c02ced88 c04e95f8 b6f5ab04 c7b45fb0 0145a468 5f00: 0145a600 bec566bc bec56800 c7b67420 c7ba3070 c00d499c c7b45f18 c7b45f18 5f20: 0000001a 00000004 00000001 c7b44000 c0527f40 00000009 00000008 00000000 5f40: c7b44000 c002c9ec 00000001 c04f0ab0 c04ebec0 00000101 00000000 0000000a 5f60: 60000093 c7b67420 bec56800 c25c4111 00000004 c0014da8 c7b44000 00000000 5f80: bec566ac c00d4f38 b6ffb658 00000000 c0522d80 0145a468 b6fd5000 0145a418 5fa0: 00000036 c0014c00 0145a468 b6fd5000 00000004 c25c4111 bec56800 00020001 5fc0: 0145a468 b6fd5000 0145a418 00000036 0145a468 0145a600 bec566bc bec566ac 5fe0: 0145a468 bec56388 b6f65ce4 b6dcebec 20000010 00000004 00000000 00000000 [<c02d3cf8>] (snd_dmaengine_pcm_get_chan+0x8/0x10) from [<c02e95ec>] (snd_imx_pcm_hw_params+0x18/0xdc) [<c02e95ec>] (snd_imx_pcm_hw_params+0x18/0xdc) from [<c02e3ef0>] (soc_pcm_hw_params+0xe8/0x1f0) [<c02e3ef0>] (soc_pcm_hw_params+0xe8/0x1f0) from [<c02cd400>] (snd_pcm_hw_params+0x124/0x474) [<c02cd400>] (snd_pcm_hw_params+0x124/0x474) from [<c02cdd7c>] (snd_pcm_common_ioctl1+0x4b4/0xf74) [<c02cdd7c>] (snd_pcm_common_ioctl1+0x4b4/0xf74) from [<c02ced88>] (snd_pcm_playback_ioctl1+0x30/0x510) [<c02ced88>] (snd_pcm_playback_ioctl1+0x30/0x510) from [<c00d499c>] (do_vfs_ioctl+0x80/0x5e4) [<c00d499c>] (do_vfs_ioctl+0x80/0x5e4) from [<c00d4f38>] (sys_ioctl+0x38/0x60) [<c00d4f38>] (sys_ioctl+0x38/0x60) from [<c0014c00>] (ret_fast_syscall+0x0/0x2c) Code: e593000c e12fff1e e59030a0 e59330bc (e5930000) ---[ end trace fa518c8ba3a74e97 ]-- Reported-by: Javier Martin <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Cc: [email protected]
2012-07-20dmaengine: Cleanup logging messagesJoe Perches1-8/+12
Use a more current logging style. Add pr_fmt to prefix dmaengine: to messages. Convert printk(KERN_ERR to pr_err(. Convert embedded function name use to "%s: ", __func__ Align arguments. Original-patch-by: Andy Shevchenko <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-20mmc: sh_mmcif: switch to the new DMA channel allocation and configurationGuennadi Liakhovetski1-35/+47
Using the "private" field from struct dma_chan is deprecated. The sh dmaengine driver now also supports the preferred DMA channel allocation and configuration method, using a standard filter function and a channel configuration operation. This patch updates sh_mmcif to use this new method. Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Chris Ball <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-20dma: sh: provide a migration path for slave drivers to stop using .privateGuennadi Liakhovetski4-28/+95
This patch extends the sh dmaengine driver to support the preferred channel selection and configuration method, instead of using the "private" field from struct dma_chan. We add a standard filter function to be used by slave drivers instead of implementing their own ones, and add support for the DMA_SLAVE_CONFIG control operation, which must accompany the new channel selection method. We still support the legacy .private channel allocation method to cater for a smooth driver migration. Signed-off-by: Guennadi Liakhovetski <[email protected]> [applied a trvial checkpath fix] Signed-off-by: Vinod Koul <[email protected]>
2012-07-20dma: sh: use an integer slave ID to improve API compatibilityGuennadi Liakhovetski4-26/+27
Initially struct shdma_slave has been introduced with the only member - an unsigned slave ID - to describe common properties of DMA slaves in an extensible way. However, experience shows, that a slave ID is indeed the only parameter, needed to identify DMA slaves. This is also, what is used by the core dmaengine API in struct dma_slave_config. We switch to using the slave_id directly, instead of passing a pointer to struct shdma_slave to improve compatibility with the core. We also make the slave_id signed for easier error checking. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-20dmaengine: shdma: prepare to stop using struct dma_chan::privateGuennadi Liakhovetski5-20/+18
Using struct dma_chan::private is deprecated. To update the shdma driver to stop using it we first have to eliminate internal runtime uses of it. After that we will also be able to stop using it for channel configuration. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-20sh: remove unused DMA device pointer from SIU platform dataGuennadi Liakhovetski2-2/+0
The SIU ALSA driver is not using the DMA device pointer for DMA channel filtering any more, it can be now removed. Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Paul Mundt <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-20ASoC: siu: don't use DMA device for channel filteringGuennadi Liakhovetski1-4/+0
DMA channels are filtered based on slave IDs, no need to additionally filter on DMA device. Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-20dmaengine: shdma: (cosmetic) simplify a static functionGuennadi Liakhovetski1-4/+4
dmae_find_slave() needs only the slave_id field from the slave object, no need to pass the pointer to the object, pass the slave_id directly. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-16dmaengine: at_hdmac: add a few const qualifiersUwe Kleine-König1-2/+2
This prepares of_device_id.data becoming const. Without this change the following warning would occur: drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data': drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Nicolas Ferre <[email protected]> Cc: Dan Williams <[email protected]> Cc: Vinod Koul <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-16dw_dmac: use 'u32' for LLI structure members, not dma_addr_tAndy Shevchenko2-8/+5
Use 'u32' for the LLI structure members, which are defined by hardware to be 32-bit. dma_addr_t is much more vague about its actual size. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-16dw_dmac: mark dwc_dump_lli inlineAndy Shevchenko1-1/+1
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-16dma: mxs-dma: Export missing symbols from mxs-dma.cAttila Kinali1-0/+2
mxs-dma.c provides two functions mxs_dma_is_apbh and mxs_dma_is_apbx which are used at least in mxs-mmc.c. Building mxs-mmc as module fails due to those two symbols not being exported. Signed-off-by: Attila Kinali <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13dma: shdma: convert to the shdma base libraryGuennadi Liakhovetski3-897/+302
The shdma base library has originally been extracted from the shdma driver, which now can be converted to actually use it. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13ASoC: fsi: prepare for conversion to the shdma base libraryGuennadi Liakhovetski1-2/+2
Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13usb: renesas_usbhs: prepare for conversion to the shdma base libraryGuennadi Liakhovetski1-5/+5
Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13ASoC: siu: prepare for conversion to the shdma base libraryGuennadi Liakhovetski1-4/+4
Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13serial: sh-sci: prepare for conversion to the shdma base libraryGuennadi Liakhovetski1-4/+4
Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Alan Cox <[email protected]> Acked-by: Paul Mundt <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13mmc: sh_mobile_sdhi: prepare for conversion to the shdma base libraryGuennadi Liakhovetski1-4/+4
Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Chris Ball <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13mmc: sh_mmcif: remove unneeded struct sh_mmcif_dma, prepare to shdma conversionGuennadi Liakhovetski2-21/+11
Now that all users have been updated to use the embedded in struct sh_mmcif_plat_data DMA slave IDs, struct sh_mmcif_dma is no longer needed and can be removed. This also makes preparation to the shdma base library conversion easier. Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Chris Ball <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13dma: shdma: prepare for conversion to the shdma base libraryGuennadi Liakhovetski1-2/+6
By placing an anonymous union at the top of struct sh_dmae_slave we can transparently prepare all device and client drivers for the upcoming shdma-base conversion. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13dmaengine: add an shdma-base libraryGuennadi Liakhovetski3-0/+992
This patch extracts code from shdma.c, that does not directly deal with hardware implementation details and can be re-used with diverse DMA controller variants, found on SH-based SoCs. Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Sascha Hauer <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13dma: move shdma driver to an own directoryGuennadi Liakhovetski4-2/+3
The shdma driver is going to be split into multiple files. To make this more convenient move it to an own directory. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13dma: tegra: rename driver and compatible to match with dtsLaxman Dewangan1-3/+3
Rename the compatible name and driver name to match with tegra dts file and as per clock driver. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-07-13dma: tegra: fix residual calculation for cyclic caseLaxman Dewangan1-6/+9
In cyclic mode of DMA, the byte transferred can be more than the requested size and in this case, calculating residuals based on the current position of DMA transfer to bytes requested i.e. bytes required to transfer to reach bytes requested from current DMA position. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-27dma: tegra: set DMA_CYCLIC capabilityLaxman Dewangan1-0/+2
Tegra's APB DMA driver support the cyclic mode of data transfer and hence setting the DMA_CYCLIC caps for dma channels. This is require when generic sound dmaengine pcm driver request for dma channel with CYCLIC capability. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-27dma: tegra: do not set transfer desc flag to DMA_CTRL_ACK in cyclic modeLaxman Dewangan1-1/+1
The sound dmaengine pcm driver uses the dma in cyclic mode and it does not ack the transfer descriptor after transfer stops. This may lead to hold that desc in chip's dma driver and does not allow to reuse/free that descriptors. Hence not enabling flag DMA_CTRL_ACK when dma runs in cyclic mode. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-27dma: tegra: add clk_prepare/clk_unpreparePrashant Gaikwad1-2/+2
Use clk_prepare/clk_unprepare as required by the generic clk framework. Signed-off-by: Prashant Gaikwad <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-27dma: tegra: use sg_dma_address() for getting dma buffer addressLaxman Dewangan1-1/+1
Use the sg_dma_address() to get the segment buffer address for DMA transfer in place of sg_phys() which returns the physical address of an sg entry. The sg_dma_address() returns the correct buffer memory address for DMA transfer. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-23dmaengine: mmp_tdma: fix the arch dependencyVinod Koul1-1/+1
Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: introduce dwc_chan_disableAndy Shevchenko1-18/+14
This piece of code is used often. Make it as a separate function. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: move from __init to __devinitAndy Shevchenko1-3/+3
We usually have more than one DMA device. Thus, the probe function should serve for all of them in case when the driver is built as a module. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: introduce dwc_fast_fls()Andy Shevchenko1-28/+18
There were three places where such function is used. We still avoid to use native fls() because in one case it requires to use 64bit version which is suboptimal in our case. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: disable BLOCK interruptsAndy Shevchenko1-0/+4
Just to be sure we are in known state we disable the BLOCK interupts. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: disable dma in optimal way in probeAndy Shevchenko1-8/+4
The dw_dma_off call needs to have the all_chan_mask calculated. So, done this calculations before the call. Moreover, remove duplicate code that masks the DMA interrupts. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: use __func__ constant in the debug printsAndy Shevchenko1-14/+13
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: print correct number of scanned descriptorsAndy Shevchenko1-1/+1
In case the first descriptor we found is available, the counter still remains 0 value which is wrong. This patch fixes the counter behaviour. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: introduce dwc_dump_chan_regs to dump registersAndy Shevchenko1-21/+16
There is three places where values of the most significant registers were printed. Make such piece of code as separate function. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: use proper casting to print dma_addr_t valuesAndy Shevchenko1-8/+13
dma_addr_t is sometimes 32 bit and sometimes 64. We normally cast them to unsigned long long for printk(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-21dw_dmac: fix constant in the commentAndy Shevchenko1-1/+1
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-20dmaengine: mmp_tdma: add mmp tdma supportZhangfei Gao3-0/+621
Add support for two-channel dma under dmaengine support: mmp-adma and pxa910-squ Signed-off-by: Zhangfei Gao <[email protected]> Signed-off-by: Leo Yan <[email protected]> Signed-off-by: Qiao Zhou <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-20dmaengine: Add wrapper for device_tx_status callbackLars-Peter Clausen1-0/+6
This patch adds a small inline wrapper for the devivce_tx_status callback of a dma device. This makes the source code of users of this function a bit more compact and a bit more legible. E.g.: -status = chan->device->device_tx_status(chan, cookie, &state) +status = dmaengine_tx_status(chan, cookie, &state) Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-14Merge branch 'fixes' into nextVinod Koul1-16/+10
2012-06-14dma: coh901318: use devm allocationLinus Walleij1-48/+24
Allocate memory, region, remap and irq for device state using devm_* helpers to simplify memory accounting. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-14DMA: PL330: Fix racy mutex unlockJavi Merino1-16/+10
pl330_update() stores a pointer to the thrd->req that finished, which contains a pointer to the corresponding pl330_req. This is done with the pl330_lock held. Then, it iterates through the req_done list, calling the callback for each of the requests that are done. The problem is that the driver releases the lock before calling the callback for each of the callbacks. pl330_submit_req() running in another processor can then acquire the lock and insert another request in one of the thrd->req that hasn't been processed yet, replacing the pointer to pl330_req there. When the callback returns in pl330_update() and the next rqdone is popped from the list, it dereferences the pl330_req pointer to the just scheduled pl330_req, instead of the one that has finished, calling pl330 with the wrong r. This patch fixes this by storing the pointer to pl330_req directly in the list. Signed-off-by: Javi Merino <[email protected]> Cc: Jassi Brar <[email protected]> Acked-by: Jassi Brar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-12dmaengine: at_hdmac: trivial: fix comment in headerNicolas Ferre1-4/+3
Not all Atmel SoCs were pointed out in header comment which was bringing confusion. Remove the truncated list of supported devices, replace by the only one that is not supported. Reported-by: Elen Song <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-08dma: tegra: add dmaengine based dma driverLaxman Dewangan3-0/+1425
Add dmaengine based NVIDIA's Tegra APB DMA driver. This driver support the slave mode of data transfer from peripheral to memory and vice versa. The driver supports for the cyclic and non-cyclic mode of data transfer. Signed-off-by: Laxman Dewangan <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-08dma: dmaengine: add slave req id in slave_configLaxman Dewangan1-0/+4
The DMA controller like Nvidia's Tegra Dma controller supports the different slave requestor id from different slave. This need to be configure in dma controller to handle the request properly. Adding the slave-id in the slave configuration so that information can be passed from client when configuring for slave. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-07dma: enable mxs-dma for imx6qHuang Shijie2-2/+1
enable the mxs-dma for imx6q. Also remove the unused header file. Signed-off-by: Huang Shijie <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2012-06-07DMA: PL330: Add missing static storage class specifierSachin Kamat1-1/+1
Fixes the following sparse warning: drivers/dma/pl330.c:2542:5: warning: symbol 'add_desc' was not declared. Should it be static? Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Vinod Koul <[email protected]>