summaryrefslogtreecommitdiff
path: root/sound/soc/sof/ops.h
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-09-15 15:21:11 +0300
committerMark Brown <broonie@kernel.org>2021-09-15 18:25:04 +0300
commit4624bb2f03d3c153e00d21c1baa1da34cfc19afd (patch)
tree16c33d6968d40b93f5d7ef45bb21caafa26912ba /sound/soc/sof/ops.h
parent4ff134e2f90ee2816ca5a8069802ff5cb602a2f1 (diff)
downloadlinux-4624bb2f03d3c153e00d21c1baa1da34cfc19afd.tar.xz
ASoC: SOF: core: Do not use 'bar' as parameter for block_read/write
The use of bar in the core poses limits on the portability of the code to other, non iomapped platforms. To make the API more generic, remove the use of 'bar' as parameter for the block copy API. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ops.h')
-rw-r--r--sound/soc/sof/ops.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h
index 731b8157aaea..2412b5a77e42 100644
--- a/sound/soc/sof/ops.h
+++ b/sound/soc/sof/ops.h
@@ -297,16 +297,18 @@ static inline u64 snd_sof_dsp_read64(struct snd_sof_dev *sdev, u32 bar,
}
/* block IO */
-static inline void snd_sof_dsp_block_read(struct snd_sof_dev *sdev, u32 bar,
- u32 offset, void *dest, size_t bytes)
+static inline int snd_sof_dsp_block_read(struct snd_sof_dev *sdev,
+ enum snd_sof_fw_blk_type blk_type,
+ u32 offset, void *dest, size_t bytes)
{
- sof_ops(sdev)->block_read(sdev, bar, offset, dest, bytes);
+ return sof_ops(sdev)->block_read(sdev, blk_type, offset, dest, bytes);
}
-static inline void snd_sof_dsp_block_write(struct snd_sof_dev *sdev, u32 bar,
- u32 offset, void *src, size_t bytes)
+static inline int snd_sof_dsp_block_write(struct snd_sof_dev *sdev,
+ enum snd_sof_fw_blk_type blk_type,
+ u32 offset, void *src, size_t bytes)
{
- sof_ops(sdev)->block_write(sdev, bar, offset, src, bytes);
+ return sof_ops(sdev)->block_write(sdev, blk_type, offset, src, bytes);
}
/* ipc */