diff options
author | Subhransu S. Prusty <subhransu.s.prusty@intel.com> | 2017-12-18 06:16:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-12-20 11:48:06 +0100 |
commit | 8e9d8e19b3d0c36d45161233eee3f2d368efe3ac (patch) | |
tree | 92a733336696f072c0df0b1d77eafc5add310a37 /sound/soc/intel/skylake/skl-sst-dsp.c | |
parent | ASoC: Intel: Skylake: Re-order some code to silence a warning (diff) | |
download | linux-8e9d8e19b3d0c36d45161233eee3f2d368efe3ac.tar.xz linux-8e9d8e19b3d0c36d45161233eee3f2d368efe3ac.zip |
ASoC: Intel: Skylake: Request IRQ late only after all context are initialized
Sometimes during boot, panic is observed at sst_dsp_shim_read_unlocked().
This happens when interrupt occurs before the context is initialized. So
move the irq initialization only after the context is initialized
completely.
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Pawse, GuruprasadX <guruprasadx.pawse@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>
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst-dsp.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-dsp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.c b/sound/soc/intel/skylake/skl-sst-dsp.c index 19ee1d4f3bdf..71e31ad0bb3f 100644 --- a/sound/soc/intel/skylake/skl-sst-dsp.c +++ b/sound/soc/intel/skylake/skl-sst-dsp.c @@ -435,16 +435,22 @@ struct sst_dsp *skl_dsp_ctx_init(struct device *dev, return NULL; } + return sst; +} + +int skl_dsp_acquire_irq(struct sst_dsp *sst) +{ + struct sst_dsp_device *sst_dev = sst->sst_dev; + int ret; + /* Register the ISR */ ret = request_threaded_irq(sst->irq, sst->ops->irq_handler, sst_dev->thread, IRQF_SHARED, "AudioDSP", sst); - if (ret) { + if (ret) dev_err(sst->dev, "unable to grab threaded IRQ %d, disabling device\n", sst->irq); - return NULL; - } - return sst; + return ret; } void skl_dsp_free(struct sst_dsp *dsp) |