linux/sound/soc/mxs
Fabio Estevam 6b35f924b8 ASoC: mxs: Fix mxs-saif timeout
On a mx28evk board the following errors happens on mxs-sgtl5000 probe:

[    0.660000] saif0_clk_set_rate: divider writing timeout
[    0.670000] mxs-sgtl5000: probe of mxs-sgtl5000.0 failed with error -110
[    0.670000] ALSA device list:
[    0.680000]   No soundcards found.

This timeout happens because clk_set_rate will result in writing to the DIV bits
of register HW_CLKCTRL_SAIF0 with the saif clock gated (CLKGATE bit set to one).

MX28 Reference states the following about CLKGATE:

"The DIV field can change ONLY when this clock gate bit field is low."

So call clk_prepare_enable prior to clk_set_rate to fix this problem.

After this change the mxs-saif driver can be correctly probed and audio is functional.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 18:38:44 +00:00
..
Kconfig ASoC: mxs: add asoc configuration files 2011-07-28 11:47:41 +01:00
Makefile ASoC: mxs: add asoc configuration files 2011-07-28 11:47:41 +01:00
mxs-pcm.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
mxs-pcm.h ASoC: mxs: add mxs-pcm driver 2011-07-28 11:47:22 +01:00
mxs-saif.c ASoC: mxs: Fix mxs-saif timeout 2012-01-20 18:38:44 +00:00
mxs-saif.h ASoC: mxs-saif: add record function 2011-09-19 18:31:59 +01:00
mxs-sgtl5000.c ASoC: mxs: Add .owner to struct snd_soc_card 2011-12-28 17:20:48 +00:00