Skip to content

Commit

Permalink
ASoC: SOF: ops: add snd_sof_dsp_updateb() helper
Browse files Browse the repository at this point in the history
Add missing helper in SOF toolbox.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221024165310.246183-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Pierre-Louis Bossart authored and Mark Brown committed Oct 26, 2022
1 parent 74fe0c4 commit c28a36b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sound/soc/sof/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c28a36b

Please sign in to comment.