ASoC: fsl_esai: Remove the tasklet
Remove tasklet for it may cause the xrun interrupt not be handled immediately, that will be endless interrupt. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
ff66736b87
commit
2bbe95fe6c
|
@ -33,7 +33,6 @@
|
|||
* @extalclk: esai clock source to derive HCK, SCK and FS
|
||||
* @fsysclk: system clock source to derive HCK, SCK and FS
|
||||
* @spbaclk: SPBA clock (optional, depending on SoC design)
|
||||
* @task: tasklet to handle the reset operation
|
||||
* @lock: spin lock between hw_reset() and trigger()
|
||||
* @fifo_depth: depth of tx/rx FIFO
|
||||
* @slot_width: width of each DAI slot
|
||||
|
@ -57,7 +56,6 @@ struct fsl_esai {
|
|||
struct clk *extalclk;
|
||||
struct clk *fsysclk;
|
||||
struct clk *spbaclk;
|
||||
struct tasklet_struct task;
|
||||
spinlock_t lock; /* Protect hw_reset and trigger */
|
||||
u32 fifo_depth;
|
||||
u32 slot_width;
|
||||
|
@ -75,6 +73,8 @@ struct fsl_esai {
|
|||
char name[32];
|
||||
};
|
||||
|
||||
static void fsl_esai_hw_reset(struct fsl_esai *esai_priv);
|
||||
|
||||
static irqreturn_t esai_isr(int irq, void *devid)
|
||||
{
|
||||
struct fsl_esai *esai_priv = (struct fsl_esai *)devid;
|
||||
|
@ -88,7 +88,7 @@ static irqreturn_t esai_isr(int irq, void *devid)
|
|||
if ((saisr & (ESAI_SAISR_TUE | ESAI_SAISR_ROE)) &&
|
||||
esai_priv->reset_at_xrun) {
|
||||
dev_dbg(&pdev->dev, "reset module for xrun\n");
|
||||
tasklet_schedule(&esai_priv->task);
|
||||
fsl_esai_hw_reset(esai_priv);
|
||||
}
|
||||
|
||||
if (esr & ESAI_ESR_TINIT_MASK)
|
||||
|
@ -702,9 +702,8 @@ static void fsl_esai_trigger_stop(struct fsl_esai *esai_priv, bool tx)
|
|||
ESAI_xFCR_xFR, 0);
|
||||
}
|
||||
|
||||
static void fsl_esai_hw_reset(unsigned long arg)
|
||||
static void fsl_esai_hw_reset(struct fsl_esai *esai_priv)
|
||||
{
|
||||
struct fsl_esai *esai_priv = (struct fsl_esai *)arg;
|
||||
bool tx = true, rx = false, enabled[2];
|
||||
unsigned long lock_flags;
|
||||
u32 tfcr, rfcr;
|
||||
|
@ -1097,9 +1096,6 @@ static int fsl_esai_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
tasklet_init(&esai_priv->task, fsl_esai_hw_reset,
|
||||
(unsigned long)esai_priv);
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
regcache_cache_only(esai_priv->regmap, true);
|
||||
|
@ -1113,10 +1109,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
|
|||
|
||||
static int fsl_esai_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct fsl_esai *esai_priv = platform_get_drvdata(pdev);
|
||||
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
tasklet_kill(&esai_priv->task);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue