GNU Linux-libre 4.14.290-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / css_2401_csi2p_system / host / csi_rx_local.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 __CSI_RX_LOCAL_H_INCLUDED__
16 #define __CSI_RX_LOCAL_H_INCLUDED__
17
18 #include "csi_rx_global.h"
19 #define N_CSI_RX_BE_MIPI_COMP_FMT_REG           4
20 #define N_CSI_RX_BE_MIPI_CUSTOM_PEC             12
21 #define N_CSI_RX_BE_SHORT_PKT_LUT               4
22 #define N_CSI_RX_BE_LONG_PKT_LUT                8
23 typedef struct csi_rx_fe_ctrl_state_s           csi_rx_fe_ctrl_state_t;
24 typedef struct csi_rx_fe_ctrl_lane_s            csi_rx_fe_ctrl_lane_t;
25 typedef struct csi_rx_be_ctrl_state_s           csi_rx_be_ctrl_state_t;
26 /*mipi_backend_custom_mode_pixel_extraction_config*/
27 typedef struct csi_rx_be_ctrl_pec_s             csi_rx_be_ctrl_pec_t;
28
29
30 struct csi_rx_fe_ctrl_lane_s {
31         hrt_data        termen;
32         hrt_data        settle;
33 };
34 struct csi_rx_fe_ctrl_state_s {
35         hrt_data                enable;
36         hrt_data                nof_enable_lanes;
37         hrt_data                error_handling;
38         hrt_data                status;
39         hrt_data                status_dlane_hs;
40         hrt_data                status_dlane_lp;
41         csi_rx_fe_ctrl_lane_t   clane;
42         csi_rx_fe_ctrl_lane_t   dlane[N_CSI_RX_DLANE_ID];
43 };
44 struct csi_rx_be_ctrl_state_s {
45         hrt_data                enable;
46         hrt_data                status;
47         hrt_data                comp_format_reg[N_CSI_RX_BE_MIPI_COMP_FMT_REG];
48         hrt_data                raw16;
49         hrt_data                raw18;
50         hrt_data                force_raw8;
51         hrt_data                irq_status;
52         hrt_data                custom_mode_enable;
53         hrt_data                custom_mode_data_state;
54         hrt_data                pec[N_CSI_RX_BE_MIPI_CUSTOM_PEC];
55         hrt_data                custom_mode_valid_eop_config;
56         hrt_data                global_lut_disregard_reg;
57         hrt_data                packet_status_stall;
58         hrt_data                short_packet_lut_entry[N_CSI_RX_BE_SHORT_PKT_LUT];
59         hrt_data                long_packet_lut_entry[N_CSI_RX_BE_LONG_PKT_LUT];
60 };
61 #endif /* __CSI_RX_LOCAL_H_INCLUDED__ */