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 = ¬ification_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()
143 if (likely(sdev->fw_state == SOF_FW_BOOT_COMPLETE)) { in cnl_ipc_irq_thread()
144 spin_lock_irq(&sdev->ipc_lock); in cnl_ipc_irq_thread()
152 spin_unlock_irq(&sdev->ipc_lock); in cnl_ipc_irq_thread()
154 dev_dbg_ratelimited(sdev->dev, "IPC reply before FW_READY: %#x\n", in cnl_ipc_irq_thread()
170 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; in cnl_ipc_irq_thread()
181 if (sdev->fw_state == SOF_FW_BOOT_IN_PROGRESS && in cnl_ipc_irq_thread()
182 hda->boot_iteration < HDA_FW_BOOT_ATTEMPTS) in cnl_ipc_irq_thread()
200 dev_dbg_ratelimited(sdev->dev, in cnl_ipc_irq_thread()
201 "nothing to do in IPC IRQ thread\n"); in cnl_ipc_irq_thread()
231 * set DONE bit - tell DSP we have received the reply msg in cnl_ipc_dsp_done()
249 struct sof_ipc_pm_gate *pm_gate = msg->msg_data; in cnl_compact_ipc_compress()
251 if (pm_gate->hdr.cmd == (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_GATE)) { in cnl_compact_ipc_compress()
256 *dd = pm_gate->flags; in cnl_compact_ipc_compress()
266 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in cnl_ipc4_send_msg()
267 struct sof_ipc4_msg *msg_data = msg->msg_data; in cnl_ipc4_send_msg()
270 hdev->delayed_ipc_tx_msg = msg; in cnl_ipc4_send_msg()
274 hdev->delayed_ipc_tx_msg = NULL; in cnl_ipc4_send_msg()
277 if (msg_data->data_size) in cnl_ipc4_send_msg()
278 sof_mailbox_write(sdev, sdev->host_box.offset, msg_data->data_ptr, in cnl_ipc4_send_msg()
279 msg_data->data_size); in cnl_ipc4_send_msg()
281 snd_sof_dsp_write(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDD, msg_data->extension); in cnl_ipc4_send_msg()
283 msg_data->primary | CNL_DSP_REG_HIPCIDR_BUSY); in cnl_ipc4_send_msg()
293 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in cnl_ipc_send_msg()
299 * Currently the only compact IPC supported is the PM_GATE in cnl_ipc_send_msg()
300 * IPC which is used for transitioning the DSP between the in cnl_ipc_send_msg()
303 * that a compact IPC results in the DSP exiting D0I3 without in cnl_ipc_send_msg()
307 /* send the message via IPC registers */ in cnl_ipc_send_msg()
316 sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, in cnl_ipc_send_msg()
317 msg->msg_size); in cnl_ipc_send_msg()
321 hdr = msg->msg_data; in cnl_ipc_send_msg()
326 * IPCs are sent at a high-rate. mod_delayed_work() in cnl_ipc_send_msg()
329 * CTX_SAVE IPC, which is sent before the DSP enters D3. in cnl_ipc_send_msg()
331 if (hdr->cmd != (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_CTX_SAVE)) in cnl_ipc_send_msg()
332 mod_delayed_work(system_wq, &hdev->d0i3_work, in cnl_ipc_send_msg()
347 /* read IPC status */ in cnl_ipc_dump()
352 /* dump the IPC regs */ in cnl_ipc_dump()
354 dev_err(sdev->dev, in cnl_ipc_dump()
374 /* dump the IPC regs */ in cnl_ipc4_dump()
376 dev_err(sdev->dev, in cnl_ipc4_dump()
377 "Host IPC initiator: %#x|%#x|%#x, target: %#x|%#x|%#x, ctl: %#x\n", in cnl_ipc4_dump()
394 /* ipc */ in sof_cnl_ops_init()
395 if (sdev->pdata->ipc_type == SOF_IPC_TYPE_3) { in sof_cnl_ops_init()
399 /* ipc */ in sof_cnl_ops_init()
408 if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { in sof_cnl_ops_init()
411 sdev->private = kzalloc(sizeof(*ipc4_data), GFP_KERNEL); in sof_cnl_ops_init()
412 if (!sdev->private) in sof_cnl_ops_init()
413 return -ENOMEM; in sof_cnl_ops_init()
415 ipc4_data = sdev->private; in sof_cnl_ops_init()
416 ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET; in sof_cnl_ops_init()
418 ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_1_8; in sof_cnl_ops_init()
421 ipc4_data->load_library = hda_dsp_ipc4_load_library; in sof_cnl_ops_init()
426 /* ipc */ in sof_cnl_ops_init()
459 .host_managed_cores_mask = GENMASK(3, 0),
487 * two cores, it cannot support the IceLake-specific power-up sequences