Lines Matching refs:sst_drv_ctx
115 int sst_post_message_mrfld(struct intel_sst_drv *sst_drv_ctx, in sst_post_message_mrfld() argument
124 dev_dbg(sst_drv_ctx->dev, "Enter: sync: %d\n", sync); in sst_post_message_mrfld()
125 spin_lock_irqsave(&sst_drv_ctx->ipc_spin_lock, irq_flags); in sst_post_message_mrfld()
126 header.full = sst_shim_read64(sst_drv_ctx->shim, SST_IPCX); in sst_post_message_mrfld()
130 dev_err(sst_drv_ctx->dev, in sst_post_message_mrfld()
137 header.full = sst_shim_read64(sst_drv_ctx->shim, SST_IPCX); in sst_post_message_mrfld()
140 if (list_empty(&sst_drv_ctx->ipc_dispatch_list)) { in sst_post_message_mrfld()
142 spin_unlock_irqrestore(&sst_drv_ctx->ipc_spin_lock, irq_flags); in sst_post_message_mrfld()
143 dev_dbg(sst_drv_ctx->dev, in sst_post_message_mrfld()
149 spin_unlock_irqrestore(&sst_drv_ctx->ipc_spin_lock, irq_flags); in sst_post_message_mrfld()
150 dev_dbg(sst_drv_ctx->dev, "Busy not free... post later\n"); in sst_post_message_mrfld()
155 msg = list_entry(sst_drv_ctx->ipc_dispatch_list.next, in sst_post_message_mrfld()
159 dev_dbg(sst_drv_ctx->dev, "sst: Post message: header = %x\n", in sst_post_message_mrfld()
161 dev_dbg(sst_drv_ctx->dev, "sst: size = 0x%x\n", in sst_post_message_mrfld()
165 memcpy_toio(sst_drv_ctx->mailbox + SST_MAILBOX_SEND, in sst_post_message_mrfld()
169 sst_shim_write64(sst_drv_ctx->shim, SST_IPCX, msg->mrfld_header.full); in sst_post_message_mrfld()
172 spin_unlock_irqrestore(&sst_drv_ctx->ipc_spin_lock, irq_flags); in sst_post_message_mrfld()
178 void intel_sst_clear_intr_mrfld(struct intel_sst_drv *sst_drv_ctx) in intel_sst_clear_intr_mrfld() argument
185 spin_lock_irqsave(&sst_drv_ctx->ipc_spin_lock, irq_flags); in intel_sst_clear_intr_mrfld()
186 imr.full = sst_shim_read64(sst_drv_ctx->shim, SST_IMRX); in intel_sst_clear_intr_mrfld()
187 isr.full = sst_shim_read64(sst_drv_ctx->shim, SST_ISRX); in intel_sst_clear_intr_mrfld()
191 sst_shim_write64(sst_drv_ctx->shim, SST_ISRX, isr.full); in intel_sst_clear_intr_mrfld()
194 clear_ipc.full = sst_shim_read64(sst_drv_ctx->shim, SST_IPCD); in intel_sst_clear_intr_mrfld()
199 sst_shim_write64(sst_drv_ctx->shim, SST_IPCD, clear_ipc.full); in intel_sst_clear_intr_mrfld()
202 sst_shim_write64(sst_drv_ctx->shim, SST_IMRX, imr.full); in intel_sst_clear_intr_mrfld()
203 spin_unlock_irqrestore(&sst_drv_ctx->ipc_spin_lock, irq_flags); in intel_sst_clear_intr_mrfld()
215 static void process_fw_init(struct intel_sst_drv *sst_drv_ctx, in process_fw_init() argument
222 dev_dbg(sst_drv_ctx->dev, "*** FW Init msg came***\n"); in process_fw_init()
224 sst_set_fw_state_locked(sst_drv_ctx, SST_RESET); in process_fw_init()
225 dev_err(sst_drv_ctx->dev, "FW Init failed, Error %x\n", in process_fw_init()
230 if (memcmp(&sst_drv_ctx->fw_version, &init->fw_version, in process_fw_init()
232 dev_info(sst_drv_ctx->dev, "FW Version %02x.%02x.%02x.%02x\n", in process_fw_init()
235 dev_dbg(sst_drv_ctx->dev, "Build date %s Time %s\n", in process_fw_init()
239 sst_drv_ctx->fw_version.type = init->fw_version.type; in process_fw_init()
240 sst_drv_ctx->fw_version.major = init->fw_version.major; in process_fw_init()
241 sst_drv_ctx->fw_version.minor = init->fw_version.minor; in process_fw_init()
242 sst_drv_ctx->fw_version.build = init->fw_version.build; in process_fw_init()
245 sst_wake_up_block(sst_drv_ctx, retval, FW_DWNL_ID, 0 , NULL, 0); in process_fw_init()
248 static void process_fw_async_msg(struct intel_sst_drv *sst_drv_ctx, in process_fw_async_msg() argument
266 str_id = get_stream_id_mrfld(sst_drv_ctx, pipe_id); in process_fw_async_msg()
268 dev_dbg(sst_drv_ctx->dev, in process_fw_async_msg()
271 stream = &sst_drv_ctx->streams[str_id]; in process_fw_async_msg()
284 str_id = get_stream_id_mrfld(sst_drv_ctx, pipe_id); in process_fw_async_msg()
286 stream = &sst_drv_ctx->streams[str_id]; in process_fw_async_msg()
293 dev_err(sst_drv_ctx->dev, "FW sent async error msg:\n"); in process_fw_async_msg()
300 process_fw_init(sst_drv_ctx, data_offset); in process_fw_async_msg()
305 str_id = get_stream_id_mrfld(sst_drv_ctx, pipe_id); in process_fw_async_msg()
307 dev_err(sst_drv_ctx->dev, in process_fw_async_msg()
313 dev_err(sst_drv_ctx->dev, in process_fw_async_msg()
318 void sst_process_reply_mrfld(struct intel_sst_drv *sst_drv_ctx, in sst_process_reply_mrfld() argument
330 dev_dbg(sst_drv_ctx->dev, "IPC process message header %x payload %x\n", in sst_process_reply_mrfld()
339 process_fw_async_msg(sst_drv_ctx, msg); in sst_process_reply_mrfld()
346 dev_err(sst_drv_ctx->dev, "FW sent error response 0x%x", msg_low); in sst_process_reply_mrfld()
347 sst_wake_up_block(sst_drv_ctx, msg_high.part.result, in sst_process_reply_mrfld()
364 dev_dbg(sst_drv_ctx->dev, "cmd_id %d\n", dsp_hdr->cmd_id); in sst_process_reply_mrfld()
365 if (sst_wake_up_block(sst_drv_ctx, msg_high.part.result, in sst_process_reply_mrfld()
370 sst_wake_up_block(sst_drv_ctx, msg_high.part.result, in sst_process_reply_mrfld()