ASoC: Intel: Skylake: Move platform specific init to platform dsp_init()

Move ipc_init() from helper function to respective platform's dsp_init()
as ipc_init() per platform can be different.

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>
This commit is contained in:
Guneshwor Singh
2017-08-02 21:51:16 +05:30
committed by Mark Brown
parent a838dcc286
commit 2eed1b024a
3 changed files with 9 additions and 5 deletions

View File

@@ -581,6 +581,10 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ), sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),
SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ); SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ);
ret = skl_ipc_init(dev, skl);
if (ret)
return ret;
/* set the D0i3 check */ /* set the D0i3 check */
skl->ipc.ops.check_dsp_lp_on = skl_ipc_check_D0i0; skl->ipc.ops.check_dsp_lp_on = skl_ipc_check_D0i0;

View File

@@ -368,7 +368,6 @@ int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name,
{ {
struct skl_sst *skl; struct skl_sst *skl;
struct sst_dsp *sst; struct sst_dsp *sst;
int ret;
skl = devm_kzalloc(dev, sizeof(*skl), GFP_KERNEL); skl = devm_kzalloc(dev, sizeof(*skl), GFP_KERNEL);
if (skl == NULL) if (skl == NULL)
@@ -388,15 +387,12 @@ int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name,
sst->dsp_ops = dsp_ops; sst->dsp_ops = dsp_ops;
init_waitqueue_head(&skl->mod_load_wait); init_waitqueue_head(&skl->mod_load_wait);
INIT_LIST_HEAD(&sst->module_list); INIT_LIST_HEAD(&sst->module_list);
ret = skl_ipc_init(dev, skl);
if (ret)
return ret;
skl->is_first_boot = true; skl->is_first_boot = true;
if (dsp) if (dsp)
*dsp = skl; *dsp = skl;
return ret; return 0;
} }
int skl_prepare_lib_load(struct skl_sst *skl, struct skl_lib_info *linfo, int skl_prepare_lib_load(struct skl_sst *skl, struct skl_lib_info *linfo,

View File

@@ -561,6 +561,10 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
sst_dsp_mailbox_init(sst, (SKL_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ), sst_dsp_mailbox_init(sst, (SKL_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),
SKL_ADSP_W0_UP_SZ, SKL_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ); SKL_ADSP_W0_UP_SZ, SKL_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ);
ret = skl_ipc_init(dev, skl);
if (ret)
return ret;
sst->fw_ops = skl_fw_ops; sst->fw_ops = skl_fw_ops;
return 0; return 0;