From: Olivier Moysan <olivier.moysan@st.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
<tiwai@suse.com>, <mcoquelin.stm32@gmail.com>,
<alexandre.torgue@st.com>, <alsa-devel@alsa-project.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-kernel@vger.kernel.org>, <olivier.moysan@st.com>,
<arnaud.pouliquen@st.com>, <benjamin.gaignard@st.com>
Subject: [PATCH 1/7] ASoC: stm32: i2s: fix IRQ clearing
Date: Tue, 26 Feb 2019 14:51:04 +0100 [thread overview]
Message-ID: <1551189070-15469-2-git-send-email-olivier.moysan@st.com> (raw)
In-Reply-To: <1551189070-15469-1-git-send-email-olivier.moysan@st.com>
Because of regmap cache, interrupts may not be cleared
as expected.
Declare IFCR register as write only and make writings
to IFCR register unconditional.
Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
sound/soc/stm/stm32_i2s.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index a25919d32187..339cd4715b2e 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -247,8 +247,8 @@ static irqreturn_t stm32_i2s_isr(int irq, void *devid)
return IRQ_NONE;
}
- regmap_update_bits(i2s->regmap, STM32_I2S_IFCR_REG,
- I2S_IFCR_MASK, flags);
+ regmap_write_bits(i2s->regmap, STM32_I2S_IFCR_REG,
+ I2S_IFCR_MASK, flags);
if (flags & I2S_SR_OVR) {
dev_dbg(&pdev->dev, "Overrun\n");
@@ -277,7 +277,6 @@ static bool stm32_i2s_readable_reg(struct device *dev, unsigned int reg)
case STM32_I2S_CFG2_REG:
case STM32_I2S_IER_REG:
case STM32_I2S_SR_REG:
- case STM32_I2S_IFCR_REG:
case STM32_I2S_TXDR_REG:
case STM32_I2S_RXDR_REG:
case STM32_I2S_CGFR_REG:
@@ -559,8 +558,8 @@ static int stm32_i2s_startup(struct snd_pcm_substream *substream,
i2s->refcount++;
spin_unlock(&i2s->lock_fd);
- return regmap_update_bits(i2s->regmap, STM32_I2S_IFCR_REG,
- I2S_IFCR_MASK, I2S_IFCR_MASK);
+ return regmap_write_bits(i2s->regmap, STM32_I2S_IFCR_REG,
+ I2S_IFCR_MASK, I2S_IFCR_MASK);
}
static int stm32_i2s_hw_params(struct snd_pcm_substream *substream,
@@ -611,8 +610,8 @@ static int stm32_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
return ret;
}
- regmap_update_bits(i2s->regmap, STM32_I2S_IFCR_REG,
- I2S_IFCR_MASK, I2S_IFCR_MASK);
+ regmap_write_bits(i2s->regmap, STM32_I2S_IFCR_REG,
+ I2S_IFCR_MASK, I2S_IFCR_MASK);
if (playback_flg) {
ier = I2S_IER_UDRIE;
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-26 13:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-26 13:51 [PATCH 0/7] ASoC: stm32: i2s: miscellaneous fixes Olivier Moysan
2019-02-26 13:51 ` Olivier Moysan [this message]
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: fix IRQ clearing" to the asoc tree Mark Brown
2019-02-26 13:51 ` [PATCH 2/7] ASoC: stm32: i2s: fix 16 bit format support Olivier Moysan
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: fix 16 bit format support" to the asoc tree Mark Brown
2019-02-26 13:51 ` [PATCH 3/7] ASoC: stm32: i2s: fix stream count management Olivier Moysan
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: fix stream count management" to the asoc tree Mark Brown
2019-02-26 13:51 ` [PATCH 4/7] ASoC: stm32: i2s: fix dma configuration Olivier Moysan
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: fix dma configuration" to the asoc tree Mark Brown
2019-02-26 13:51 ` [PATCH 5/7] ASoC: stm32: i2s: remove useless callback Olivier Moysan
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: remove useless callback" to the asoc tree Mark Brown
2019-02-26 13:51 ` [PATCH 6/7] ASoC: stm32: i2s: fix race condition in irq handler Olivier Moysan
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: fix race condition in irq handler" to the asoc tree Mark Brown
2019-02-26 13:51 ` [PATCH 7/7] ASoC: stm32: i2s: skip useless write in slave mode Olivier Moysan
2019-02-26 16:22 ` Applied "ASoC: stm32: i2s: skip useless write in slave mode" to the asoc tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1551189070-15469-2-git-send-email-olivier.moysan@st.com \
--to=olivier.moysan@st.com \
--cc=alexandre.torgue@st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@st.com \
--cc=benjamin.gaignard@st.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).