Age | Commit message (Collapse) | Author | Files | Lines |
|
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]
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Cc: Chris Ball <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
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]>
|
|
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]>
|
|
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|