mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
ASoC: renesas: msiof: cleanup status clear method
Current MSIOF driver clear status 1) after starting HW, and 2) clear all status. But it should be 1') before starting HW, 2') clear necessary status only. Cleanup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Message-ID: <87ecswuqwr.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d3593ac41a
commit
d092b70d7b
|
|
@ -37,7 +37,6 @@
|
|||
/* SISTR */
|
||||
#define SISTR_ERR_TX (SISTR_TFSERR | SISTR_TFOVF | SISTR_TFUDF)
|
||||
#define SISTR_ERR_RX (SISTR_RFSERR | SISTR_RFOVF | SISTR_RFUDF)
|
||||
#define SISTR_ERR (SISTR_ERR_TX | SISTR_ERR_RX)
|
||||
|
||||
/*
|
||||
* The data on memory in 24bit case is located at <right> side
|
||||
|
|
@ -80,7 +79,6 @@ struct msiof_priv {
|
|||
#define msiof_is_play(substream) ((substream)->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
#define msiof_read(priv, reg) ioread32((priv)->base + reg)
|
||||
#define msiof_write(priv, reg, val) iowrite32(val, (priv)->base + reg)
|
||||
#define msiof_status_clear(priv) msiof_write(priv, SISTR, SISTR_ERR)
|
||||
|
||||
static int msiof_update(struct msiof_priv *priv, u32 reg, u32 mask, u32 val)
|
||||
{
|
||||
|
|
@ -174,6 +172,13 @@ static int msiof_hw_start(struct snd_soc_component *component,
|
|||
val = SIIER_RDREQE | SIIER_RDMAE | SISTR_ERR_RX;
|
||||
msiof_update(priv, SIIER, val, val);
|
||||
|
||||
/* clear status */
|
||||
if (is_play)
|
||||
val = SISTR_ERR_TX;
|
||||
else
|
||||
val = SISTR_ERR_RX;
|
||||
msiof_update(priv, SISTR, val, val);
|
||||
|
||||
/* SICTR */
|
||||
if (is_play)
|
||||
val = SICTR_TXE | SICTR_TEDG;
|
||||
|
|
@ -181,8 +186,6 @@ static int msiof_hw_start(struct snd_soc_component *component,
|
|||
val = SICTR_RXE | SICTR_REDG;
|
||||
msiof_update_and_wait(priv, SICTR, val, val, val);
|
||||
|
||||
msiof_status_clear(priv);
|
||||
|
||||
/* Start DMAC */
|
||||
snd_dmaengine_pcm_trigger(substream, cmd);
|
||||
|
||||
|
|
@ -439,7 +442,7 @@ static irqreturn_t msiof_interrupt(int irq, void *data)
|
|||
spin_lock(&priv->lock);
|
||||
|
||||
sistr = msiof_read(priv, SISTR);
|
||||
msiof_status_clear(priv);
|
||||
msiof_write(priv, SISTR, SISTR_ERR_TX | SISTR_ERR_RX);
|
||||
|
||||
spin_unlock(&priv->lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user