drivers: imx: sai: W1C for a clean start

On start W1C the Work Start Flag, Sync Error Flag and
FIFO Error Flag.

Write a logic 1 to this field to clear each of this
flags and have a clean start for SAI.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
This commit is contained in:
Iuliana Prodan 2021-03-05 19:06:37 +02:00 committed by Daniel Baluta
parent f60adbbbda
commit 5f93ad4729
1 changed files with 8 additions and 0 deletions

View File

@ -66,6 +66,14 @@ static void sai_start(struct dai *dai, int direction)
}
}
/* W1C */
dai_update_bits(dai, REG_SAI_XCSR(direction),
REG_SAI_CSR_FEF, 1);
dai_update_bits(dai, REG_SAI_XCSR(direction),
REG_SAI_CSR_SEF, 1);
dai_update_bits(dai, REG_SAI_XCSR(direction),
REG_SAI_CSR_WSF, 1);
/* add one word to FIFO before TRCE is enabled */
if (direction == DAI_DIR_PLAYBACK)
dai_write(dai, REG_SAI_TDR0, 0x0);