summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/pci-tng.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sof/intel/pci-tng.c')
-rw-r--r--sound/soc/sof/intel/pci-tng.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/sound/soc/sof/intel/pci-tng.c b/sound/soc/sof/intel/pci-tng.c
index 6efef225973f..f0f6d9ba8803 100644
--- a/sound/soc/sof/intel/pci-tng.c
+++ b/sound/soc/sof/intel/pci-tng.c
@@ -75,7 +75,11 @@ static int tangier_pci_probe(struct snd_sof_dev *sdev)
/* LPE base */
base = pci_resource_start(pci, desc->resindex_lpe_base) - IRAM_OFFSET;
- size = PCI_BAR_SIZE;
+ size = pci_resource_len(pci, desc->resindex_lpe_base);
+ if (size < PCI_BAR_SIZE) {
+ dev_err(sdev->dev, "error: I/O region is too small.\n");
+ return -ENODEV;
+ }
dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size);
sdev->bar[DSP_BAR] = devm_ioremap(sdev->dev, base, size);
@@ -132,7 +136,7 @@ irq:
return ret;
}
-const struct snd_sof_dsp_ops sof_tng_ops = {
+struct snd_sof_dsp_ops sof_tng_ops = {
/* device init */
.probe = tangier_pci_probe,
@@ -160,7 +164,6 @@ const struct snd_sof_dsp_ops sof_tng_ops = {
/* ipc */
.send_msg = atom_send_msg,
- .fw_ready = sof_fw_ready,
.get_mailbox_offset = atom_get_mailbox_offset,
.get_window_offset = atom_get_window_offset,
@@ -183,9 +186,6 @@ const struct snd_sof_dsp_ops sof_tng_ops = {
.pcm_open = sof_stream_pcm_open,
.pcm_close = sof_stream_pcm_close,
- /* module loading */
- .load_module = snd_sof_parse_module_memcpy,
-
/*Firmware loading */
.load_firmware = snd_sof_load_firmware_memcpy,
@@ -206,6 +206,7 @@ const struct snd_sof_dsp_ops sof_tng_ops = {
const struct sof_intel_dsp_desc tng_chip_info = {
.cores_num = 1,
.host_managed_cores_mask = 1,
+ .hw_ip_version = SOF_INTEL_TANGIER,
};
static const struct sof_dev_desc tng_desc = {
@@ -215,9 +216,17 @@ static const struct sof_dev_desc tng_desc = {
.resindex_imr_base = 0,
.irqindex_host_ipc = -1,
.chip_info = &tng_chip_info,
- .default_fw_path = "intel/sof",
- .default_tplg_path = "intel/sof-tplg",
- .default_fw_filename = "sof-byt.ri",
+ .ipc_supported_mask = BIT(SOF_IPC),
+ .ipc_default = SOF_IPC,
+ .default_fw_path = {
+ [SOF_IPC] = "intel/sof",
+ },
+ .default_tplg_path = {
+ [SOF_IPC] = "intel/sof-tplg",
+ },
+ .default_fw_filename = {
+ [SOF_IPC] = "sof-byt.ri",
+ },
.nocodec_tplg_filename = "sof-byt.tplg",
.ops = &sof_tng_ops,
};