dma: imx-sdma: make channel0 operations atomic
authorRichard Zhao <richard.zhao@freescale.com>
Fri, 11 May 2012 07:14:27 +0000 (15:14 +0800)
committerVinod Koul <vinod.koul@linux.intel.com>
Fri, 11 May 2012 08:30:38 +0000 (14:00 +0530)
commit2ccaef0520d18d0072153f090d4110b4075c332c
treec4fcc9cbac1f7448263701ae5c5926f28351935c
parent922ee08baad2052d0759f100e026d49798c51fef
dma: imx-sdma: make channel0 operations atomic

device_prep_dma_cyclic may be call in audio trigger function which is
atomic context, so we make it atomic too.

 - change channel0 lock to spinlock.
 - Use polling to wait for channel0 finish running.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/imx-sdma.c