diff options
| author | Pierre-Louis Bossart <[email protected]> | 2022-10-24 11:52:58 -0500 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2022-10-26 14:17:55 +0100 |
| commit | c28a36b012f1fed177e787d242c592017d284538 (patch) | |
| tree | f554f97648ed89857705a23e4dbb40cd11b75672 | |
| parent | 74fe0c4dcb41678543915cb97928c366ac1aaceb (diff) | |
ASoC: SOF: ops: add snd_sof_dsp_updateb() helper
Add missing helper in SOF toolbox.
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
Reviewed-by: Rander Wang <[email protected]>
Reviewed-by: Péter Ujfalusi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
| -rw-r--r-- | sound/soc/sof/ops.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 511c798eb1eb..8cb93e7c0c67 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -356,6 +356,17 @@ static inline u64 snd_sof_dsp_read64(struct snd_sof_dev *sdev, u32 bar, return readq(sdev->bar[bar] + offset); } +static inline void snd_sof_dsp_updateb(struct snd_sof_dev *sdev, u32 bar, + u32 offset, u8 value, u8 mask) +{ + u8 reg; + + reg = snd_sof_dsp_readb(sdev, bar, offset); + reg &= ~mask; + reg |= value; + snd_sof_dsp_writeb(sdev, bar, offset, reg); +} + /* block IO */ static inline int snd_sof_dsp_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type, |