summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/intel/bdw.c
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2021-11-19 21:26:13 +0200
committerMark Brown <broonie@kernel.org>2021-11-22 15:40:16 +0000
commit5974f6843203f0061d9df05c32262a10359740a6 (patch)
tree21722983f3d417806a48864b362132db3a98bd4b /sound/soc/sof/intel/bdw.c
parent81ed6770ba67358b07e96a277206f6c742737dab (diff)
downloadlinux-5974f6843203f0061d9df05c32262a10359740a6.tar.gz
linux-5974f6843203f0061d9df05c32262a10359740a6.tar.bz2
linux-5974f6843203f0061d9df05c32262a10359740a6.zip
ASoC: SOF: Introduce num_cores and ref count per core
Add two fields num_cores and dsp_cores_ref_count to struct snd_sof_dev. These will be used to maintain the ref count for each core to determine when it should be powered up or down. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211119192621.4096077-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/bdw.c')
-rw-r--r--sound/soc/sof/intel/bdw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c
index 156006bed017..1a8a39a878fd 100644
--- a/sound/soc/sof/intel/bdw.c
+++ b/sound/soc/sof/intel/bdw.c
@@ -412,10 +412,19 @@ static int bdw_probe(struct snd_sof_dev *sdev)
const struct sof_dev_desc *desc = pdata->desc;
struct platform_device *pdev =
container_of(sdev->dev, struct platform_device, dev);
+ const struct sof_intel_dsp_desc *chip;
struct resource *mmio;
u32 base, size;
int ret;
+ chip = get_chip_info(sdev->pdata);
+ if (!chip) {
+ dev_err(sdev->dev, "error: no such device supported\n");
+ return -EIO;
+ }
+
+ sdev->num_cores = chip->cores_num;
+
/* LPE base */
mmio = platform_get_resource(pdev, IORESOURCE_MEM,
desc->resindex_lpe_base);