linux/drivers/dma
Fabio Estevam a2367db2ec dma: imx-dma: Fix kernel crash due to missing clock conversion
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 <javier.martin@vista-silicon.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: stable@vger.kernel.org
2012-07-27 08:49:53 +05:30
..
ioat dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
ipu dmaengine i.MX ipu: clk_prepare/unprepare clock 2012-04-25 17:03:43 +02:00
ppc4xx dmaengine: ensure all DMA engine drivers initialize their cookies 2012-03-13 11:37:42 +05:30
sh dma: sh: provide a migration path for slave drivers to stop using .private 2012-07-20 11:28:20 +05:30
amba-pl08x.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: take maxburst from slave configuration 2012-05-15 08:47:18 +05:30
at_hdmac.c dmaengine: at_hdmac: add a few const qualifiers 2012-07-16 12:05:45 +05:30
coh901318_lli.c dmaengine: Use sg_dma_address instead of sg_phys 2012-05-11 12:04:38 +05:30
coh901318_lli.h dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
coh901318.c dma: coh901318: use devm allocation 2012-06-14 08:42:26 +05:30
dmaengine.c dmaengine: Cleanup logging messages 2012-07-20 11:44:19 +05:30
dmaengine.h dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
dmatest.c dmaengine: fix missing 'cnt' in ?: in dmatest 2012-01-23 11:43:18 -08:00
dw_dmac_regs.h dw_dmac: use 'u32' for LLI structure members, not dma_addr_t 2012-07-16 12:03:07 +05:30
dw_dmac.c dw_dmac: use 'u32' for LLI structure members, not dma_addr_t 2012-07-16 12:03:07 +05:30
ep93xx_dma.c arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00
fsldma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
fsldma.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
imx-dma.c dma: imx-dma: Fix kernel crash due to missing clock conversion 2012-07-27 08:49:53 +05:30
imx-sdma.c dma: imx-sdma: buf_tail should be initialize in prepare function 2012-06-07 13:48:42 +05:30
intel_mid_dma_regs.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
intel_mid_dma.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
iop-adma.c dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
iovlock.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig dmaengine: mmp_tdma: fix the arch dependency 2012-06-23 13:14:17 +05:30
Makefile dma: move shdma driver to an own directory 2012-07-13 09:12:59 +05:30
mmp_tdma.c dmaengine: mmp_tdma: add mmp tdma support 2012-06-20 16:28:41 +05:30
mpc512x_dma.c dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
mv_xor.c ARM: Orion: XOR: Add support for clk 2012-05-08 16:34:02 -07:00
mv_xor.h ARM: Orion: XOR: Add support for clk 2012-05-08 16:34:02 -07:00
mxs-dma.c dma: mxs-dma: Export missing symbols from mxs-dma.c 2012-07-16 11:59:22 +05:30
pch_dma.c dmaengine: Use sg_dma_address instead of sg_phys 2012-05-11 12:04:38 +05:30
pl330.c DMA: PL330: Fix racy mutex unlock 2012-06-14 08:39:52 +05:30
sa11x0-dma.c ARM: sa11x0: fix build errors from DMA engine API updates 2012-03-30 11:46:20 +01:00
sirf-dma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
ste_dma40_ll.c dma40: cyclic xfer support 2011-01-30 22:27:21 -08:00
ste_dma40_ll.h dma40: Improve the logic of stopping logical chan 2012-04-23 17:56:17 +05:30
ste_dma40.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
tegra20-apb-dma.c dma: tegra: rename driver and compatible to match with dts 2012-07-13 08:49:54 +05:30
timb_dma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
TODO dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
txx9dmac.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
txx9dmac.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30