ASoC: Intel: Skylake: Add num of cores in dsp ops
authorDharageswari R <dharageswari.r@intel.com>
Wed, 2 Aug 2017 16:21:12 +0000 (21:51 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 3 Aug 2017 10:07:12 +0000 (11:07 +0100)
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>
sound/soc/intel/skylake/bxt-sst.c
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-sst.c
sound/soc/intel/skylake/skl.h

index 08a2c5e..c404a42 100644 (file)
@@ -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);
index c5b4e0a..7892e44 100644 (file)
@@ -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;
index aba9ea1..fd99e74 100644 (file)
@@ -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);
index a6b134b..20017ee 100644 (file)
@@ -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,