Lines Matching +full:3 +full:base +full:- +full:x

1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
6 // Copyright(c) 2018-2021 Intel Corporation
13 #include <sound/soc-acpi.h>
14 #include <sound/soc-acpi-intel-match.h>
18 #include "../sof-pci-dev.h"
19 #include "../sof-audio.h"
28 .sof_tplg_filename = "sof-byt.tplg",
54 struct snd_sof_pdata *pdata = sdev->pdata; in tangier_pci_probe()
55 const struct sof_dev_desc *desc = pdata->desc; in tangier_pci_probe()
56 struct pci_dev *pci = to_pci_dev(sdev->dev); in tangier_pci_probe()
58 u32 base, size; in tangier_pci_probe() local
61 chip = get_chip_info(sdev->pdata); in tangier_pci_probe()
63 dev_err(sdev->dev, "error: no such device supported\n"); in tangier_pci_probe()
64 return -EIO; in tangier_pci_probe()
67 sdev->num_cores = chip->cores_num; in tangier_pci_probe()
70 ret = dma_coerce_mask_and_coherent(&pci->dev, DMA_BIT_MASK(31)); in tangier_pci_probe()
72 dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret); in tangier_pci_probe()
76 /* LPE base */ in tangier_pci_probe()
77 base = pci_resource_start(pci, desc->resindex_lpe_base) - IRAM_OFFSET; in tangier_pci_probe()
80 dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size); in tangier_pci_probe()
81 sdev->bar[DSP_BAR] = devm_ioremap(sdev->dev, base, size); in tangier_pci_probe()
82 if (!sdev->bar[DSP_BAR]) { in tangier_pci_probe()
83 dev_err(sdev->dev, "error: failed to ioremap LPE base 0x%x size 0x%x\n", in tangier_pci_probe()
84 base, size); in tangier_pci_probe()
85 return -ENODEV; in tangier_pci_probe()
87 dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[DSP_BAR]); in tangier_pci_probe()
89 /* IMR base - optional */ in tangier_pci_probe()
90 if (desc->resindex_imr_base == -1) in tangier_pci_probe()
93 base = pci_resource_start(pci, desc->resindex_imr_base); in tangier_pci_probe()
94 size = pci_resource_len(pci, desc->resindex_imr_base); in tangier_pci_probe()
97 if (base == 0x55aa55aa || base == 0x0) { in tangier_pci_probe()
98 dev_info(sdev->dev, "IMR not set by BIOS. Ignoring\n"); in tangier_pci_probe()
102 dev_dbg(sdev->dev, "IMR base at 0x%x size 0x%x", base, size); in tangier_pci_probe()
103 sdev->bar[IMR_BAR] = devm_ioremap(sdev->dev, base, size); in tangier_pci_probe()
104 if (!sdev->bar[IMR_BAR]) { in tangier_pci_probe()
105 dev_err(sdev->dev, "error: failed to ioremap IMR base 0x%x size 0x%x\n", in tangier_pci_probe()
106 base, size); in tangier_pci_probe()
107 return -ENODEV; in tangier_pci_probe()
109 dev_dbg(sdev->dev, "IMR VADDR %p\n", sdev->bar[IMR_BAR]); in tangier_pci_probe()
113 sdev->ipc_irq = pci->irq; in tangier_pci_probe()
114 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq); in tangier_pci_probe()
115 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq, in tangier_pci_probe()
119 dev_err(sdev->dev, "error: failed to register IRQ %d\n", in tangier_pci_probe()
120 sdev->ipc_irq); in tangier_pci_probe()
130 sdev->dsp_box.offset = MBOX_OFFSET; in tangier_pci_probe()
186 .num_drv = 3, /* we have only 3 SSPs on byt*/
206 .resindex_lpe_base = 3, /* IRAM, but subtract IRAM offset */
207 .resindex_pcicfg_base = -1,
209 .irqindex_host_ipc = -1,
217 [SOF_IPC_TYPE_3] = "intel/sof-tplg",
220 [SOF_IPC_TYPE_3] = "sof-byt.ri",
222 .nocodec_tplg_filename = "sof-byt.tplg",
235 .name = "sof-audio-pci-intel-tng",