diff options
author | Jie Yang <yang.jie@intel.com> | 2015-10-22 01:55:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-22 09:01:51 -0400 |
commit | ef3e199a49c8e605e326ae60c5e156bfb1ca7e3d (patch) | |
tree | c75d7f69dbc0d6aa9e0166f40f9c4bc898b78b1e | |
parent | 624729fd51871bfbddb647764f180126789a29ee (diff) |
ASoC: Intel: sst: only use sst-firmware when DW DMAC is available
Currentlly, we use Synopsys DesignWare DMA Controller for
baytrail/haswell/broadwell ADSP firmware loading, but for
skylake, we don't use it, compiling sst-firmware.c may
introduce error when CONFIG_DW_DMAC_CORE is not enabled:
sound/built-in.o: In function `sst_dma_new':
(.text+0xd7b38): undefined reference to `dw_dma_probe'
sound/built-in.o: In function `sst_dma_free':
(.text+0xd7c0a): undefined reference to `dw_dma_remove'
Here we only compile sst-firmware when CONFIG_DW_DMAC_CORE
is selected, to fix the linking error issue.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/common/Makefile | 6 | ||||
-rw-r--r-- | sound/soc/intel/common/sst-dsp.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/common/sst-dsp.h | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile index f24154ca4e98..d9105584c51f 100644 --- a/sound/soc/intel/common/Makefile +++ b/sound/soc/intel/common/Makefile | |||
@@ -1,7 +1,11 @@ | |||
1 | snd-soc-sst-dsp-objs := sst-dsp.o sst-firmware.o | 1 | snd-soc-sst-dsp-objs := sst-dsp.o |
2 | snd-soc-sst-acpi-objs := sst-acpi.o | 2 | snd-soc-sst-acpi-objs := sst-acpi.o |
3 | snd-soc-sst-ipc-objs := sst-ipc.o | 3 | snd-soc-sst-ipc-objs := sst-ipc.o |
4 | 4 | ||
5 | ifneq ($(CONFIG_DW_DMAC_CORE),) | ||
6 | snd-soc-sst-dsp-objs += sst-firmware.o | ||
7 | endif | ||
8 | |||
5 | obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o | 9 | obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o |
6 | obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o | 10 | obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o |
7 | 11 | ||
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index a627236dd1f5..c9452e02e0dd 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c | |||
@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, size_t bytes) | |||
420 | } | 420 | } |
421 | EXPORT_SYMBOL_GPL(sst_dsp_inbox_read); | 421 | EXPORT_SYMBOL_GPL(sst_dsp_inbox_read); |
422 | 422 | ||
423 | #if IS_ENABLED(CONFIG_DW_DMAC_CORE) | ||
423 | struct sst_dsp *sst_dsp_new(struct device *dev, | 424 | struct sst_dsp *sst_dsp_new(struct device *dev, |
424 | struct sst_dsp_device *sst_dev, struct sst_pdata *pdata) | 425 | struct sst_dsp_device *sst_dev, struct sst_pdata *pdata) |
425 | { | 426 | { |
@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst) | |||
484 | sst_dma_free(sst->dma); | 485 | sst_dma_free(sst->dma); |
485 | } | 486 | } |
486 | EXPORT_SYMBOL_GPL(sst_dsp_free); | 487 | EXPORT_SYMBOL_GPL(sst_dsp_free); |
488 | #endif | ||
487 | 489 | ||
488 | /* Module information */ | 490 | /* Module information */ |
489 | MODULE_AUTHOR("Liam Girdwood"); | 491 | MODULE_AUTHOR("Liam Girdwood"); |
diff --git a/sound/soc/intel/common/sst-dsp.h b/sound/soc/intel/common/sst-dsp.h index 1f45f18715c0..859f0de00339 100644 --- a/sound/soc/intel/common/sst-dsp.h +++ b/sound/soc/intel/common/sst-dsp.h | |||
@@ -216,10 +216,12 @@ struct sst_pdata { | |||
216 | void *dsp; | 216 | void *dsp; |
217 | }; | 217 | }; |
218 | 218 | ||
219 | #if IS_ENABLED(CONFIG_DW_DMAC_CORE) | ||
219 | /* Initialization */ | 220 | /* Initialization */ |
220 | struct sst_dsp *sst_dsp_new(struct device *dev, | 221 | struct sst_dsp *sst_dsp_new(struct device *dev, |
221 | struct sst_dsp_device *sst_dev, struct sst_pdata *pdata); | 222 | struct sst_dsp_device *sst_dev, struct sst_pdata *pdata); |
222 | void sst_dsp_free(struct sst_dsp *sst); | 223 | void sst_dsp_free(struct sst_dsp *sst); |
224 | #endif | ||
223 | 225 | ||
224 | /* SHIM Read / Write */ | 226 | /* SHIM Read / Write */ |
225 | void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value); | 227 | void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value); |