Commit b2958183 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

ASoC: SOF: ipc: Remove snd_sof_dsp_mailbox_init()

The snd_sof_dsp_mailbox_init() is called only from sof_get_windows()
to set the sdev->dsp_box.offset/size and sdev->host_box.offset/size

Instead of using a function, set the offsets and sizes like we do for the
other boxes in sof_get_windows().
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210915122116.18317-3-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6375dbdb
...@@ -790,22 +790,6 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, ...@@ -790,22 +790,6 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
} }
EXPORT_SYMBOL(snd_sof_ipc_set_get_comp_data); EXPORT_SYMBOL(snd_sof_ipc_set_get_comp_data);
/*
* IPC layer enumeration.
*/
int snd_sof_dsp_mailbox_init(struct snd_sof_dev *sdev, u32 dspbox,
size_t dspbox_size, u32 hostbox,
size_t hostbox_size)
{
sdev->dsp_box.offset = dspbox;
sdev->dsp_box.size = dspbox_size;
sdev->host_box.offset = hostbox;
sdev->host_box.size = hostbox_size;
return 0;
}
EXPORT_SYMBOL(snd_sof_dsp_mailbox_init);
int snd_sof_ipc_valid(struct snd_sof_dev *sdev) int snd_sof_ipc_valid(struct snd_sof_dev *sdev)
{ {
struct sof_ipc_fw_ready *ready = &sdev->fw_ready; struct sof_ipc_fw_ready *ready = &sdev->fw_ready;
......
...@@ -470,8 +470,12 @@ static void sof_get_windows(struct snd_sof_dev *sdev) ...@@ -470,8 +470,12 @@ static void sof_get_windows(struct snd_sof_dev *sdev)
return; return;
} }
snd_sof_dsp_mailbox_init(sdev, inbox_offset, inbox_size, sdev->dsp_box.offset = inbox_offset;
outbox_offset, outbox_size); sdev->dsp_box.size = inbox_size;
sdev->host_box.offset = outbox_offset;
sdev->host_box.size = outbox_size;
sdev->stream_box.offset = stream_offset; sdev->stream_box.offset = stream_offset;
sdev->stream_box.size = stream_size; sdev->stream_box.size = stream_size;
......
...@@ -502,9 +502,6 @@ void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id); ...@@ -502,9 +502,6 @@ void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev); void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev);
int snd_sof_ipc_stream_pcm_params(struct snd_sof_dev *sdev, int snd_sof_ipc_stream_pcm_params(struct snd_sof_dev *sdev,
struct sof_ipc_pcm_params *params); struct sof_ipc_pcm_params *params);
int snd_sof_dsp_mailbox_init(struct snd_sof_dev *sdev, u32 dspbox,
size_t dspbox_size, u32 hostbox,
size_t hostbox_size);
int snd_sof_ipc_valid(struct snd_sof_dev *sdev); int snd_sof_ipc_valid(struct snd_sof_dev *sdev);
int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header, int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header,
void *msg_data, size_t msg_bytes, void *reply_data, void *msg_data, size_t msg_bytes, void *reply_data,
......
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