summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2019-08-07 11:01:58 -0400
committerMark Brown <broonie@kernel.org>2019-08-09 08:25:05 -0400
commit0b76f512c206dd7c3f7761b24826887af80204c6 (patch)
tree009fc30359cd853bb80bd4e52abe9a768a38f378
parent0fd70e22a0ffebd13028bf2c7da6b747070475bf (diff)
ASoC: SOF: Remove call to snd_sof_dsp_mailbox_init
This is reserved for some historical reason, we didn't enable memory windows for byt/bdw at the beginning, to make it compatible, we get those mailbox offsets from fw_ready struct firstly, and then update them if they existed in the following memory windows, to make sure the mailbox still can be used if no memory windows are created. With this change all platforms have the same implementation for xxx_fw_ready function so that we can refactor it in a common file. Suggested-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190807150203.26359-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sof/intel/bdw.c5
-rw-r--r--sound/soc/sof/intel/byt.c5
2 files changed, 0 insertions, 10 deletions
diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c
index 4bb9636da990..94be024a99eb 100644
--- a/sound/soc/sof/intel/bdw.c
+++ b/sound/soc/sof/intel/bdw.c
@@ -455,11 +455,6 @@ static int bdw_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
455 sof_block_read(sdev, sdev->mmio_bar, offset, fw_ready, 455 sof_block_read(sdev, sdev->mmio_bar, offset, fw_ready,
456 sizeof(*fw_ready)); 456 sizeof(*fw_ready));
457 457
458 snd_sof_dsp_mailbox_init(sdev, fw_ready->dspbox_offset,
459 fw_ready->dspbox_size,
460 fw_ready->hostbox_offset,
461 fw_ready->hostbox_size);
462
463 /* make sure ABI version is compatible */ 458 /* make sure ABI version is compatible */
464 ret = snd_sof_ipc_valid(sdev); 459 ret = snd_sof_ipc_valid(sdev);
465 if (ret < 0) 460 if (ret < 0)
diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c
index 000d576f6a8d..cb8f02ee09f2 100644
--- a/sound/soc/sof/intel/byt.c
+++ b/sound/soc/sof/intel/byt.c
@@ -237,11 +237,6 @@ static int byt_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
237 sof_block_read(sdev, sdev->mmio_bar, offset, fw_ready, 237 sof_block_read(sdev, sdev->mmio_bar, offset, fw_ready,
238 sizeof(*fw_ready)); 238 sizeof(*fw_ready));
239 239
240 snd_sof_dsp_mailbox_init(sdev, fw_ready->dspbox_offset,
241 fw_ready->dspbox_size,
242 fw_ready->hostbox_offset,
243 fw_ready->hostbox_size);
244
245 /* make sure ABI version is compatible */ 240 /* make sure ABI version is compatible */
246 ret = snd_sof_ipc_valid(sdev); 241 ret = snd_sof_ipc_valid(sdev);
247 if (ret < 0) 242 if (ret < 0)