diff options
Diffstat (limited to 'sound/soc/intel/common/sst-acpi.c')
-rw-r--r-- | sound/soc/intel/common/sst-acpi.c | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/sound/soc/intel/common/sst-acpi.c b/sound/soc/intel/common/sst-acpi.c index 67b6d3d52f57..7a85c576dad3 100644 --- a/sound/soc/intel/common/sst-acpi.c +++ b/sound/soc/intel/common/sst-acpi.c | |||
@@ -21,21 +21,12 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | 22 | ||
23 | #include "sst-dsp.h" | 23 | #include "sst-dsp.h" |
24 | #include "sst-acpi.h" | ||
24 | 25 | ||
25 | #define SST_LPT_DSP_DMA_ADDR_OFFSET 0x0F0000 | 26 | #define SST_LPT_DSP_DMA_ADDR_OFFSET 0x0F0000 |
26 | #define SST_WPT_DSP_DMA_ADDR_OFFSET 0x0FE000 | 27 | #define SST_WPT_DSP_DMA_ADDR_OFFSET 0x0FE000 |
27 | #define SST_LPT_DSP_DMA_SIZE (1024 - 1) | 28 | #define SST_LPT_DSP_DMA_SIZE (1024 - 1) |
28 | 29 | ||
29 | /* Descriptor for SST ASoC machine driver */ | ||
30 | struct sst_acpi_mach { | ||
31 | /* ACPI ID for the matching machine driver. Audio codec for instance */ | ||
32 | const u8 id[ACPI_ID_LEN]; | ||
33 | /* machine driver name */ | ||
34 | const char *drv_name; | ||
35 | /* firmware file name */ | ||
36 | const char *fw_filename; | ||
37 | }; | ||
38 | |||
39 | /* Descriptor for setting up SST platform data */ | 30 | /* Descriptor for setting up SST platform data */ |
40 | struct sst_acpi_desc { | 31 | struct sst_acpi_desc { |
41 | const char *drv_name; | 32 | const char *drv_name; |
@@ -88,28 +79,6 @@ static void sst_acpi_fw_cb(const struct firmware *fw, void *context) | |||
88 | return; | 79 | return; |
89 | } | 80 | } |
90 | 81 | ||
91 | static acpi_status sst_acpi_mach_match(acpi_handle handle, u32 level, | ||
92 | void *context, void **ret) | ||
93 | { | ||
94 | *(bool *)context = true; | ||
95 | return AE_OK; | ||
96 | } | ||
97 | |||
98 | static struct sst_acpi_mach *sst_acpi_find_machine( | ||
99 | struct sst_acpi_mach *machines) | ||
100 | { | ||
101 | struct sst_acpi_mach *mach; | ||
102 | bool found = false; | ||
103 | |||
104 | for (mach = machines; mach->id[0]; mach++) | ||
105 | if (ACPI_SUCCESS(acpi_get_devices(mach->id, | ||
106 | sst_acpi_mach_match, | ||
107 | &found, NULL)) && found) | ||
108 | return mach; | ||
109 | |||
110 | return NULL; | ||
111 | } | ||
112 | |||
113 | static int sst_acpi_probe(struct platform_device *pdev) | 82 | static int sst_acpi_probe(struct platform_device *pdev) |
114 | { | 83 | { |
115 | const struct acpi_device_id *id; | 84 | const struct acpi_device_id *id; |
@@ -211,7 +180,7 @@ static int sst_acpi_remove(struct platform_device *pdev) | |||
211 | } | 180 | } |
212 | 181 | ||
213 | static struct sst_acpi_mach haswell_machines[] = { | 182 | static struct sst_acpi_mach haswell_machines[] = { |
214 | { "INT33CA", "haswell-audio", "intel/IntcSST1.bin" }, | 183 | { "INT33CA", "haswell-audio", "intel/IntcSST1.bin", NULL, NULL, NULL }, |
215 | {} | 184 | {} |
216 | }; | 185 | }; |
217 | 186 | ||
@@ -229,7 +198,7 @@ static struct sst_acpi_desc sst_acpi_haswell_desc = { | |||
229 | }; | 198 | }; |
230 | 199 | ||
231 | static struct sst_acpi_mach broadwell_machines[] = { | 200 | static struct sst_acpi_mach broadwell_machines[] = { |
232 | { "INT343A", "broadwell-audio", "intel/IntcSST2.bin" }, | 201 | { "INT343A", "broadwell-audio", "intel/IntcSST2.bin", NULL, NULL, NULL }, |
233 | {} | 202 | {} |
234 | }; | 203 | }; |
235 | 204 | ||
@@ -247,8 +216,8 @@ static struct sst_acpi_desc sst_acpi_broadwell_desc = { | |||
247 | }; | 216 | }; |
248 | 217 | ||
249 | static struct sst_acpi_mach baytrail_machines[] = { | 218 | static struct sst_acpi_mach baytrail_machines[] = { |
250 | { "10EC5640", "byt-rt5640", "intel/fw_sst_0f28.bin-48kHz_i2s_master" }, | 219 | { "10EC5640", "byt-rt5640", "intel/fw_sst_0f28.bin-48kHz_i2s_master", NULL, NULL, NULL }, |
251 | { "193C9890", "byt-max98090", "intel/fw_sst_0f28.bin-48kHz_i2s_master" }, | 220 | { "193C9890", "byt-max98090", "intel/fw_sst_0f28.bin-48kHz_i2s_master", NULL, NULL, NULL }, |
252 | {} | 221 | {} |
253 | }; | 222 | }; |
254 | 223 | ||