From: Sugar Zhang <sugar.zhang@rock-chips.com>
To: heiko@sntech.de, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Sugar Zhang <sugar.zhang@rock-chips.com>,
linux-rockchip@lists.infradead.org,
Jaroslav Kysela <perex@perex.cz>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 11/12] ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and precious
Date: Thu, 4 Apr 2019 11:57:08 +0800 [thread overview]
Message-ID: <1554350228-24440-1-git-send-email-sugar.zhang@rock-chips.com> (raw)
In-Reply-To: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com>
This patch marks RXFIFO_DATA as precious to avoid being read
outside a call from the driver, such as regmap debugfs
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---
sound/soc/rockchip/rockchip_pdm.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 955cdc2..e89beeb 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -415,6 +415,7 @@ static bool rockchip_pdm_rd_reg(struct device *dev, unsigned int reg)
case PDM_INT_CLR:
case PDM_INT_ST:
case PDM_DATA_VALID:
+ case PDM_RXFIFO_DATA:
case PDM_VERSION:
return true;
default:
@@ -429,6 +430,17 @@ static bool rockchip_pdm_volatile_reg(struct device *dev, unsigned int reg)
case PDM_FIFO_CTRL:
case PDM_INT_CLR:
case PDM_INT_ST:
+ case PDM_RXFIFO_DATA:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static bool rockchip_pdm_precious_reg(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case PDM_RXFIFO_DATA:
return true;
default:
return false;
@@ -451,6 +463,7 @@ static const struct regmap_config rockchip_pdm_regmap_config = {
.writeable_reg = rockchip_pdm_wr_reg,
.readable_reg = rockchip_pdm_rd_reg,
.volatile_reg = rockchip_pdm_volatile_reg,
+ .precious_reg = rockchip_pdm_precious_reg,
.cache_type = REGCACHE_FLAT,
};
--
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-04-04 4:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com>
2019-04-04 3:48 ` [PATCH v1 05/12] ASoC: rockchip: pdm: change dma burst to 8 Sugar Zhang
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: change dma burst to 8" to the asoc tree Mark Brown
2019-04-04 3:51 ` [PATCH v1 06/12] ASoC: rockchip: pdm: fixup pdm fractional div Sugar Zhang
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: fixup pdm fractional div" to the asoc tree Mark Brown
2019-04-04 3:53 ` [PATCH v1 07/12] dt-bindings: sound: rockchip: add compatible for rk3308/px30 Sugar Zhang
2019-04-04 8:16 ` Applied "dt-bindings: sound: rockchip: add compatible for rk3308/px30" to the asoc tree Mark Brown
2019-04-04 3:54 ` [PATCH v1 08/12] ASoC: rockchip: pdm: add compatible for rk1808 Sugar Zhang
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: add compatible for rk1808" to the asoc tree Mark Brown
2019-04-04 3:55 ` [PATCH v1 09/12] dt-bindings: sound: add compatible for rk1808 Sugar Zhang
2019-04-04 8:16 ` Applied "dt-bindings: sound: add compatible for rk1808" to the asoc tree Mark Brown
2019-04-04 3:56 ` [PATCH v1 10/12] ASoC: rockchip: pdm: adjust waterlevel in frame unit Sugar Zhang
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: adjust waterlevel in frame unit" to the asoc tree Mark Brown
2019-04-04 3:57 ` Sugar Zhang [this message]
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and precious" " Mark Brown
2019-04-04 3:57 ` [PATCH v1 12/12] ASoC: rockchip: pdm: Correct PDM_CTRL0 reg value Sugar Zhang
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: Correct PDM_CTRL0 reg value" to the asoc tree Mark Brown
[not found] ` <1554298856-59028-3-git-send-email-sugar.zhang@rock-chips.com>
2019-04-04 7:51 ` [PATCH v1 02/12] ASoC: rockchip: pdm: using left justified store mode Mark Brown
2019-04-04 8:16 ` Applied "ASoC: rockchip: pdm: using left justified store 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=1554350228-24440-1-git-send-email-sugar.zhang@rock-chips.com \
--to=sugar.zhang@rock-chips.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--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).