diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index 4ddd73762d813a..529cf4e5a8ec3c 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -59,13 +59,10 @@ static irqreturn_t cnl_ipc_irq_thread(int irq, void *context) spin_lock_irq(&sdev->ipc_lock); - /* handle immediate reply from DSP core */ - hda_dsp_ipc_get_reply(sdev); - snd_sof_ipc_reply(sdev, msg); - - if (sdev->code_loading) { - sdev->code_loading = 0; - wake_up(&sdev->waitq); + /* do not check reply if no message was initiated */ + if (sdev->msg) { + hda_dsp_ipc_get_reply(sdev); + snd_sof_ipc_reply(sdev, msg); } cnl_ipc_dsp_done(sdev); diff --git a/sound/soc/sof/intel/hda-ipc.c b/sound/soc/sof/intel/hda-ipc.c index 6aae6f18b3dcaa..1705de45fb420e 100644 --- a/sound/soc/sof/intel/hda-ipc.c +++ b/sound/soc/sof/intel/hda-ipc.c @@ -121,12 +121,6 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev) } -static bool hda_dsp_ipc_is_sof(uint32_t msg) -{ - return (msg & (HDA_DSP_IPC_PURGE_FW | 0xf << 9)) != msg || - (msg & HDA_DSP_IPC_PURGE_FW) != HDA_DSP_IPC_PURGE_FW; -} - /* IPC handler thread */ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context) { @@ -172,18 +166,12 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context) */ spin_lock_irq(&sdev->ipc_lock); - /* handle immediate reply from DSP core - ignore ROM messages */ - if (hda_dsp_ipc_is_sof(msg)) { + /* do not check reply if no message was initiated */ + if (sdev->msg) { hda_dsp_ipc_get_reply(sdev); snd_sof_ipc_reply(sdev, msg); } - /* wake up sleeper if we are loading code */ - if (sdev->code_loading) { - sdev->code_loading = 0; - wake_up(&sdev->waitq); - } - /* set the done bit */ hda_dsp_ipc_dsp_done(sdev); diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c index 6427f0b3a2f113..acece19efacf1b 100644 --- a/sound/soc/sof/intel/hda-loader.c +++ b/sound/soc/sof/intel/hda-loader.c @@ -167,9 +167,6 @@ static int cl_trigger(struct snd_sof_dev *sdev, /* code loader is special case that reuses stream ops */ switch (cmd) { case SNDRV_PCM_TRIGGER_START: - wait_event_timeout(sdev->waitq, !sdev->code_loading, - HDA_DSP_CL_TRIGGER_TIMEOUT); - snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL, 1 << hstream->index, 1 << hstream->index); diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index c72e9a09eee16a..94ef5f2bd38da9 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -644,9 +644,6 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) hda_dsp_ctrl_ppcap_enable(sdev, true); hda_dsp_ctrl_ppcap_int_enable(sdev, true); - /* initialize waitq for code loading */ - init_waitqueue_head(&sdev->waitq); - /* set default mailbox offset for FW ready message */ sdev->dsp_box.offset = HDA_DSP_MBOX_UPLINK_OFFSET; diff --git a/sound/soc/sof/loader.c b/sound/soc/sof/loader.c index 9a9a381a908dee..928b50c98f609b 100644 --- a/sound/soc/sof/loader.c +++ b/sound/soc/sof/loader.c @@ -427,9 +427,6 @@ int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev) const char *fw_filename; int ret; - /* set code loading condition to true */ - sdev->code_loading = 1; - /* Don't request firmware again if firmware is already requested */ if (plat_data->fw) return 0; diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 6101c441c7c633..0202af6d43baec 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -424,10 +424,6 @@ struct snd_sof_dev { int ipc_timeout; int boot_timeout; - /* Wait queue for code loading */ - wait_queue_head_t waitq; - int code_loading; - /* DMA for Trace */ struct snd_dma_buffer dmatb; struct snd_dma_buffer dmatp;