Beispiel #1
0
static irqreturn_t jpeg_irq_handler(int irq, void *priv)
{
    unsigned int int_status;
    struct jpeg_dev *jpeg = priv;

    spin_lock(&jpeg->slock);

    int_status = jpeg_get_int_status(jpeg->regs);

    jpeg_clean_interrupt(jpeg->regs);
    clear_bit(DEV_RUN, &jpeg->state);

    if (int_status & 0x2) {
        if (jpeg->oneshot_dev) {
            struct m2m1shot_task *task =
                m2m1shot_get_current_task(jpeg->oneshot_dev);
            task->task.buf_cap.plane[0].len =
                jpeg_get_stream_size(jpeg->regs);
            m2m1shot_task_finish(jpeg->oneshot_dev, task, true);
        }
    } else {
        dev_err(jpeg->dev, "JPEG ERROR Interrupt (%#x) is triggered\n",
                int_status);
        jpeg_show_sfr_status(jpeg->regs);
        exynos_sysmmu_show_status(jpeg->dev);
    }

    spin_unlock(&jpeg->slock);

    return IRQ_HANDLED;
}
Beispiel #2
0
int jpeg_int_pending(struct jpeg_dev *ctrl)
{
	unsigned int	int_status;

	int_status = jpeg_get_int_status(ctrl->reg_base);
	jpeg_dbg("state(%d)\n", int_status);

	return int_status;
}