From: Chen Liangjun Date: Fri, 28 Dec 2012 08:42:42 +0000 (+0800) Subject: ENGR00238439 ASRC: add delay before reading ASRC FIFO status X-Git-Tag: v3.0.35-fsl~176 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=db6a6be66b65692d5126cb5c99086d746ab576f0;p=karo-tx-linux.git ENGR00238439 ASRC: add delay before reading ASRC FIFO status ASRC driver would read the sample number of ASRC output FIFO to fetch the data from ASRC output FIFO. However, SDMA's fetching operation may not finished before ASRC's reading. In this case, ASRC driver may read a error data from the register. In this patch, add delay before reading ASRC FIFO status to prevent noise. Signed-off-by: Chen Liangjun --- diff --git a/drivers/mxc/asrc/mxc_asrc.c b/drivers/mxc/asrc/mxc_asrc.c index 9962698473af..8746bcc766ad 100644 --- a/drivers/mxc/asrc/mxc_asrc.c +++ b/drivers/mxc/asrc/mxc_asrc.c @@ -946,6 +946,7 @@ static void asrc_read_output_FIFO_S16(struct asrc_pair_params *params) u16 *index = params->output_last_period.dma_vaddr; t_size = 0; + udelay(100); size = asrc_get_output_FIFO_size(params->index); while (size) { for (i = 0; i < size; i++) { @@ -972,6 +973,7 @@ static void asrc_read_output_FIFO_S24(struct asrc_pair_params *params) u32 *index = params->output_last_period.dma_vaddr; t_size = 0; + udelay(100); size = asrc_get_output_FIFO_size(params->index); while (size) { for (i = 0; i < size; i++) {