Commit 00eccfd0 authored by Federico Vaga's avatar Federico Vaga

kernel: bugfix: auto-start option after release CSET_BUSY flag

With the new code organization the auto-start options must be moved
after release the ZIO_CSET_BUSY flags. Otherwise, the ZIO core will loop
forever tring to arm a trigger.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 3cac7fb3
......@@ -125,12 +125,6 @@ void zfad_dma_done(struct zio_cset *cset)
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFAT_CFG_SW_EN],
1);
}
/* Automatic start next acquisition */
if (fa->enable_auto_start) {
dev_dbg(&fa->fmc->dev, "Automatic start\n");
zfad_fsm_command(fa, ZFA_START);
}
}
......@@ -292,6 +286,12 @@ static void fa_irq_work(struct work_struct *work)
spin_lock(&cset->lock);
cset->flags &= ~ZIO_CSET_BUSY;
spin_unlock(&cset->lock);
/* Automatic start next acquisition */
if (fa->enable_auto_start) {
dev_dbg(&fa->fmc->dev, "Automatic start\n");
zfad_fsm_command(fa, ZFA_START);
}
end:
/* ack the irq */
fa->fmc->op->irq_ack(fa->fmc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment