Lines Matching +full:board +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-only
11 // for sharing LPT-LP and WTP-LP AudioDSP architecture expertise and
16 #include <linux/dma-mapping.h>
22 #include <sound/intel-dsp-config.h>
24 #include <sound/soc-acpi.h>
41 memset(&cdev->dx_ctx, 0, sizeof(cdev->dx_ctx));
42 ret = catpt_ipc_enter_dxstate(cdev, CATPT_DX_STATE_D3, &cdev->dx_ctx);
54 dev_err(cdev->dev, "store memdumps failed: %d\n", ret);
60 dev_err(cdev->dev, "store module states failed: %d\n", ret);
66 dev_err(cdev->dev, "store streams ctx failed: %d\n", ret);
84 if (!try_module_get(dev->driver->owner)) {
88 module_put(dev->driver->owner);
92 dev_err(cdev->dev, "boot firmware failed: %d\n", ret);
98 if (cdev->devfmt[i].iface == UINT_MAX)
101 ret = catpt_ipc_set_device_format(cdev, &cdev->devfmt[i]);
111 if (!try_module_get(dev->driver->owner)) {
115 module_put(dev->driver->owner);
130 /* machine board owned by CATPT is removed with this hook */
138 const struct catpt_spec *spec = cdev->spec;
140 struct platform_device *board;
142 mach = snd_soc_acpi_find_machine(spec->machines);
144 dev_info(cdev->dev, "no machines present\n");
148 mach->mach_params.platform = "catpt-platform";
149 board = platform_device_register_data(NULL, mach->drv_name,
152 if (IS_ERR(board)) {
153 dev_err(cdev->dev, "board register failed\n");
154 return PTR_ERR(board);
157 return devm_add_action_or_reset(cdev->dev, board_pdev_unregister,
158 board);
171 dev_err(cdev->dev, "DMAC probe failed: %d\n", ret);
177 dev_err(cdev->dev, "first fw boot failed: %d\n", ret);
183 dev_err(cdev->dev, "register plat comp failed: %d\n", ret);
189 dev_err(cdev->dev, "register board failed: %d\n", ret);
194 pm_runtime_set_active(cdev->dev);
196 pm_runtime_set_autosuspend_delay(cdev->dev, 2000);
197 pm_runtime_use_autosuspend(cdev->dev);
198 pm_runtime_mark_last_busy(cdev->dev);
199 pm_runtime_enable(cdev->dev);
203 snd_soc_unregister_component(cdev->dev);
215 cdev->dev = dev;
216 cdev->spec = spec;
217 init_completion(&cdev->fw_ready);
218 INIT_LIST_HEAD(&cdev->stream_list);
219 spin_lock_init(&cdev->list_lock);
220 mutex_init(&cdev->clk_mutex);
226 cdev->devfmt[CATPT_SSP_IFACE_0].iface = UINT_MAX;
227 cdev->devfmt[CATPT_SSP_IFACE_1].iface = UINT_MAX;
229 catpt_ipc_init(&cdev->ipc, dev);
231 catpt_sram_init(&cdev->dram, spec->host_dram_offset,
233 catpt_sram_init(&cdev->iram, spec->host_iram_offset,
241 struct device *dev = &pdev->dev;
242 const struct acpi_device_id *id;
246 id = acpi_match_device(dev->driver->acpi_match_table, dev);
247 if (!id)
248 return -ENODEV;
250 ret = snd_intel_acpi_dsp_driver_probe(dev, id->id);
253 return -ENODEV;
258 return -ENOMEM;
260 spec = (const struct catpt_spec *)id->driver_data;
264 cdev->lpe_ba = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
265 if (IS_ERR(cdev->lpe_ba))
266 return PTR_ERR(cdev->lpe_ba);
267 cdev->lpe_base = res->start;
270 cdev->pci_ba = devm_platform_ioremap_resource(pdev, 1);
271 if (IS_ERR(cdev->pci_ba))
272 return PTR_ERR(cdev->pci_ba);
275 cdev->dxbuf_vaddr = dmam_alloc_coherent(dev, catpt_dram_size(cdev),
276 &cdev->dxbuf_paddr, GFP_KERNEL);
277 if (!cdev->dxbuf_vaddr)
278 return -ENOMEM;
283 cdev->irq = ret;
287 ret = devm_request_threaded_irq(dev, cdev->irq, catpt_dsp_irq_handler,
300 pm_runtime_disable(cdev->dev);
302 snd_soc_unregister_component(cdev->dev);
306 catpt_sram_free(&cdev->iram);
307 catpt_sram_free(&cdev->dram);
312 .id = "INT33CA",
320 .id = "INT33CA",
324 .id = "INT343A",
328 .id = "10EC5650",
329 .drv_name = "bdw-rt5650",
332 .id = "RT5677CE",
333 .drv_name = "bdw-rt5677",