xref: /linux/drivers/media/pci/ivtv/ivtv-irq.h (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3     interrupt handling
4     Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
5     Copyright (C) 2004  Chris Kennedy <c@groovy.org>
6     Copyright (C) 2005-2007  Hans Verkuil <hverkuil@xs4all.nl>
7 
8  */
9 
10 #ifndef IVTV_IRQ_H
11 #define IVTV_IRQ_H
12 
13 #define IVTV_IRQ_ENC_START_CAP		BIT(31)
14 #define IVTV_IRQ_ENC_EOS		BIT(30)
15 #define IVTV_IRQ_ENC_VBI_CAP		BIT(29)
16 #define IVTV_IRQ_ENC_VIM_RST		BIT(28)
17 #define IVTV_IRQ_ENC_DMA_COMPLETE	BIT(27)
18 #define IVTV_IRQ_ENC_PIO_COMPLETE	BIT(25)
19 #define IVTV_IRQ_DEC_AUD_MODE_CHG	BIT(24)
20 #define IVTV_IRQ_DEC_DATA_REQ		BIT(22)
21 #define IVTV_IRQ_DEC_DMA_COMPLETE	BIT(20)
22 #define IVTV_IRQ_DEC_VBI_RE_INSERT	BIT(19)
23 #define IVTV_IRQ_DMA_ERR		BIT(18)
24 #define IVTV_IRQ_DMA_WRITE		BIT(17)
25 #define IVTV_IRQ_DMA_READ		BIT(16)
26 #define IVTV_IRQ_DEC_VSYNC		BIT(10)
27 
28 /* IRQ Masks */
29 #define IVTV_IRQ_MASK_INIT (IVTV_IRQ_DMA_ERR|IVTV_IRQ_ENC_DMA_COMPLETE|\
30 		IVTV_IRQ_DMA_READ|IVTV_IRQ_ENC_PIO_COMPLETE)
31 
32 #define IVTV_IRQ_MASK_CAPTURE (IVTV_IRQ_ENC_START_CAP | IVTV_IRQ_ENC_EOS)
33 #define IVTV_IRQ_MASK_DECODE  (IVTV_IRQ_DEC_DATA_REQ|IVTV_IRQ_DEC_AUD_MODE_CHG)
34 
35 irqreturn_t ivtv_irq_handler(int irq, void *dev_id);
36 
37 void ivtv_irq_work_handler(struct kthread_work *work);
38 void ivtv_dma_stream_dec_prepare(struct ivtv_stream *s, u32 offset, int lock);
39 void ivtv_unfinished_dma(struct timer_list *t);
40 
41 #endif
42