Lines Matching full:dsp

3  * cnl-sst.c - DSP library functions for CNL platform
10 * HDA DSP library functions for SKL platform
23 #include "../common/sst-dsp.h"
24 #include "../common/sst-dsp-priv.h"
26 #include "cnl-sst-dsp.h"
62 dev_err(ctx->dev, "dsp core0 power up failed\n"); in cnl_prepare_fw()
74 dev_err(ctx->dev, "Start dsp core failed ret: %d\n", ret); in cnl_prepare_fw()
209 dev_err(ctx->dev, "enable dsp core %d failed: %d\n", in cnl_set_dsp_D0()
224 "dsp boot timeout, status=%#x error=%#x\n", in cnl_set_dsp_D0()
265 "dsp core %d to d3 failed; continue reset\n", in cnl_set_dsp_D3()
278 dev_err(ctx->dev, "disable dsp core %d failed: %d\n", in cnl_set_dsp_D3()
314 struct sst_dsp *dsp = context; in cnl_dsp_irq_thread_handler() local
315 struct skl_dev *cnl = dsp->thread_context; in cnl_dsp_irq_thread_handler()
322 if (!(dsp->intr_status & CNL_ADSPIS_IPC)) in cnl_dsp_irq_thread_handler()
325 hipcida = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCIDA); in cnl_dsp_irq_thread_handler()
326 hipctdr = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDR); in cnl_dsp_irq_thread_handler()
327 hipctdd = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDD); in cnl_dsp_irq_thread_handler()
329 /* reply message from dsp */ in cnl_dsp_irq_thread_handler()
331 sst_dsp_shim_update_bits(dsp, CNL_ADSP_REG_HIPCCTL, in cnl_dsp_irq_thread_handler()
334 /* clear done bit - tell dsp operation is complete */ in cnl_dsp_irq_thread_handler()
335 sst_dsp_shim_update_bits_forced(dsp, CNL_ADSP_REG_HIPCIDA, in cnl_dsp_irq_thread_handler()
341 sst_dsp_shim_update_bits(dsp, CNL_ADSP_REG_HIPCCTL, in cnl_dsp_irq_thread_handler()
345 /* new message from dsp */ in cnl_dsp_irq_thread_handler()
349 dev_dbg(dsp->dev, "IPC irq: Firmware respond primary:%x", in cnl_dsp_irq_thread_handler()
351 dev_dbg(dsp->dev, "IPC irq: Firmware respond extension:%x", in cnl_dsp_irq_thread_handler()
355 /* Handle Immediate reply from DSP Core */ in cnl_dsp_irq_thread_handler()
358 dev_dbg(dsp->dev, "IPC irq: Notification from firmware\n"); in cnl_dsp_irq_thread_handler()
362 sst_dsp_shim_update_bits_forced(dsp, CNL_ADSP_REG_HIPCTDR, in cnl_dsp_irq_thread_handler()
365 /* set done bit to ack dsp */ in cnl_dsp_irq_thread_handler()
366 sst_dsp_shim_update_bits_forced(dsp, CNL_ADSP_REG_HIPCTDA, in cnl_dsp_irq_thread_handler()
374 cnl_ipc_int_enable(dsp); in cnl_dsp_irq_thread_handler()
392 sst_dsp_outbox_write(ipc->dsp, msg->tx.data, msg->tx.size); in cnl_ipc_tx_msg()
393 sst_dsp_shim_write_unlocked(ipc->dsp, CNL_ADSP_REG_HIPCIDD, in cnl_ipc_tx_msg()
395 sst_dsp_shim_write_unlocked(ipc->dsp, CNL_ADSP_REG_HIPCIDR, in cnl_ipc_tx_msg()
399 static bool cnl_ipc_is_dsp_busy(struct sst_dsp *dsp) in cnl_ipc_is_dsp_busy() argument
403 hipcidr = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCIDR); in cnl_ipc_is_dsp_busy()
414 ipc->dsp = cnl->dsp; in cnl_ipc_init()
437 struct skl_dev **dsp) in cnl_sst_dsp_init() argument
443 ret = skl_sst_ctx_init(dev, irq, fw_name, dsp_ops, dsp, &cnl_dev); in cnl_sst_dsp_init()
449 cnl = *dsp; in cnl_sst_dsp_init()
450 sst = cnl->dsp; in cnl_sst_dsp_init()
479 struct sst_dsp *sst = skl->dsp; in cnl_sst_init_fw()
481 ret = skl->dsp->fw_ops.load_fw(sst); in cnl_sst_init_fw()
497 if (skl->dsp->fw) in cnl_sst_dsp_cleanup()
498 release_firmware(skl->dsp->fw); in cnl_sst_dsp_cleanup()
503 skl->dsp->ops->free(skl->dsp); in cnl_sst_dsp_cleanup()