Lines Matching defs:sdev
74 static void byt_reset_dsp_disable_int(struct snd_sof_dev *sdev)
77 snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_IMRX, 0x3, 0x3);
78 snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_IMRD, 0x3, 0x3);
81 snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_CSR,
86 static int byt_suspend(struct snd_sof_dev *sdev, u32 target_state)
88 byt_reset_dsp_disable_int(sdev);
93 static int byt_resume(struct snd_sof_dev *sdev)
96 snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_IMRX,
103 static int byt_remove(struct snd_sof_dev *sdev)
105 byt_reset_dsp_disable_int(sdev);
110 static int byt_acpi_probe(struct snd_sof_dev *sdev)
112 struct snd_sof_pdata *pdata = sdev->pdata;
115 container_of(sdev->dev, struct platform_device, dev);
121 chip = get_chip_info(sdev->pdata);
123 dev_err(sdev->dev, "error: no such device supported\n");
127 sdev->num_cores = chip->cores_num;
130 ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31));
132 dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret);
143 dev_err(sdev->dev, "error: failed to get LPE base at idx %d\n",
148 dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size);
149 sdev->bar[DSP_BAR] = devm_ioremap(sdev->dev, base, size);
150 if (!sdev->bar[DSP_BAR]) {
151 dev_err(sdev->dev, "error: failed to ioremap LPE base 0x%x size 0x%x\n",
155 dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[DSP_BAR]);
158 sdev->mmio_bar = DSP_BAR;
159 sdev->mailbox_bar = DSP_BAR;
171 dev_err(sdev->dev, "error: failed to get IMR base at idx %d\n",
178 dev_info(sdev->dev, "IMR not set by BIOS. Ignoring\n");
182 dev_dbg(sdev->dev, "IMR base at 0x%x size 0x%x", base, size);
183 sdev->bar[IMR_BAR] = devm_ioremap(sdev->dev, base, size);
184 if (!sdev->bar[IMR_BAR]) {
185 dev_err(sdev->dev, "error: failed to ioremap IMR base 0x%x size 0x%x\n",
189 dev_dbg(sdev->dev, "IMR VADDR %p\n", sdev->bar[IMR_BAR]);
193 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc);
194 if (sdev->ipc_irq < 0)
195 return sdev->ipc_irq;
197 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq);
198 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq,
200 IRQF_SHARED, "AudioDSP", sdev);
202 dev_err(sdev->dev, "error: failed to register IRQ %d\n",
203 sdev->ipc_irq);
208 snd_sof_dsp_update_bits64(sdev, DSP_BAR, SHIM_IMRX,
213 sdev->dsp_box.offset = MBOX_OFFSET;