ENGR00138121 Fix system hangs when arecord/aplay continuouslyrel_imx_2.6.35_11.01.00
commit27fdf7bae11978d21e8aba09bb635f49b07edd4a
authorZeng Zhaoming <b32542@freescale.com>
Wed, 26 Jan 2011 02:35:15 +0000 (26 10:35 +0800)
committerAlan Tull <alan.tull@freescale.com>
Thu, 27 Jan 2011 16:50:15 +0000 (27 10:50 -0600)
tree8b1fca432377457b3f317b79fe853bc7da910c02
parent75c58543ebb278a4a7896548f39381a323f6715e
ENGR00138121 Fix system hangs when arecord/aplay continuously

Sdma iapi start loading sdma script by write HSTART register as
memory. When instruction reorder and IRQ delay may let the next
synchronize operation wait forever.

We change it by using writel() to access sdma registers,
and introduce timeout to show this error.

HSTART and STOP_STAT contain bits that are reset by hardware.
So if we read-modify-write, we are in danger of setting a bit
after SDMA has cleared it.

The spec calls these registers "write-ones" register.  So the
ARM can write a 1 to any bit, but does not need to worry about
clearing any bits that were previously set.  SDMA hardware
keeps track of all bits that were set.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Signed-off-by: Alan Tull <alan.tull@freescale.com>
arch/arm/plat-mxc/sdma/iapi/include/epm.h
arch/arm/plat-mxc/sdma/iapi/src/iapiLowMcu.c
arch/arm/plat-mxc/sdma/sdma.c