Lines Matching +full:probe +full:- +full:reset

1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
18 #include <sound/soc-acpi.h>
19 #include <sound/soc-acpi-intel-match.h>
20 #include <sound/intel-dsp-config.h>
24 #include "../sof-acpi-dev.h"
25 #include "../sof-audio.h"
26 #include "../../intel/common/soc-intel-quirks.h"
80 /* Put DSP into reset, set reset vector */ in byt_reset_dsp_disable_int()
110 struct snd_sof_pdata *pdata = sdev->pdata; in byt_acpi_probe()
111 const struct sof_dev_desc *desc = pdata->desc; in byt_acpi_probe()
113 container_of(sdev->dev, struct platform_device, dev); in byt_acpi_probe()
119 chip = get_chip_info(sdev->pdata); in byt_acpi_probe()
121 dev_err(sdev->dev, "error: no such device supported\n"); in byt_acpi_probe()
122 return -EIO; in byt_acpi_probe()
125 sdev->num_cores = chip->cores_num; in byt_acpi_probe()
128 ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31)); in byt_acpi_probe()
130 dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret); in byt_acpi_probe()
136 desc->resindex_lpe_base); in byt_acpi_probe()
138 base = mmio->start; in byt_acpi_probe()
141 dev_err(sdev->dev, "error: failed to get LPE base at idx %d\n", in byt_acpi_probe()
142 desc->resindex_lpe_base); in byt_acpi_probe()
143 return -EINVAL; in byt_acpi_probe()
146 dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size); in byt_acpi_probe()
147 sdev->bar[DSP_BAR] = devm_ioremap(sdev->dev, base, size); in byt_acpi_probe()
148 if (!sdev->bar[DSP_BAR]) { in byt_acpi_probe()
149 dev_err(sdev->dev, "error: failed to ioremap LPE base 0x%x size 0x%x\n", in byt_acpi_probe()
151 return -ENODEV; in byt_acpi_probe()
153 dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[DSP_BAR]); in byt_acpi_probe()
156 sdev->mmio_bar = DSP_BAR; in byt_acpi_probe()
157 sdev->mailbox_bar = DSP_BAR; in byt_acpi_probe()
159 /* IMR base - optional */ in byt_acpi_probe()
160 if (desc->resindex_imr_base == -1) in byt_acpi_probe()
164 desc->resindex_imr_base); in byt_acpi_probe()
166 base = mmio->start; in byt_acpi_probe()
169 dev_err(sdev->dev, "error: failed to get IMR base at idx %d\n", in byt_acpi_probe()
170 desc->resindex_imr_base); in byt_acpi_probe()
171 return -ENODEV; in byt_acpi_probe()
176 dev_info(sdev->dev, "IMR not set by BIOS. Ignoring\n"); in byt_acpi_probe()
180 dev_dbg(sdev->dev, "IMR base at 0x%x size 0x%x", base, size); in byt_acpi_probe()
181 sdev->bar[IMR_BAR] = devm_ioremap(sdev->dev, base, size); in byt_acpi_probe()
182 if (!sdev->bar[IMR_BAR]) { in byt_acpi_probe()
183 dev_err(sdev->dev, "error: failed to ioremap IMR base 0x%x size 0x%x\n", in byt_acpi_probe()
185 return -ENODEV; in byt_acpi_probe()
187 dev_dbg(sdev->dev, "IMR VADDR %p\n", sdev->bar[IMR_BAR]); in byt_acpi_probe()
191 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc); in byt_acpi_probe()
192 if (sdev->ipc_irq < 0) in byt_acpi_probe()
193 return sdev->ipc_irq; in byt_acpi_probe()
195 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq); in byt_acpi_probe()
196 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq, in byt_acpi_probe()
200 dev_err(sdev->dev, "error: failed to register IRQ %d\n", in byt_acpi_probe()
201 sdev->ipc_irq); in byt_acpi_probe()
211 sdev->dsp_box.offset = MBOX_OFFSET; in byt_acpi_probe()
219 .probe = byt_acpi_probe,
222 /* DSP core boot / reset */
224 .reset = atom_reset,
294 .probe = byt_acpi_probe,
297 /* DSP core boot / reset */
299 .reset = atom_reset,
381 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
384 [SOF_IPC_TYPE_3] = "sof-byt.ri",
386 .nocodec_tplg_filename = "sof-byt-nocodec.tplg",
403 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
406 [SOF_IPC_TYPE_3] = "sof-byt.ri",
408 .nocodec_tplg_filename = "sof-byt-nocodec.tplg",
425 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
428 [SOF_IPC_TYPE_3] = "sof-cht.ri",
430 .nocodec_tplg_filename = "sof-cht-nocodec.tplg",
443 struct device *dev = &pdev->dev; in sof_baytrail_probe()
448 id = acpi_match_device(dev->driver->acpi_match_table, dev); in sof_baytrail_probe()
450 return -ENODEV; in sof_baytrail_probe()
452 ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); in sof_baytrail_probe()
454 dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n"); in sof_baytrail_probe()
455 return -ENODEV; in sof_baytrail_probe()
458 desc = (const struct sof_dev_desc *)id->driver_data; in sof_baytrail_probe()
467 .probe = sof_baytrail_probe,
470 .name = "sof-audio-acpi-intel-byt",