Commit b126fc07 authored by Sugar Zhang's avatar Sugar Zhang Committed by Mark Brown

ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and precious

This patch marks RXFIFO_DATA as precious to avoid being read
outside a call from the driver, such as regmap debugfs
Signed-off-by: default avatarSugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 47fa5773
...@@ -417,6 +417,7 @@ static bool rockchip_pdm_rd_reg(struct device *dev, unsigned int reg) ...@@ -417,6 +417,7 @@ static bool rockchip_pdm_rd_reg(struct device *dev, unsigned int reg)
case PDM_INT_CLR: case PDM_INT_CLR:
case PDM_INT_ST: case PDM_INT_ST:
case PDM_DATA_VALID: case PDM_DATA_VALID:
case PDM_RXFIFO_DATA:
case PDM_VERSION: case PDM_VERSION:
return true; return true;
default: default:
...@@ -431,6 +432,17 @@ static bool rockchip_pdm_volatile_reg(struct device *dev, unsigned int reg) ...@@ -431,6 +432,17 @@ static bool rockchip_pdm_volatile_reg(struct device *dev, unsigned int reg)
case PDM_FIFO_CTRL: case PDM_FIFO_CTRL:
case PDM_INT_CLR: case PDM_INT_CLR:
case PDM_INT_ST: 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; return true;
default: default:
return false; return false;
...@@ -453,6 +465,7 @@ static const struct regmap_config rockchip_pdm_regmap_config = { ...@@ -453,6 +465,7 @@ static const struct regmap_config rockchip_pdm_regmap_config = {
.writeable_reg = rockchip_pdm_wr_reg, .writeable_reg = rockchip_pdm_wr_reg,
.readable_reg = rockchip_pdm_rd_reg, .readable_reg = rockchip_pdm_rd_reg,
.volatile_reg = rockchip_pdm_volatile_reg, .volatile_reg = rockchip_pdm_volatile_reg,
.precious_reg = rockchip_pdm_precious_reg,
.cache_type = REGCACHE_FLAT, .cache_type = REGCACHE_FLAT,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment