]> git.baikalelectronics.ru Git - kernel.git/commit
dma: mmp_pdma: clear DRCMR when free a phy channel
authorXiang Wang <wangx@marvell.com>
Tue, 18 Jun 2013 06:55:59 +0000 (14:55 +0800)
committerVinod Koul <vinod.koul@intel.com>
Mon, 5 Aug 2013 04:02:27 +0000 (09:32 +0530)
commit18d64f5f7a989164c1c596eb77a2f6c9284f8bd1
tree3ad7c738040a7c7851cc032ca60f5017f5bfa8cb
parent0704230cd797075de30a5a46d569983f0f8e7b44
dma: mmp_pdma: clear DRCMR when free a phy channel

In mmp pdma, phy channels are allocated/freed dynamically.
The mapping from DMA request to DMA channel number in DRCMR
should be cleared when a phy channel is freed. Otherwise
conflicts will happen when:
1. A is using channel 2 and free it after finished, but A
still maps to channel 2 in DRCMR of A.
2. Now another one B gets channel 2. So B maps to channel 2
too in DRCMR of B.
In the datasheet, it is described that "Do not map two active
requests to the same channel since it produces unpredictable
results" and we can observe that during test.

Signed-off-by: Xiang Wang <wangx@marvell.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/mmp_pdma.c