GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_common / irq_global.h
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 #ifndef __IRQ_GLOBAL_H_INCLUDED__
16 #define __IRQ_GLOBAL_H_INCLUDED__
17
18 #include <system_types.h>
19
20 #define IS_IRQ_VERSION_2
21 #define IS_IRQ_MAP_VERSION_2
22
23 /* We cannot include the (hrt host ID) file defining the "CSS_RECEIVER" property without side effects */
24 #ifndef HAS_NO_RX
25 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM)
26 /*#define CSS_RECEIVER testbench_isp_inp_sys_csi_receiver*/
27 #include "hive_isp_css_irq_types_hrt.h" /* enum hrt_isp_css_irq */
28 #elif defined(IS_ISP_2401_MAMOIADA_SYSTEM)
29 /*#define CSS_RECEIVER testbench_isp_is_2400_inp_sys_csi_receiver*/
30 #include "hive_isp_css_2401_irq_types_hrt.h"    /* enum hrt_isp_css_irq */
31 #else
32 #error "irq_global.h: 2400_SYSTEM must be one of {2400, 2401 }"
33 #endif
34 #endif
35
36 /* The IRQ is not mapped uniformly on its related interfaces */
37 #define IRQ_SW_CHANNEL_OFFSET   hrt_isp_css_irq_sw_pin_0
38
39 typedef enum {
40         IRQ_SW_CHANNEL0_ID = hrt_isp_css_irq_sw_pin_0 - IRQ_SW_CHANNEL_OFFSET,
41         IRQ_SW_CHANNEL1_ID = hrt_isp_css_irq_sw_pin_1 - IRQ_SW_CHANNEL_OFFSET,
42         N_IRQ_SW_CHANNEL_ID
43 } irq_sw_channel_id_t;
44
45 #endif /* __IRQ_GLOBAL_H_INCLUDED__ */