Commit bbe51bbb authored by Federico Vaga's avatar Federico Vaga Committed by Federico Vaga

sw:drv: clean-up HMQ on core programming

Like this the firmware will start with a properly cleaned HMQ
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@vaga.pv.it>
parent e39e0a31
......@@ -185,6 +185,10 @@ static int trtl_cpu_firmware_load(struct trtl_cpu *cpu, void *fw_buf,
}
}
out:
/* Clean up all the HMQ */
for (i = 0; i < trtl->cfg.n_hmq[cpu->index]; ++i)
trtl_hmq_purge(&cpu->hmq[i]);
spin_unlock(&trtl->lock_cpu_sel);
trtl_iowrite(trtl, irq_dbg_old,
trtl->base_csr + MT_CPU_CSR_REG_DBG_IMSK);
......
......@@ -257,6 +257,7 @@ extern void trtl_remove_hmq(struct trtl_cpu *cpu, unsigned int hmq_idx);
extern const struct file_operations trtl_hmq_fops;
extern irqreturn_t trtl_irq_handler_out(int irq_core_base, void *arg);
extern irqreturn_t trtl_irq_handler_in(int irq_core_base, void *arg);
extern void trtl_hmq_purge(struct trtl_hmq *hmq);
/* TTY */
extern int trtl_tty_probe(struct trtl_dev *trtl);
extern void trtl_tty_remove(struct trtl_dev *trtl);
......
......@@ -187,7 +187,7 @@ static void trtl_hmq_select(struct trtl_hmq *hmq)
trtl_cpu_hmq_select(trtl, cpu->index, hmq->index);
}
static void trtl_hmq_purge(struct trtl_hmq *hmq)
void trtl_hmq_purge(struct trtl_hmq *hmq)
{
struct trtl_dev *trtl = to_trtl_dev(hmq->dev.parent->parent);
unsigned long flags;
......
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