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>
This commit is contained in:
Peter Ujfalusi
2021-09-15 15:21:11 +03:00
committed by Mark Brown
parent 4ff134e2f9
commit 4624bb2f03
5 changed files with 78 additions and 64 deletions

View File

@@ -127,12 +127,12 @@ struct snd_sof_dsp_ops {
void __iomem *addr); /* optional */
/* memcpy IO */
void (*block_read)(struct snd_sof_dev *sof_dev, u32 bar,
u32 offset, void *dest,
size_t size); /* mandatory */
void (*block_write)(struct snd_sof_dev *sof_dev, u32 bar,
u32 offset, void *src,
size_t size); /* mandatory */
int (*block_read)(struct snd_sof_dev *sof_dev,
enum snd_sof_fw_blk_type type, u32 offset,
void *dest, size_t size); /* mandatory */
int (*block_write)(struct snd_sof_dev *sof_dev,
enum snd_sof_fw_blk_type type, u32 offset,
void *src, size_t size); /* mandatory */
/* doorbell */
irqreturn_t (*irq_handler)(int irq, void *context); /* optional */
@@ -568,10 +568,10 @@ void sof_mailbox_write(struct snd_sof_dev *sdev, u32 offset,
void *message, size_t bytes);
void sof_mailbox_read(struct snd_sof_dev *sdev, u32 offset,
void *message, size_t bytes);
void sof_block_write(struct snd_sof_dev *sdev, u32 bar, u32 offset, void *src,
size_t size);
void sof_block_read(struct snd_sof_dev *sdev, u32 bar, u32 offset, void *dest,
size_t size);
int sof_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
u32 offset, void *src, size_t size);
int sof_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
u32 offset, void *dest, size_t size);
int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id);