aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/haswell/sst-haswell-ipc.c
diff options
context:
space:
mode:
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>2015-05-19 15:00:35 +0530
committerMark Brown <broonie@kernel.org>2015-05-22 19:24:23 +0100
commit40fea92107ce0d7465e52cd7b1a2b7883618ba1b (patch)
tree95e46431f5f77349d0c2e22d9f8dd1cdc04f6830 /sound/soc/intel/haswell/sst-haswell-ipc.c
parentASoC: Intel: Move the busy check to ops for Baytrail (diff)
downloadlinux-dev-40fea92107ce0d7465e52cd7b1a2b7883618ba1b.tar.xz
linux-dev-40fea92107ce0d7465e52cd7b1a2b7883618ba1b.zip
ASoC: Intel: Move the busy check to ops for HSW
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/haswell/sst-haswell-ipc.c')
-rw-r--r--sound/soc/intel/haswell/sst-haswell-ipc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
index 324eceb07b25..6304e4bfccd6 100644
--- a/sound/soc/intel/haswell/sst-haswell-ipc.c
+++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
@@ -2098,6 +2098,14 @@ static u64 hsw_reply_msg_match(u64 header, u64 *mask)
return header;
}
+static bool hsw_is_dsp_busy(struct sst_dsp *dsp)
+{
+ u64 ipcx;
+
+ ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX);
+ return (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE));
+}
+
int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata)
{
struct sst_hsw_ipc_fw_version version;
@@ -2117,6 +2125,7 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata)
ipc->ops.shim_dbg = hsw_shim_dbg;
ipc->ops.tx_data_copy = hsw_tx_data_copy;
ipc->ops.reply_msg_match = hsw_reply_msg_match;
+ ipc->ops.is_dsp_busy = hsw_is_dsp_busy;
ret = sst_ipc_init(ipc);
if (ret != 0)