]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00218624 ASRC: set dma_data to 0 before config SDMA
authorChen Liangjun <b36089@freescale.com>
Fri, 27 Jul 2012 07:22:47 +0000 (15:22 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:33 +0000 (14:12 +0200)
commit1e2b412158e729c059f44d7627fd6055633c3c68
treeb00fec45e4cf2a498d710f4f2ce354a0a07b98dc
parentf60168f23c9d0584168b49c79c5853c09ffa01e1
ENGR00218624 ASRC: set dma_data to 0 before config SDMA

To allocate an SDMA channel, imx_dma_data struct is need. However,
if the member dma_request_p2p is not set to 0 before configuration,
SDMA driver would treat the channel as p2p(periphal to periphal) DMA and
set SDMA channel context in p2p way. In the worst case, SDMA would
access some unexisted address cause of mis configuration above and thus
cause kernel panic or hang.

In this patch, set imx_dma_data struct to 0 once it is allocated from
stack.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
drivers/mxc/asrc/mxc_asrc.c