diff options
author | Arnaud Pouliquen <arnaud.pouliquen@st.com> | 2016-10-24 16:42:53 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-26 11:41:11 +0100 |
commit | 4c88f89f9c255d0a754e38ff1a55a6f8cef362e8 (patch) | |
tree | 3f3b8e0a4b5748319527c9e797118e7d9bb5f119 /sound/soc/sti/uniperif_reader.c | |
parent | 748abba8f3a93cee13a56350386e59457ffa600d (diff) | |
download | talos-op-linux-4c88f89f9c255d0a754e38ff1a55a6f8cef362e8.tar.gz talos-op-linux-4c88f89f9c255d0a754e38ff1a55a6f8cef362e8.zip |
ASoC: sti: reset refactoring
Reset is common to player and reader, migrate function in sti_uniperif.c
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sti/uniperif_reader.c')
-rw-r--r-- | sound/soc/sti/uniperif_reader.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sound/soc/sti/uniperif_reader.c b/sound/soc/sti/uniperif_reader.c index 09314f8be841..59043f7a0e5c 100644 --- a/sound/soc/sti/uniperif_reader.c +++ b/sound/soc/sti/uniperif_reader.c @@ -6,7 +6,6 @@ */ #include <linux/clk.h> -#include <linux/delay.h> #include <linux/io.h> #include <sound/soc.h> @@ -186,7 +185,6 @@ static int uni_reader_prepare(struct snd_pcm_substream *substream, struct uniperif *reader = priv->dai_data.uni; struct snd_pcm_runtime *runtime = substream->runtime; int transfer_size, trigger_limit, ret; - int count = 10; /* The reader should be stopped */ if (reader->state != UNIPERIF_STATE_STOPPED) { @@ -288,18 +286,7 @@ static int uni_reader_prepare(struct snd_pcm_substream *substream, } /* Reset uniperipheral reader */ - SET_UNIPERIF_SOFT_RST_SOFT_RST(reader); - - while (GET_UNIPERIF_SOFT_RST_SOFT_RST(reader)) { - udelay(5); - count--; - } - if (!count) { - dev_err(reader->dev, "Failed to reset uniperif\n"); - return -EIO; - } - - return 0; + return sti_uniperiph_reset(reader); } static int uni_reader_start(struct uniperif *reader) |