Commit bb9c93f5 authored by Daniel Baluta's avatar Daniel Baluta Committed by Mark Brown

ASoC: SOF: Introduce snd_sof_dsp_get_mailbox_offset

This will allow us to export mailbox offset in order to
read the fw_ready message from.
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6eebd390
...@@ -119,6 +119,15 @@ static inline int snd_sof_dsp_get_bar_index(struct snd_sof_dev *sdev, u32 type) ...@@ -119,6 +119,15 @@ static inline int snd_sof_dsp_get_bar_index(struct snd_sof_dev *sdev, u32 type)
return sdev->mmio_bar; return sdev->mmio_bar;
} }
static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev)
{
if (sof_ops(sdev)->get_mailbox_offset)
return sof_ops(sdev)->get_mailbox_offset(sdev);
dev_err(sdev->dev, "error: %s not defined\n", __func__);
return -ENOTSUPP;
}
/* power management */ /* power management */
static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev) static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev)
{ {
......
...@@ -198,6 +198,8 @@ struct snd_sof_dsp_ops { ...@@ -198,6 +198,8 @@ struct snd_sof_dsp_ops {
/* misc */ /* misc */
int (*get_bar_index)(struct snd_sof_dev *sdev, int (*get_bar_index)(struct snd_sof_dev *sdev,
u32 type); /* optional */ u32 type); /* optional */
int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
/* DAI ops */ /* DAI ops */
struct snd_soc_dai_driver *drv; struct snd_soc_dai_driver *drv;
int num_drv; int num_drv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment