diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2021-09-15 14:21:12 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-15 17:25:05 +0200 |
commit | 07e833b473e417f13c5a62aa6f63dbbd3028d277 (patch) | |
tree | cd3a725f4f9cf693a7a3d8ce683ab9a84950cf3c /sound/soc/sof/ops.h | |
parent | ASoC: SOF: core: Do not use 'bar' as parameter for block_read/write (diff) | |
download | linux-07e833b473e417f13c5a62aa6f63dbbd3028d277.tar.xz linux-07e833b473e417f13c5a62aa6f63dbbd3028d277.zip |
ASoC: SOF: debug: Add generic API and ops for DSP regions
Add new debugfs_add_region_item along with a generic wrapper
snd_sof_debugfs_add_region_item() to abstract away the DSP regions related
debugfs support.
At the same commit add iomem based generic implementation for the new ops
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-9-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.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 2412b5a77e42..b4121e516585 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -253,6 +253,17 @@ static inline void snd_sof_ipc_dump(struct snd_sof_dev *sdev) sof_ops(sdev)->ipc_dump(sdev); } +static inline int snd_sof_debugfs_add_region_item(struct snd_sof_dev *sdev, + enum snd_sof_fw_blk_type blk_type, u32 offset, size_t size, + const char *name, enum sof_debugfs_access_type access_type) +{ + if (sof_ops(sdev) && sof_ops(sdev)->debugfs_add_region_item) + return sof_ops(sdev)->debugfs_add_region_item(sdev, blk_type, offset, + size, name, access_type); + + return 0; +} + /* register IO */ static inline void snd_sof_dsp_write(struct snd_sof_dev *sdev, u32 bar, u32 offset, u32 value) |