static LIST_HEAD(head);
static int timeout_in_ms = 600;
static unsigned int block_size;
+struct mutex hard_lock;
struct pxp_dma {
struct dma_device dma;
struct device *dev;
struct pxp_dma pxp_dma;
struct pxp_channel channel[NR_PXP_VIRT_CHANNEL];
- wait_queue_head_t done;
struct work_struct work;
/* describes most recent processing configuration */
#define PXP_DEF_BUFS 2
#define PXP_MIN_PIX 8
-#define PXP_WAITCON ((__raw_readl(pxp->base + HW_PXP_STAT) & \
- BM_PXP_STAT_IRQ) != BM_PXP_STAT_IRQ)
-
static uint32_t pxp_s0_formats[] = {
PXP_PIX_FMT_RGB32,
PXP_PIX_FMT_RGB565,
list_splice_init(&desc->tx_list, &pxp_chan->free_list);
list_move(&desc->list, &pxp_chan->free_list);
- wake_up_interruptible(&pxp->done);
+ mutex_unlock(&hard_lock);
pxp->pxp_ongoing = 0;
mod_timer(&pxp->clk_timer, jiffies + msecs_to_jiffies(timeout_in_ms));
struct pxp_dma *pxp_dma = to_pxp_dma(chan->device);
struct pxps *pxp = to_pxp(pxp_dma);
unsigned long flags0, flags;
- int ret;
spin_lock_irqsave(&pxp->lock, flags0);
spin_lock_irqsave(&pxp_chan->lock, flags);
spin_unlock_irqrestore(&pxp->lock, flags0);
pxp_clk_enable(pxp);
-again:
- ret = wait_event_interruptible_exclusive(pxp->done, PXP_WAITCON);
- if (ret < 0)
- goto again;
+ mutex_lock(&hard_lock);
spin_lock_irqsave(&pxp->lock, flags);
pxp->pxp_ongoing = 1;
spin_lock_init(&pxp->lock);
mutex_init(&pxp->clk_mutex);
+ mutex_init(&hard_lock);
pxp->base = devm_request_and_ioremap(&pdev->dev, res);
if (pxp->base == NULL) {
dump_pxp_reg(pxp);
INIT_WORK(&pxp->work, clkoff_callback);
- init_waitqueue_head(&pxp->done);
init_timer(&pxp->clk_timer);
pxp->clk_timer.function = pxp_clkoff_timer;
pxp->clk_timer.data = (unsigned long)pxp;