From dde98beec0ffdd84d497b63923cf26e8c9b0a5c7 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@freescale.com>
Date: Mon, 25 Mar 2013 16:23:04 -0300
Subject: [PATCH] ASoC: mxs-saif: Do not check for BM_SAIF_STAT_BUSY

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/mxs/mxs-saif.c |   30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 365d9d2..1986deb 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -207,17 +207,10 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,
 int mxs_saif_put_mclk(unsigned int saif_id)
 {
 	struct mxs_saif *saif = mxs_saif[saif_id];
-	u32 stat;
 
 	if (!saif)
 		return -EINVAL;
 
-	stat = __raw_readl(saif->base + SAIF_STAT);
-	if (stat & BM_SAIF_STAT_BUSY) {
-		dev_err(saif->dev, "error: busy\n");
-		return -EBUSY;
-	}
-
 	clk_disable_unprepare(saif->clk);
 
 	/* disable MCLK output */
@@ -241,7 +234,6 @@ int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk,
 					unsigned int rate)
 {
 	struct mxs_saif *saif = mxs_saif[saif_id];
-	u32 stat;
 	int ret;
 	struct mxs_saif *master_saif;
 
@@ -262,12 +254,6 @@ int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk,
 		return -EINVAL;
 	}
 
-	stat = __raw_readl(saif->base + SAIF_STAT);
-	if (stat & BM_SAIF_STAT_BUSY) {
-		dev_err(saif->dev, "error: busy\n");
-		return -EBUSY;
-	}
-
 	saif->mclk_in_use = 1;
 	ret = mxs_saif_set_clk(saif, mclk, rate);
 	if (ret)
@@ -291,16 +277,10 @@ EXPORT_SYMBOL_GPL(mxs_saif_get_mclk);
  */
 static int mxs_saif_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
 {
-	u32 scr, stat;
+	u32 scr;
 	u32 scr0;
 	struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
 
-	stat = __raw_readl(saif->base + SAIF_STAT);
-	if (stat & BM_SAIF_STAT_BUSY) {
-		dev_err(cpu_dai->dev, "error: busy\n");
-		return -EBUSY;
-	}
-
 	scr0 = __raw_readl(saif->base + SAIF_CTRL);
 	scr0 = scr0 & ~BM_SAIF_CTRL_BITCLK_EDGE & ~BM_SAIF_CTRL_LRCLK_POLARITY \
 		& ~BM_SAIF_CTRL_JUSTIFY & ~BM_SAIF_CTRL_DELAY;
@@ -397,7 +377,7 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
 {
 	struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
 	struct mxs_saif *master_saif;
-	u32 scr, stat;
+	u32 scr;
 	int ret;
 
 	master_saif = mxs_saif_get_master(saif);
@@ -410,12 +390,6 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	stat = __raw_readl(saif->base + SAIF_STAT);
-	if (stat & BM_SAIF_STAT_BUSY) {
-		dev_err(cpu_dai->dev, "error: busy\n");
-		return -EBUSY;
-	}
-
 	/*
 	 * Set saif clk based on sample rate.
 	 * If mclk is used, we also set mclk, if not, saif->mclk is
-- 
1.7.9.5

