ASoC: mxs-saif: clear clk gate first before register setting
authorDong Aisheng <b29396@freescale.com>
Sun, 21 Aug 2011 15:45:40 +0000 (23:45 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 22 Aug 2011 22:33:49 +0000 (23:33 +0100)
commitbbe8ff5e25afd4d06c8a8bad009aca5f0d0c22ef
treeaca8b98790f77bbfaa1a1087813b3e003c7d8efe
parent09d930ae5198fbb67b86d3d058ad82211f469a46
ASoC: mxs-saif: clear clk gate first before register setting

Saif needs clear clk gate first before writing registers or the write
will not success.

The original xx_get_mclk function clear clk gate after mclk setting
that may cause the former mclk setting unwork, then the real output
mclk maybe inaccurate.
Placing the clear before setting mclk to avoid such an issue.

We also have to clear clk gate in startup instead of in prepare function.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/mxs/mxs-saif.c