diff mbox

[2/3] ASoC: Intel: Wait Baytrail ADSP boot at resume_early stage

Message ID 1407755738-31693-3-git-send-email-jarkko.nikula@linux.intel.com (mailing list archive)
State Accepted
Commit 9246539bdda4206c53be1045778b642f1c8137e4
Headers show

Commit Message

Jarkko Nikula Aug. 11, 2014, 11:15 a.m. UTC
Remove sst_byt_pcm_dev_resume() and move waiting of firmware boot into
sst_byt_pcm_dev_resume_early(). Now suspend_late and resume_early phases are
in sync with each other so that we know that ADSP was put into reset and was
unpowered after suspend_late and is ready to resume IO after resume_early
during resume stage in sst_byt_pcm_trigger().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
---
 sound/soc/intel/sst-baytrail-pcm.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/intel/sst-baytrail-pcm.c b/sound/soc/intel/sst-baytrail-pcm.c
index ba7ed9720732..eb7b31e13565 100644
--- a/sound/soc/intel/sst-baytrail-pcm.c
+++ b/sound/soc/intel/sst-baytrail-pcm.c
@@ -423,18 +423,14 @@  static int sst_byt_pcm_dev_suspend_late(struct device *dev)
 static int sst_byt_pcm_dev_resume_early(struct device *dev)
 {
 	struct sst_pdata *sst_pdata = dev_get_platdata(dev);
+	int ret;
 
 	dev_dbg(dev, "resume early\n");
 
 	/* load fw and boot DSP */
-	return sst_byt_dsp_boot(dev, sst_pdata);
-}
-
-static int sst_byt_pcm_dev_resume(struct device *dev)
-{
-	struct sst_pdata *sst_pdata = dev_get_platdata(dev);
-
-	dev_dbg(dev, "resume\n");
+	ret = sst_byt_dsp_boot(dev, sst_pdata);
+	if (ret)
+		return ret;
 
 	/* wait for FW to finish booting */
 	return sst_byt_dsp_wait_for_ready(dev, sst_pdata);
@@ -443,7 +439,6 @@  static int sst_byt_pcm_dev_resume(struct device *dev)
 static const struct dev_pm_ops sst_byt_pm_ops = {
 	.suspend_late = sst_byt_pcm_dev_suspend_late,
 	.resume_early = sst_byt_pcm_dev_resume_early,
-	.resume = sst_byt_pcm_dev_resume,
 };
 
 #define SST_BYT_PM_OPS	(&sst_byt_pm_ops)