Lines Matching defs:sdev
27 struct snd_sof_dev *sdev;
34 static void imx8m_get_reply(struct snd_sof_dev *sdev)
36 struct snd_sof_ipc_msg *msg = sdev->msg;
41 dev_warn(sdev->dev, "unexpected ipc interrupt\n");
46 sof_mailbox_read(sdev, sdev->host_box.offset, &reply, sizeof(reply));
54 dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n",
61 sof_mailbox_read(sdev, sdev->host_box.offset,
68 static int imx8m_get_mailbox_offset(struct snd_sof_dev *sdev)
73 static int imx8m_get_window_offset(struct snd_sof_dev *sdev, u32 id)
83 spin_lock_irqsave(&priv->sdev->ipc_lock, flags);
84 imx8m_get_reply(priv->sdev);
85 snd_sof_ipc_reply(priv->sdev, 0);
86 spin_unlock_irqrestore(&priv->sdev->ipc_lock, flags);
95 sof_mailbox_read(priv->sdev, priv->sdev->debug_box.offset + 4, &p, sizeof(p));
99 snd_sof_dsp_panic(priv->sdev, p);
101 snd_sof_ipc_msgs_rx(priv->sdev);
109 static int imx8m_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg)
111 struct imx8m_priv *priv = sdev->pdata->hw_pdata;
113 sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data,
123 static int imx8m_run(struct snd_sof_dev *sdev)
129 static int imx8m_probe(struct snd_sof_dev *sdev)
132 container_of(sdev->dev, struct platform_device, dev);
145 sdev->pdata->hw_pdata = priv;
146 priv->dev = sdev->dev;
147 priv->sdev = sdev;
149 priv->ipc_dev = platform_device_register_data(sdev->dev, "imx-dsp",
159 dev_err(sdev->dev, "Failed to get drvdata\n");
172 dev_err(sdev->dev, "error: failed to get DSP base at idx 0\n");
177 sdev->bar[SOF_FW_BLK_TYPE_IRAM] = devm_ioremap(sdev->dev, base, size);
178 if (!sdev->bar[SOF_FW_BLK_TYPE_IRAM]) {
179 dev_err(sdev->dev, "failed to ioremap base 0x%x size 0x%x\n",
184 sdev->mmio_bar = SOF_FW_BLK_TYPE_IRAM;
200 sdev->bar[SOF_FW_BLK_TYPE_SRAM] = devm_ioremap_wc(sdev->dev, res.start,
202 if (!sdev->bar[SOF_FW_BLK_TYPE_SRAM]) {
203 dev_err(sdev->dev, "failed to ioremap mem 0x%x size 0x%x\n",
208 sdev->mailbox_bar = SOF_FW_BLK_TYPE_SRAM;
211 sdev->dsp_box.offset = MBOX_OFFSET;
220 static int imx8m_remove(struct snd_sof_dev *sdev)
222 struct imx8m_priv *priv = sdev->pdata->hw_pdata;
230 static int imx8m_get_bar_index(struct snd_sof_dev *sdev, u32 type)
235 static void imx8m_ipc_msg_data(struct snd_sof_dev *sdev,
239 sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz);
242 static int imx8m_ipc_pcm_params(struct snd_sof_dev *sdev,