/* To protect desc_pool manipulation */
spinlock_t pool_lock;
- spinlock_t multiirq_lock;
-
/* Size of MicroCode buffers for each channel. */
unsigned mcbufsz;
/* ioremap'ed address of PL330 registers. */
u32 val;
int id, ev, ret = 0;
- if (pl330->multi_irq && !spin_trylock(&pl330->multiirq_lock)) {
- ret = 1;
- goto no_handle;
- }
-
regs = pl330->base;
spin_lock_irqsave(&pl330->lock, flags);
if (!pl330->usage_count) {
dev_err(pl330->ddma.dev, "%s:%d event is not exist!\n", __func__, __LINE__);
spin_unlock_irqrestore(&pl330->lock, flags);
- if (pl330->multi_irq)
- spin_unlock(&pl330->multiirq_lock);
return 0;
}
tasklet_schedule(&pl330->tasks);
}
-no_handle:
- if (pl330->multi_irq)
- spin_unlock(&pl330->multiirq_lock);
-
return ret;
}
INIT_LIST_HEAD(&pl330->desc_pool);
spin_lock_init(&pl330->pool_lock);
- spin_lock_init(&pl330->multiirq_lock);
/* Create a descriptor pool of default size */
if (!add_desc(pl330, GFP_KERNEL, NR_DEFAULT_DESC))