summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDharageswari R <dharageswari.r@intel.com>2017-08-02 21:51:12 +0530
committerMark Brown <broonie@kernel.org>2017-08-03 11:07:12 +0100
commit363d45385f403fdf60fe9f563ba87093289d7b35 (patch)
tree912b25f989ff8b8f3eb97f379aa9c13b658449ef
parent0b06122fc8d0949a0aa7b817d98e031104802611 (diff)
ASoC: Intel: Skylake: Add num of cores in dsp ops
Number of dsp cores may differ for different platforms hence adding it in dsp ops. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/skylake/bxt-sst.c1
-rw-r--r--sound/soc/intel/skylake/skl-messages.c6
-rw-r--r--sound/soc/intel/skylake/skl-sst.c2
-rw-r--r--sound/soc/intel/skylake/skl.h1
4 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c
index 08a2c5eb59fa..c404a42b670a 100644
--- a/sound/soc/intel/skylake/bxt-sst.c
+++ b/sound/soc/intel/skylake/bxt-sst.c
@@ -584,7 +584,6 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
/* set the D0i3 check */
skl->ipc.ops.check_dsp_lp_on = skl_ipc_check_D0i0;
- skl->cores.count = 2;
skl->boot_complete = false;
init_waitqueue_head(&skl->boot_wait);
INIT_DELAYED_WORK(&skl->d0i3.work, bxt_set_dsp_D0i3);
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index c5b4e0a9946c..7892e445e87b 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -201,6 +201,7 @@ static struct skl_dsp_loader_ops bxt_get_loader_ops(void)
static const struct skl_dsp_ops dsp_ops[] = {
{
.id = 0x9d70,
+ .num_cores = 2,
.loader_ops = skl_get_loader_ops,
.init = skl_sst_dsp_init,
.init_fw = skl_sst_init_fw,
@@ -208,6 +209,7 @@ static const struct skl_dsp_ops dsp_ops[] = {
},
{
.id = 0x9d71,
+ .num_cores = 2,
.loader_ops = skl_get_loader_ops,
.init = kbl_sst_dsp_init,
.init_fw = skl_sst_init_fw,
@@ -215,6 +217,7 @@ static const struct skl_dsp_ops dsp_ops[] = {
},
{
.id = 0x5a98,
+ .num_cores = 2,
.loader_ops = bxt_get_loader_ops,
.init = bxt_sst_dsp_init,
.init_fw = bxt_sst_init_fw,
@@ -222,6 +225,7 @@ static const struct skl_dsp_ops dsp_ops[] = {
},
{
.id = 0x3198,
+ .num_cores = 2,
.loader_ops = bxt_get_loader_ops,
.init = bxt_sst_dsp_init,
.init_fw = bxt_sst_init_fw,
@@ -275,6 +279,8 @@ int skl_init_dsp(struct skl *skl)
return ret;
skl->skl_sst->dsp_ops = ops;
+ skl->skl_sst->cores.count = ops->num_cores;
+
dev_dbg(bus->dev, "dsp registration status=%d\n", ret);
return ret;
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index aba9ea11ac74..fd99e74cda03 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -563,8 +563,6 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
sst->fw_ops = skl_fw_ops;
- skl->cores.count = 2;
-
return 0;
}
EXPORT_SYMBOL_GPL(skl_sst_dsp_init);
diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h
index a6b134b4c037..20017ee4685c 100644
--- a/sound/soc/intel/skylake/skl.h
+++ b/sound/soc/intel/skylake/skl.h
@@ -90,6 +90,7 @@ struct skl_machine_pdata {
struct skl_dsp_ops {
int id;
+ unsigned int num_cores;
struct skl_dsp_loader_ops (*loader_ops)(void);
int (*init)(struct device *dev, void __iomem *mmio_base,
int irq, const char *fw_name,