Lines Matching +full:reset +full:- +full:n +full:- +full:io

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()
112 struct snd_sof_pdata *pdata = sdev->pdata; in byt_acpi_probe()
113 const struct sof_dev_desc *desc = pdata->desc; in byt_acpi_probe()
115 container_of(sdev->dev, struct platform_device, dev); in byt_acpi_probe()
121 chip = get_chip_info(sdev->pdata); in byt_acpi_probe()
123 dev_err(sdev->dev, "error: no such device supported\n"); in byt_acpi_probe()
124 return -EIO; in byt_acpi_probe()
127 sdev->num_cores = chip->cores_num; in byt_acpi_probe()
130 ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31)); in byt_acpi_probe()
132 dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret); in byt_acpi_probe()
138 desc->resindex_lpe_base); in byt_acpi_probe()
140 base = mmio->start; in byt_acpi_probe()
143 dev_err(sdev->dev, "error: failed to get LPE base at idx %d\n", in byt_acpi_probe()
144 desc->resindex_lpe_base); in byt_acpi_probe()
145 return -EINVAL; in byt_acpi_probe()
148 dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size); in byt_acpi_probe()
149 sdev->bar[DSP_BAR] = devm_ioremap(sdev->dev, base, size); in byt_acpi_probe()
150 if (!sdev->bar[DSP_BAR]) { in byt_acpi_probe()
151 dev_err(sdev->dev, "error: failed to ioremap LPE base 0x%x size 0x%x\n", in byt_acpi_probe()
153 return -ENODEV; in byt_acpi_probe()
155 dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[DSP_BAR]); in byt_acpi_probe()
158 sdev->mmio_bar = DSP_BAR; in byt_acpi_probe()
159 sdev->mailbox_bar = DSP_BAR; in byt_acpi_probe()
161 /* IMR base - optional */ in byt_acpi_probe()
162 if (desc->resindex_imr_base == -1) in byt_acpi_probe()
166 desc->resindex_imr_base); in byt_acpi_probe()
168 base = mmio->start; in byt_acpi_probe()
171 dev_err(sdev->dev, "error: failed to get IMR base at idx %d\n", in byt_acpi_probe()
172 desc->resindex_imr_base); in byt_acpi_probe()
173 return -ENODEV; in byt_acpi_probe()
178 dev_info(sdev->dev, "IMR not set by BIOS. Ignoring\n"); in byt_acpi_probe()
182 dev_dbg(sdev->dev, "IMR base at 0x%x size 0x%x", base, size); in byt_acpi_probe()
183 sdev->bar[IMR_BAR] = devm_ioremap(sdev->dev, base, size); in byt_acpi_probe()
184 if (!sdev->bar[IMR_BAR]) { in byt_acpi_probe()
185 dev_err(sdev->dev, "error: failed to ioremap IMR base 0x%x size 0x%x\n", in byt_acpi_probe()
187 return -ENODEV; in byt_acpi_probe()
189 dev_dbg(sdev->dev, "IMR VADDR %p\n", sdev->bar[IMR_BAR]); in byt_acpi_probe()
193 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc); in byt_acpi_probe()
194 if (sdev->ipc_irq < 0) in byt_acpi_probe()
195 return sdev->ipc_irq; in byt_acpi_probe()
197 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq); in byt_acpi_probe()
198 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq, in byt_acpi_probe()
202 dev_err(sdev->dev, "error: failed to register IRQ %d\n", in byt_acpi_probe()
203 sdev->ipc_irq); in byt_acpi_probe()
213 sdev->dsp_box.offset = MBOX_OFFSET; in byt_acpi_probe()
224 /* DSP core boot / reset */
226 .reset = atom_reset,
228 /* Register IO */
234 /* Block IO */
238 /* Mailbox IO */
303 /* DSP core boot / reset */
305 .reset = atom_reset,
307 /* Register IO */
313 /* Block IO */
317 /* Mailbox IO */
391 [SOF_IPC] = "intel/sof-tplg",
394 [SOF_IPC] = "sof-byt.ri",
396 .nocodec_tplg_filename = "sof-byt-nocodec.tplg",
413 [SOF_IPC] = "intel/sof-tplg",
416 [SOF_IPC] = "sof-byt.ri",
418 .nocodec_tplg_filename = "sof-byt-nocodec.tplg",
435 [SOF_IPC] = "intel/sof-tplg",
438 [SOF_IPC] = "sof-cht.ri",
440 .nocodec_tplg_filename = "sof-cht-nocodec.tplg",
453 struct device *dev = &pdev->dev; in sof_baytrail_probe()
458 id = acpi_match_device(dev->driver->acpi_match_table, dev); in sof_baytrail_probe()
460 return -ENODEV; in sof_baytrail_probe()
462 ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); in sof_baytrail_probe()
464 dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n"); in sof_baytrail_probe()
465 return -ENODEV; in sof_baytrail_probe()
468 desc = (const struct sof_dev_desc *)id->driver_data; in sof_baytrail_probe()
480 .name = "sof-audio-acpi-intel-byt",