Lines Matching +full:ipc +full:- +full:3

1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
21 #include "../ipc4-priv.h"
24 #include "hda-ipc.h"
25 #include "../sof-audio.h"
66 if (likely(sdev->fw_state == SOF_FW_BOOT_COMPLETE)) { in cnl_ipc4_irq_thread()
67 struct sof_ipc4_msg *data = sdev->ipc->msg.reply_data; in cnl_ipc4_irq_thread()
69 data->primary = primary; in cnl_ipc4_irq_thread()
70 data->extension = extension; in cnl_ipc4_irq_thread()
72 spin_lock_irq(&sdev->ipc_lock); in cnl_ipc4_irq_thread()
76 snd_sof_ipc_reply(sdev, data->primary); in cnl_ipc4_irq_thread()
78 spin_unlock_irq(&sdev->ipc_lock); in cnl_ipc4_irq_thread()
80 dev_dbg_ratelimited(sdev->dev, in cnl_ipc4_irq_thread()
81 "IPC reply before FW_READY: %#x|%#x\n", in cnl_ipc4_irq_thread()
89 sdev->ipc->msg.rx_data = &notification_data; in cnl_ipc4_irq_thread()
91 sdev->ipc->msg.rx_data = NULL; in cnl_ipc4_irq_thread()
102 dev_dbg_ratelimited(sdev->dev, "nothing to do in IPC IRQ thread\n"); in cnl_ipc4_irq_thread()
105 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in cnl_ipc4_irq_thread()
107 if (hdev->delayed_ipc_tx_msg) in cnl_ipc4_irq_thread()
108 cnl_ipc4_send_msg(sdev, hdev->delayed_ipc_tx_msg); in cnl_ipc4_irq_thread()
142 if (likely(sdev->fw_state == SOF_FW_BOOT_COMPLETE)) { in cnl_ipc_irq_thread()
143 spin_lock_irq(&sdev->ipc_lock); in cnl_ipc_irq_thread()
151 spin_unlock_irq(&sdev->ipc_lock); in cnl_ipc_irq_thread()
153 dev_dbg_ratelimited(sdev->dev, "IPC reply before FW_READY: %#x\n", in cnl_ipc_irq_thread()
169 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; in cnl_ipc_irq_thread()
180 if (sdev->fw_state == SOF_FW_BOOT_IN_PROGRESS && in cnl_ipc_irq_thread()
181 hda->boot_iteration < HDA_FW_BOOT_ATTEMPTS) in cnl_ipc_irq_thread()
199 dev_dbg_ratelimited(sdev->dev, in cnl_ipc_irq_thread()
200 "nothing to do in IPC IRQ thread\n"); in cnl_ipc_irq_thread()
229 * set DONE bit - tell DSP we have received the reply msg in cnl_ipc_dsp_done()
247 struct sof_ipc_pm_gate *pm_gate = msg->msg_data; in cnl_compact_ipc_compress()
249 if (pm_gate->hdr.cmd == (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_GATE)) { in cnl_compact_ipc_compress()
254 *dd = pm_gate->flags; in cnl_compact_ipc_compress()
264 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in cnl_ipc4_send_msg()
265 struct sof_ipc4_msg *msg_data = msg->msg_data; in cnl_ipc4_send_msg()
268 hdev->delayed_ipc_tx_msg = msg; in cnl_ipc4_send_msg()
272 hdev->delayed_ipc_tx_msg = NULL; in cnl_ipc4_send_msg()
275 if (msg_data->data_size) in cnl_ipc4_send_msg()
276 sof_mailbox_write(sdev, sdev->host_box.offset, msg_data->data_ptr, in cnl_ipc4_send_msg()
277 msg_data->data_size); in cnl_ipc4_send_msg()
279 snd_sof_dsp_write(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDD, msg_data->extension); in cnl_ipc4_send_msg()
281 msg_data->primary | CNL_DSP_REG_HIPCIDR_BUSY); in cnl_ipc4_send_msg()
290 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in cnl_ipc_send_msg()
296 * Currently the only compact IPC supported is the PM_GATE in cnl_ipc_send_msg()
297 * IPC which is used for transitioning the DSP between the in cnl_ipc_send_msg()
300 * that a compact IPC results in the DSP exiting D0I3 without in cnl_ipc_send_msg()
304 /* send the message via IPC registers */ in cnl_ipc_send_msg()
313 sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, in cnl_ipc_send_msg()
314 msg->msg_size); in cnl_ipc_send_msg()
318 hdr = msg->msg_data; in cnl_ipc_send_msg()
323 * IPCs are sent at a high-rate. mod_delayed_work() in cnl_ipc_send_msg()
326 * CTX_SAVE IPC, which is sent before the DSP enters D3. in cnl_ipc_send_msg()
328 if (hdr->cmd != (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_CTX_SAVE)) in cnl_ipc_send_msg()
329 mod_delayed_work(system_wq, &hdev->d0i3_work, in cnl_ipc_send_msg()
343 /* read IPC status */ in cnl_ipc_dump()
348 /* dump the IPC regs */ in cnl_ipc_dump()
350 dev_err(sdev->dev, in cnl_ipc_dump()
369 /* dump the IPC regs */ in cnl_ipc4_dump()
371 dev_err(sdev->dev, in cnl_ipc4_dump()
372 "Host IPC initiator: %#x|%#x|%#x, target: %#x|%#x|%#x, ctl: %#x\n", in cnl_ipc4_dump()
388 /* ipc */ in sof_cnl_ops_init()
389 if (sdev->pdata->ipc_type == SOF_IPC) { in sof_cnl_ops_init()
393 /* ipc */ in sof_cnl_ops_init()
402 if (sdev->pdata->ipc_type == SOF_INTEL_IPC4) { in sof_cnl_ops_init()
405 sdev->private = devm_kzalloc(sdev->dev, sizeof(*ipc4_data), GFP_KERNEL); in sof_cnl_ops_init()
406 if (!sdev->private) in sof_cnl_ops_init()
407 return -ENOMEM; in sof_cnl_ops_init()
409 ipc4_data = sdev->private; in sof_cnl_ops_init()
410 ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET; in sof_cnl_ops_init()
412 ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_1_8; in sof_cnl_ops_init()
415 ipc4_data->load_library = hda_dsp_ipc4_load_library; in sof_cnl_ops_init()
420 /* ipc */ in sof_cnl_ops_init()
453 .host_managed_cores_mask = GENMASK(3, 0),
481 * two cores, it cannot support the IceLake-specific power-up sequences