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()
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()
112 struct platform_device *pdev = to_platform_device(sdev->dev); in byt_acpi_probe()
118 chip = get_chip_info(sdev->pdata); in byt_acpi_probe()
120 dev_err(sdev->dev, "error: no such device supported\n"); in byt_acpi_probe()
121 return -EIO; in byt_acpi_probe()
124 sdev->num_cores = chip->cores_num; in byt_acpi_probe()
127 ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31)); in byt_acpi_probe()
129 dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret); in byt_acpi_probe()
135 desc->resindex_lpe_base); in byt_acpi_probe()
137 base = mmio->start; in byt_acpi_probe()
140 dev_err(sdev->dev, "error: failed to get LPE base at idx %d\n", in byt_acpi_probe()
141 desc->resindex_lpe_base); in byt_acpi_probe()
142 return -EINVAL; in byt_acpi_probe()
145 dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size); in byt_acpi_probe()
146 sdev->bar[DSP_BAR] = devm_ioremap(sdev->dev, base, size); in byt_acpi_probe()
147 if (!sdev->bar[DSP_BAR]) { in byt_acpi_probe()
148 dev_err(sdev->dev, "error: failed to ioremap LPE base 0x%x size 0x%x\n", in byt_acpi_probe()
150 return -ENODEV; in byt_acpi_probe()
152 dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[DSP_BAR]); in byt_acpi_probe()
155 sdev->mmio_bar = DSP_BAR; in byt_acpi_probe()
156 sdev->mailbox_bar = DSP_BAR; in byt_acpi_probe()
158 /* IMR base - optional */ in byt_acpi_probe()
159 if (desc->resindex_imr_base == -1) in byt_acpi_probe()
163 desc->resindex_imr_base); in byt_acpi_probe()
165 base = mmio->start; in byt_acpi_probe()
168 dev_err(sdev->dev, "error: failed to get IMR base at idx %d\n", in byt_acpi_probe()
169 desc->resindex_imr_base); in byt_acpi_probe()
170 return -ENODEV; in byt_acpi_probe()
175 dev_info(sdev->dev, "IMR not set by BIOS. Ignoring\n"); in byt_acpi_probe()
179 dev_dbg(sdev->dev, "IMR base at 0x%x size 0x%x", base, size); in byt_acpi_probe()
180 sdev->bar[IMR_BAR] = devm_ioremap(sdev->dev, base, size); in byt_acpi_probe()
181 if (!sdev->bar[IMR_BAR]) { in byt_acpi_probe()
182 dev_err(sdev->dev, "error: failed to ioremap IMR base 0x%x size 0x%x\n", in byt_acpi_probe()
184 return -ENODEV; in byt_acpi_probe()
186 dev_dbg(sdev->dev, "IMR VADDR %p\n", sdev->bar[IMR_BAR]); in byt_acpi_probe()
190 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc); in byt_acpi_probe()
191 if (sdev->ipc_irq < 0) in byt_acpi_probe()
192 return sdev->ipc_irq; in byt_acpi_probe()
194 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq); in byt_acpi_probe()
195 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq, in byt_acpi_probe()
199 dev_err(sdev->dev, "error: failed to register IRQ %d\n", in byt_acpi_probe()
200 sdev->ipc_irq); in byt_acpi_probe()
210 sdev->dsp_box.offset = MBOX_OFFSET; in byt_acpi_probe()
221 /* DSP core boot / reset */
223 .reset = atom_reset,
225 /* Register IO uses direct mmio */
227 /* Block IO */
231 /* Mailbox IO */
296 /* DSP core boot / reset */
298 .reset = atom_reset,
300 /* Register IO uses direct mmio */
302 /* Block IO */
306 /* Mailbox IO */
380 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
383 [SOF_IPC_TYPE_3] = "sof-byt.ri",
385 .nocodec_tplg_filename = "sof-byt-nocodec.tplg",
402 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
405 [SOF_IPC_TYPE_3] = "sof-byt.ri",
407 .nocodec_tplg_filename = "sof-byt-nocodec.tplg",
424 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
427 [SOF_IPC_TYPE_3] = "sof-cht.ri",
429 .nocodec_tplg_filename = "sof-cht-nocodec.tplg",
442 struct device *dev = &pdev->dev; in sof_baytrail_probe()
447 id = acpi_match_device(dev->driver->acpi_match_table, dev); in sof_baytrail_probe()
449 return -ENODEV; in sof_baytrail_probe()
451 ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); in sof_baytrail_probe()
453 dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n"); in sof_baytrail_probe()
454 return -ENODEV; in sof_baytrail_probe()
457 desc = (const struct sof_dev_desc *)id->driver_data; in sof_baytrail_probe()
469 .name = "sof-audio-acpi-intel-byt",