diff options
author | Subhransu S. Prusty <subhransu.s.prusty@intel.com> | 2015-05-19 05:30:35 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-22 14:24:23 -0400 |
commit | 40fea92107ce0d7465e52cd7b1a2b7883618ba1b (patch) | |
tree | 95e46431f5f77349d0c2e22d9f8dd1cdc04f6830 | |
parent | 2709bdbc4d7ffae3bcd3e24e214475fcc3d4f77e (diff) |
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>
-rw-r--r-- | sound/soc/intel/haswell/sst-haswell-ipc.c | 9 |
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) | |||
2098 | return header; | 2098 | return header; |
2099 | } | 2099 | } |
2100 | 2100 | ||
2101 | static bool hsw_is_dsp_busy(struct sst_dsp *dsp) | ||
2102 | { | ||
2103 | u64 ipcx; | ||
2104 | |||
2105 | ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX); | ||
2106 | return (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE)); | ||
2107 | } | ||
2108 | |||
2101 | int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata) | 2109 | int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata) |
2102 | { | 2110 | { |
2103 | struct sst_hsw_ipc_fw_version version; | 2111 | struct sst_hsw_ipc_fw_version version; |
@@ -2117,6 +2125,7 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata) | |||
2117 | ipc->ops.shim_dbg = hsw_shim_dbg; | 2125 | ipc->ops.shim_dbg = hsw_shim_dbg; |
2118 | ipc->ops.tx_data_copy = hsw_tx_data_copy; | 2126 | ipc->ops.tx_data_copy = hsw_tx_data_copy; |
2119 | ipc->ops.reply_msg_match = hsw_reply_msg_match; | 2127 | ipc->ops.reply_msg_match = hsw_reply_msg_match; |
2128 | ipc->ops.is_dsp_busy = hsw_is_dsp_busy; | ||
2120 | 2129 | ||
2121 | ret = sst_ipc_init(ipc); | 2130 | ret = sst_ipc_init(ipc); |
2122 | if (ret != 0) | 2131 | if (ret != 0) |