diff options
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.c')
-rw-r--r-- | sound/soc/fsl/fsl_asrc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index c1db84d6756a..64c8c370bd89 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -1149,6 +1149,8 @@ static int fsl_asrc_runtime_resume(struct device *dev) struct fsl_asrc *asrc_priv = dev_get_drvdata(dev); int i, ret; u32 asrctr; + u32 reg; + int retry = 10; ret = clk_prepare_enable(asrc_priv->mem_clk); if (ret) @@ -1185,6 +1187,13 @@ static int fsl_asrc_runtime_resume(struct device *dev) regmap_update_bits(asrc_priv->regmap, REG_ASRCTR, ASRCTR_ASRCEi_ALL_MASK, asrctr); + /* Wait for status of initialization */ + do { + udelay(5); + regmap_read(asrc_priv->regmap, REG_ASRCFG, ®); + reg = (reg >> ASRCFG_INIRQi_SHIFT(0)) & 0x7; + } while (!(reg == ((asrctr & 0xE) >> 1)) && --retry); + return 0; disable_asrck_clk: |