Skip to contentSkip to conversation

ASoC: Intel: dw_pdata can be static

PATCH Applied Liam Girdwood 2 participants 3 messages Oct 29, 2014

Subsystems (3)
lore
Share & tools
lore

Liam Girdwood

author maintainer
#0 lore raw

PATCH 1/1 ASoC: Intel: dw_pdata can be static

From: kbuild test robot <[email protected]>

sound/soc/intel/sst-firmware.c:172:29: sparse: symbol 'dw_pdata' was not declared. Should it be static?

---
 sound/soc/intel/sst-firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/sst-firmware.c +1 -1
index 692a6ae..35788ad 100644
@@ -169,7 +169,7 @@ err:
 	return ret;
 }
 
-struct dw_dma_platform_data dw_pdata = {
+static struct dw_dma_platform_data dw_pdata = {
 	.is_private = 1,
 	.chan_allocation_order = CHAN_ALLOCATION_ASCENDING,
 	.chan_priority = CHAN_PRIORITY_ASCENDING,
Signature · 1 line
2.1.0
author maintainer
#1 lore raw

PATCH 1/1 ASoC: Intel: Add generic support for DSP wake, sleep and stall

Add generic functions to support DSP sleep, wake and stall.

---
 sound/soc/intel/sst-dsp-priv.h |  3 +++
 sound/soc/intel/sst-dsp.c      | 23 +++++++++++++++++++++++
 sound/soc/intel/sst-dsp.h      |  4 ++++
 3 files changed, 30 insertions(+)
sound/soc/intel/sst-dsp-priv.h +3 -0
index be81b86..b9da030 100644
@@ -36,6 +36,9 @@ struct sst_ops {
 	/* DSP core boot / reset */
 	void (*boot)(struct sst_dsp *);
 	void (*reset)(struct sst_dsp *);
+	int (*wake)(struct sst_dsp *);
+	void (*sleep)(struct sst_dsp *);
+	void (*stall)(struct sst_dsp *);
 
 	/* Shim IO */
 	void (*write)(void __iomem *addr, u32 offset, u32 value);
sound/soc/intel/sst-dsp.c +23 -0
index d0fc685..86e4108 100644
@@ -245,6 +245,29 @@ int sst_dsp_boot(struct sst_dsp *sst)
 }
 EXPORT_SYMBOL_GPL(sst_dsp_boot);
 
+int sst_dsp_wake(struct sst_dsp *sst)
+{
+	if (sst->ops->wake)
+		return sst->ops->wake(sst);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(sst_dsp_wake);
+
+void sst_dsp_sleep(struct sst_dsp *sst)
+{
+	if (sst->ops->sleep)
+		sst->ops->sleep(sst);
+}
+EXPORT_SYMBOL_GPL(sst_dsp_sleep);
+
+void sst_dsp_stall(struct sst_dsp *sst)
+{
+	if (sst->ops->stall)
+		sst->ops->stall(sst);
+}
+EXPORT_SYMBOL_GPL(sst_dsp_stall);
+
 void sst_dsp_ipc_msg_tx(struct sst_dsp *dsp, u32 msg)
 {
 	sst_dsp_shim_write_unlocked(dsp, SST_IPCX, msg | SST_IPCX_BUSY);
sound/soc/intel/sst-dsp.h +4 -0
index 17ee923..7bb4820 100644
@@ -245,6 +245,10 @@ void sst_memcpy_fromio_32(struct sst_dsp *sst,
 /* DSP reset & boot */
 void sst_dsp_reset(struct sst_dsp *sst);
 int sst_dsp_boot(struct sst_dsp *sst);
+int sst_dsp_wake(struct sst_dsp *sst);
+void sst_dsp_sleep(struct sst_dsp *sst);
+void sst_dsp_stall(struct sst_dsp *sst);
+
 /* DMA */
 int sst_dsp_dma_get_channel(struct sst_dsp *dsp, int chan_id);
 void sst_dsp_dma_put_channel(struct sst_dsp *dsp);
Signature · 1 line
2.1.0