xref: /openbmc/linux/sound/soc/sof/intel/pci-tng.c (revision 79e790ff)
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2 //
3 // This file is provided under a dual BSD/GPLv2 license.  When using or
4 // redistributing this file, you may do so under either license.
5 //
6 // Copyright(c) 2018-2021 Intel Corporation. All rights reserved.
7 //
8 // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
9 //
10 
11 #include <linux/module.h>
12 #include <linux/pci.h>
13 #include <sound/soc-acpi.h>
14 #include <sound/soc-acpi-intel-match.h>
15 #include <sound/sof.h>
16 #include "../ops.h"
17 #include "../sof-pci-dev.h"
18 
19 /* platform specific devices */
20 #include "shim.h"
21 
22 static struct snd_soc_acpi_mach sof_tng_machines[] = {
23 	{
24 		.id = "INT343A",
25 		.drv_name = "edison",
26 		.sof_fw_filename = "sof-byt.ri",
27 		.sof_tplg_filename = "sof-byt.tplg",
28 	},
29 	{}
30 };
31 
32 static const struct sof_dev_desc tng_desc = {
33 	.machines		= sof_tng_machines,
34 	.resindex_lpe_base	= 3,	/* IRAM, but subtract IRAM offset */
35 	.resindex_pcicfg_base	= -1,
36 	.resindex_imr_base	= 0,
37 	.irqindex_host_ipc	= -1,
38 	.resindex_dma_base	= -1,
39 	.chip_info = &tng_chip_info,
40 	.default_fw_path = "intel/sof",
41 	.default_tplg_path = "intel/sof-tplg",
42 	.default_fw_filename = "sof-byt.ri",
43 	.nocodec_tplg_filename = "sof-byt.tplg",
44 	.ops = &sof_tng_ops,
45 };
46 
47 /* PCI IDs */
48 static const struct pci_device_id sof_pci_ids[] = {
49 	{ PCI_DEVICE(0x8086, 0x119a),
50 		.driver_data = (unsigned long)&tng_desc},
51 	{ 0, }
52 };
53 MODULE_DEVICE_TABLE(pci, sof_pci_ids);
54 
55 /* pci_driver definition */
56 static struct pci_driver snd_sof_pci_intel_tng_driver = {
57 	.name = "sof-audio-pci-intel-tng",
58 	.id_table = sof_pci_ids,
59 	.probe = sof_pci_probe,
60 	.remove = sof_pci_remove,
61 	.shutdown = sof_pci_shutdown,
62 	.driver = {
63 		.pm = &sof_pci_pm,
64 	},
65 };
66 module_pci_driver(snd_sof_pci_intel_tng_driver);
67 
68 MODULE_LICENSE("Dual BSD/GPL");
69 MODULE_IMPORT_NS(SND_SOC_SOF_MERRIFIELD);
70 MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
71