Commit ef3e199a authored by Jie Yang's avatar Jie Yang Committed by Mark Brown

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: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 624729fd
snd-soc-sst-dsp-objs := sst-dsp.o sst-firmware.o snd-soc-sst-dsp-objs := sst-dsp.o
snd-soc-sst-acpi-objs := sst-acpi.o snd-soc-sst-acpi-objs := sst-acpi.o
snd-soc-sst-ipc-objs := sst-ipc.o snd-soc-sst-ipc-objs := sst-ipc.o
ifneq ($(CONFIG_DW_DMAC_CORE),)
snd-soc-sst-dsp-objs += sst-firmware.o
endif
obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o
obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o
...@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, size_t bytes) ...@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, size_t bytes)
} }
EXPORT_SYMBOL_GPL(sst_dsp_inbox_read); EXPORT_SYMBOL_GPL(sst_dsp_inbox_read);
#if IS_ENABLED(CONFIG_DW_DMAC_CORE)
struct sst_dsp *sst_dsp_new(struct device *dev, struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata) struct sst_dsp_device *sst_dev, struct sst_pdata *pdata)
{ {
...@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst) ...@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst)
sst_dma_free(sst->dma); sst_dma_free(sst->dma);
} }
EXPORT_SYMBOL_GPL(sst_dsp_free); EXPORT_SYMBOL_GPL(sst_dsp_free);
#endif
/* Module information */ /* Module information */
MODULE_AUTHOR("Liam Girdwood"); MODULE_AUTHOR("Liam Girdwood");
......
...@@ -216,10 +216,12 @@ struct sst_pdata { ...@@ -216,10 +216,12 @@ struct sst_pdata {
void *dsp; void *dsp;
}; };
#if IS_ENABLED(CONFIG_DW_DMAC_CORE)
/* Initialization */ /* Initialization */
struct sst_dsp *sst_dsp_new(struct device *dev, struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata); struct sst_dsp_device *sst_dev, struct sst_pdata *pdata);
void sst_dsp_free(struct sst_dsp *sst); void sst_dsp_free(struct sst_dsp *sst);
#endif
/* SHIM Read / Write */ /* SHIM Read / Write */
void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value); void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment